From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 22 16:29:36 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 11D78106568E for ; Sat, 22 Aug 2009 16:29:36 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id BB83B8FC19 for ; Sat, 22 Aug 2009 16:29:35 +0000 (UTC) Received: from outgoing.leidinger.net (pD9E2CC10.dip.t-dialin.net [217.226.204.16]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id E0EA884534E; Sat, 22 Aug 2009 18:29:27 +0200 (CEST) Received: from unknown (IO.Leidinger.net [192.168.2.103]) by outgoing.leidinger.net (Postfix) with ESMTP id E2F4C6F72D; Sat, 22 Aug 2009 18:29:24 +0200 (CEST) Date: Sat, 22 Aug 2009 18:29:23 +0200 From: Alexander Leidinger To: Marc Balmer Message-ID: <20090822182923.000064e0@unknown> In-Reply-To: <2DC22872-96F5-4C0A-82E4-F9755A10E245@msys.ch> References: <6101e8c40908211917k69c82491w3cff00a527d14873@mail.gmail.com> <19e9a5dc0908212303j28a6913er604bfd06e7df81ec@mail.gmail.com> <2DC22872-96F5-4C0A-82E4-F9755A10E245@msys.ch> X-Mailer: Claws Mail 3.7.2cvs15 (GTK+ 2.16.0; i586-pc-mingw32msvc) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: E0EA884534E.76F7A X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.44, required 6, autolearn=disabled, ALL_TRUSTED -1.44) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1251563370.9932@/TR0LWj481Gl1yBxMjczCw X-EBL-Spam-Status: No X-Mailman-Approved-At: Sat, 22 Aug 2009 17:43:39 +0000 Cc: =?ISO-8859-1?Q?Aur=E9lien_M=E9r=E9?= , Oliver Pinter , Gonzalo Nemmi , freebsd-hackers@FreeBSD.org 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 16:29:36 -0000 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. Bye, Alexander.