Re: [lm-sensors] Location for ADC driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux