From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 22 18:00:25 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5F83106568B for ; Sat, 22 Aug 2009 18:00:25 +0000 (UTC) (envelope-from marc@msys.ch) Received: from sleipnir.msys.ch (smtp.msys.ch [157.161.101.10]) by mx1.freebsd.org (Postfix) with ESMTP id 65CF88FC0A for ; Sat, 22 Aug 2009 18:00:24 +0000 (UTC) Received: from mail.msys.ch (smtp.msys.ch [157.161.101.10]) by sleipnir.msys.ch (8.14.3/8.14.1) with ESMTP id n7MHx1sv022478 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 22 Aug 2009 19:59:01 +0200 (CEST) Received: from [192.168.17.107] (gw.vnode.ch [62.12.170.129]) (authenticated bits=0) by mail.msys.ch (8.14.3/8.14.1) with ESMTP id n7MHx01W026248 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Sat, 22 Aug 2009 19:59:01 +0200 (CEST) Message-Id: <5A17DFEE-F618-4027-92C5-6EA339B78BF1@msys.ch> From: Marc Balmer To: Alexander Leidinger In-Reply-To: <20090822182923.000064e0@unknown> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Sat, 22 Aug 2009 19:59:00 +0200 References: <6101e8c40908211917k69c82491w3cff00a527d14873@mail.gmail.com> <19e9a5dc0908212303j28a6913er604bfd06e7df81ec@mail.gmail.com> <2DC22872-96F5-4C0A-82E4-F9755A10E245@msys.ch> <20090822182923.000064e0@unknown> X-Mailer: Apple Mail (2.936) X-SMTP-Vilter-Version: 1.3.6 X-Spamd-Symbols: AWL Cc: =?ISO-8859-1?Q?Aur=E9lien_M=E9r=E9?= , Gonzalo Nemmi , freebsd-hackers@freebsd.org, Oliver Pinter Subject: Re: Common interface for sensors/health monitoring X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Aug 2009 18:00:25 -0000 Am 22.08.2009 um 18:29 schrieb Alexander Leidinger: > On Sat, 22 Aug 2009 08:50:23 +0200 Marc Balmer wrote: > >> The OpenBSD sensors framework lacks some desireable features, e.g. >> event capabilities like getting an event if a certain threshold is >> exceeded. And it propbably was used for things that it better had > > This assumes the kernel is monitoring the device periodically (in the > general case, as there are a lot of dump sensors which do not send > events on their own). The framework as in the SoC did not provide this > feature to keep the kernel part simple. You want to see a value, you > poll the kernel for it, and the userland would have been responsible > to > fire up an event. > > For smart sensors which trigger an event on their own (interrupt), you > can use the exiting kernel event framework (and the idea in the SoC > was to use it for such sensors). The devd is the userland side of it. > >> not (yes, I am culprit for on of these (ab)uses...). >> >> I am sure these features could be added if only the code was in the >> tree to hack on... > > The event stuff is in the kernel, go ahead and write a driver for your > smart sensor which fires events on its own. Well, most of the sensors are likely I2C or 1-Wire devices and these can only be polled.