From: Jonathan Cameron <jic23@cam.ac.uk>
To: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: "Zhang, Sonic" <Sonic.Zhang@analog.com>,
Mike Frysinger <vapier@gentoo.org>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
"device-drivers-devel@blackfin.uclinux.org"
<device-drivers-devel@blackfin.uclinux.org>
Subject: Re: [PATCH 12/14] staging: iio: adc: new driver for ADT7408 temperature sensors
Date: Mon, 01 Nov 2010 10:56:02 +0000 [thread overview]
Message-ID: <4CCE9CC2.5090401@cam.ac.uk> (raw)
In-Reply-To: <20101026143307.GB22667@ericsson.com>
On 10/26/10 15:33, Guenter Roeck wrote:
> On Tue, Oct 26, 2010 at 05:15:30AM -0400, Jonathan Cameron wrote:
>> On 10/26/10 04:27, Zhang, Sonic wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: Jonathan Cameron [mailto:jic23@cam.ac.uk]
>>>> Sent: Monday, October 25, 2010 6:54 AM
>>>> To: Mike Frysinger
>>>> Cc: linux-iio@vger.kernel.org;
>>>> device-drivers-devel@blackfin.uclinux.org; Zhang, Sonic; Guenter Roeck
>>>> Subject: Re: [PATCH 12/14] staging: iio: adc: new driver for
>>>> ADT7408 temperature sensors
>>>>
>>>> On 10/23/10 21:29, Mike Frysinger wrote:
>>>>> From: Sonic Zhang <sonic.zhang@analog.com>
>>>> Here we enter new territory. This device is already supported
>>>> in hwmon. Do we have a usecase that is not covered by that driver?
>>>>
>>>
>>> I don't find a way to get event notification other than poll in hwmon
>>> framework. So, I move all temperature devic with interrupt available
>>> to IIO framework.
>>
>> Whilst it isn't often done (and is a little clunky). It is possible to select
>> on sysfs attributes much like any other file. I'm sure Guenter can tell us
>> if any current hwmon devices are doing this?
>
> One can always use sysfs_notify(). Not sure I understand what is clunky about it.
> gpio-fan uses it, and I have used it as well in an internal driver. Works pretty well.
>
> I thought that is what was meant with "poll" [ie poll (2)], and somehow considered
> to not be good enough. Would be nice to know the reasons, though, and how iio does
> better than that. Maybe I need to spend some time reading the iio documentation.
As a quick and dirty summary. IIO does it roughly the same way as input, be it heavily
stripped down. Character device rather than sysfs for events.
This is from memory, but I think the main issue with sysfs_notify is that, whilst you can
poll on any file, all of those in a given directory will wake up on a call of sysfs_notify.
In devices with one or two alarms that is probably fine as you can just read them all,
but we have devices with 10s of different alarms. Hence you don't want to be reading lots
of files to find out what is going on. A single alarm file would be fine if only one could
trigger simultaneously, but that's rarely the case. Any sort of 'what alarm has triggered'
mask is clunky and difficult to generalize.
We try to use sysfs for what it is good at (low bandwidth direct reading from devices and
configuration of those devices) and character devices for the high bandwidth stuff.
Jonathan
next prev parent reply other threads:[~2010-11-01 10:50 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-23 20:29 [PATCH 01/14] staging: iio: adc: new driver for AD7152/3 devices Mike Frysinger
2010-10-23 20:29 ` [PATCH 02/14] staging: iio: adc: new driver for AD7291 devices Mike Frysinger
2010-10-24 21:32 ` Jonathan Cameron
2010-10-23 20:29 ` [PATCH 03/14] staging: iio: adc: new driver for AD7298 devices Mike Frysinger
2010-10-24 21:49 ` Jonathan Cameron
2010-10-23 20:29 ` [PATCH 04/14] staging: iio: adc: new driver for AD7314 devices Mike Frysinger
2010-10-24 21:56 ` Jonathan Cameron
2010-10-26 3:35 ` Zhang, Sonic
2010-10-23 20:29 ` [PATCH 05/14] staging: iio: adc: new driver for AD7414/5 devices Mike Frysinger
2010-10-24 22:03 ` Jonathan Cameron
2010-10-23 20:29 ` [PATCH 06/14] staging: iio: adc: new driver for AD7416/7/8 devices Mike Frysinger
2010-10-24 22:19 ` Jonathan Cameron
2010-10-23 20:29 ` [PATCH 07/14] staging: iio: adc: new driver for AD7475/6/6A/7/7A/8/8A and AD7495 devices Mike Frysinger
2010-10-24 21:14 ` [Device-drivers-devel] " Mike Frysinger
2010-10-24 22:21 ` Jonathan Cameron
2010-10-23 20:29 ` [PATCH 08/14] staging: iio: adc: new driver for AD7745/6/7 devices Mike Frysinger
2010-10-24 22:36 ` Jonathan Cameron
2010-10-23 20:29 ` [PATCH 09/14] staging: iio: adc: new driver for AD7816 devices Mike Frysinger
2010-10-23 20:29 ` [PATCH 10/14] staging: iio: adc: new driver for ADT75 temperature sensors Mike Frysinger
2010-10-23 20:29 ` [PATCH 11/14] staging: iio: adc: new driver for ADT7310 " Mike Frysinger
2010-10-23 20:29 ` [PATCH 12/14] staging: iio: adc: new driver for ADT7408 " Mike Frysinger
2010-10-24 22:53 ` Jonathan Cameron
2010-10-24 23:47 ` Guenter Roeck
2010-10-25 10:28 ` Jonathan Cameron
2010-10-26 4:20 ` Zhang, Sonic
2010-10-26 5:08 ` Guenter Roeck
2010-10-26 5:38 ` Zhang, Sonic
2010-10-26 9:14 ` Jonathan Cameron
2010-10-25 0:46 ` Guenter Roeck
2010-10-25 10:32 ` Jonathan Cameron
2010-10-25 11:19 ` Guenter Roeck
2010-10-25 11:43 ` Jonathan Cameron
2010-10-25 14:12 ` Guenter Roeck
2010-10-25 16:18 ` Hennerich, Michael
2010-10-25 11:47 ` [Device-drivers-devel] " Hennerich, Michael
2010-10-26 3:21 ` Zhang, Sonic
2010-10-26 3:27 ` Zhang, Sonic
2010-10-26 3:52 ` Guenter Roeck
2010-10-26 9:15 ` Jonathan Cameron
2010-10-26 14:33 ` Guenter Roeck
2010-11-01 10:56 ` Jonathan Cameron [this message]
2010-11-01 14:37 ` Guenter Roeck
2010-11-01 15:19 ` Jonathan Cameron
2010-10-23 20:29 ` [PATCH 13/14] staging: iio: adc: new driver for ADT7410 " Mike Frysinger
2010-10-23 20:29 ` [PATCH 14/14] staging: iio: adc: new ad799x driver Mike Frysinger
2010-10-24 21:14 ` [Device-drivers-devel] " Mike Frysinger
2010-10-24 22:55 ` Jonathan Cameron
2010-10-24 21:09 ` [PATCH 01/14] staging: iio: adc: new driver for AD7152/3 devices Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CCE9CC2.5090401@cam.ac.uk \
--to=jic23@cam.ac.uk \
--cc=Sonic.Zhang@analog.com \
--cc=device-drivers-devel@blackfin.uclinux.org \
--cc=guenter.roeck@ericsson.com \
--cc=linux-iio@vger.kernel.org \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.