* Location for ADC driver
@ 2012-03-26 15:33 ` Stefan Roese
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Roese @ 2012-03-26 15:33 UTC (permalink / raw)
To: lm-sensors; +Cc: linux-iio
Hi,
I'll start porting a driver for the ST SPEAr600 SoC internal ADC in a short
while. First I thought it would be located in drivers/hwmon with its
infrastructure. Then I noticed the drivers/staging/iio/adc directory.
So my question is, where should such an SoC internal ADC driver best be
placed? hwmon or iio/adc? Or can I choose freely?
Thanks,
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* [lm-sensors] Location for ADC driver
@ 2012-03-26 15:33 ` Stefan Roese
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Roese @ 2012-03-26 15:33 UTC (permalink / raw)
To: lm-sensors; +Cc: linux-iio
Hi,
I'll start porting a driver for the ST SPEAr600 SoC internal ADC in a short
while. First I thought it would be located in drivers/hwmon with its
infrastructure. Then I noticed the drivers/staging/iio/adc directory.
So my question is, where should such an SoC internal ADC driver best be
placed? hwmon or iio/adc? Or can I choose freely?
Thanks,
Stefan
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [lm-sensors] Location for ADC driver
2012-03-26 15:33 ` [lm-sensors] " Stefan Roese
(?)
@ 2012-03-26 18:07 ` Jonathan Cameron
-1 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2012-03-26 18:07 UTC (permalink / raw)
To: lm-sensors
On 03/26/2012 04:33 PM, Stefan Roese wrote:
> Hi,
>
> I'll start porting a driver for the ST SPEAr600 SoC internal ADC in a short
> while. First I thought it would be located in drivers/hwmon with its
> infrastructure. Then I noticed the drivers/staging/iio/adc directory.
>
> So my question is, where should such an SoC internal ADC driver best be
> placed? hwmon or iio/adc? Or can I choose freely?
>
It rather depends on what the adc is used for. Hwmon is unsurprisingly
suitable for monitoring hardware. So typically it is relatively low
speed polling of the adc channels via sysfs.
IIO has this mode (and indeed there is a iio_hwmon driver that allows
an iio device to provide a child hwmon device for a selection of channels).
It adds,
1) Buffered support for faster reading of lots of samples.
2) Event handling (there is some alarm support in hwmon).
3) Interfaces to allow other kernel drivers to make use of
the services provided by the ADC. Right now only interfaces
that poll are supported by mainline. Interfaces that use a callback
are undergoing review.
I'm not having much luck tracking down docs for the SPEAr600 adc, so
I'll guess it is similar to the SPEAr320 one? Looks like a straight
forward adc without a conversion completion interrupt (which will make
the driver tedious as you'll have to dead reckon the conversion time)
It's not that clever, so I think whether to go with IIO or hwmon
directly is largely a matter of how quick you want to grab data from it...
Jonathan
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [lm-sensors] Location for ADC driver
2012-03-26 15:33 ` [lm-sensors] " Stefan Roese
(?)
(?)
@ 2012-03-26 18:15 ` Guenter Roeck
-1 siblings, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2012-03-26 18:15 UTC (permalink / raw)
To: lm-sensors
On Mon, 2012-03-26 at 14:07 -0400, Jonathan Cameron wrote:
> On 03/26/2012 04:33 PM, Stefan Roese wrote:
> > Hi,
> >
> > I'll start porting a driver for the ST SPEAr600 SoC internal ADC in a short
> > while. First I thought it would be located in drivers/hwmon with its
> > infrastructure. Then I noticed the drivers/staging/iio/adc directory.
> >
> > So my question is, where should such an SoC internal ADC driver best be
> > placed? hwmon or iio/adc? Or can I choose freely?
> >
> It rather depends on what the adc is used for. Hwmon is unsurprisingly
> suitable for monitoring hardware. So typically it is relatively low
> speed polling of the adc channels via sysfs.
>
> IIO has this mode (and indeed there is a iio_hwmon driver that allows
> an iio device to provide a child hwmon device for a selection of channels).
>
> It adds,
>
> 1) Buffered support for faster reading of lots of samples.
> 2) Event handling (there is some alarm support in hwmon).
> 3) Interfaces to allow other kernel drivers to make use of
> the services provided by the ADC. Right now only interfaces
> that poll are supported by mainline. Interfaces that use a callback
> are undergoing review.
>
> I'm not having much luck tracking down docs for the SPEAr600 adc, so
> I'll guess it is similar to the SPEAr320 one? Looks like a straight
> forward adc without a conversion completion interrupt (which will make
> the driver tedious as you'll have to dead reckon the conversion time)
> It's not that clever, so I think whether to go with IIO or hwmon
> directly is largely a matter of how quick you want to grab data from it...
>
... and what its intended use is (generic adc or hardware monitoring).
Guenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-03-26 18:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-26 15:33 Location for ADC driver Stefan Roese
2012-03-26 15:33 ` [lm-sensors] " Stefan Roese
2012-03-26 18:07 ` Jonathan Cameron
2012-03-26 18:15 ` Guenter Roeck
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.