Yes. Take a looking in the staging-next branch of
On 5/15/2012 3:18 PM, Lars-Peter Clausen wrote:On 05/15/2012 03:42 PM, Guenter Roeck wrote:driver.On Tue, May 15, 2012 at 08:42:57AM -0400, R, Durgadoss wrote:Hi Guenter,
Thanks for a quick reply.
On Tue, May 15, 2012 at 10:26:48AM -0400, Jenny TC wrote:Currently drivers are using custom APIs to communicate with ADCdrivers.So it make sense to have generic APIs to commnicate with ADChardware monitoring.I meant iio (more specifically staging/iio/adc).This patch introduces generic APIs to communicate with ADC drivers.
Signed-off-by: Jenny TC<jenny.tc@xxxxxxxxx>
Hi Jenny,
Do you have a practical use case ?
We have some platform specific component drivers, thermal drivers,
battery drivers using this General purpose ADC in the platform.
That's why we thought of doing something like this.
Also, shouldn't those generic ADCs rather be supported through the
IO subsystem ?
After all, hwmon is all about hardware monitoring, not to provide
generic ADC access.
In this case, can we try this in iio or mfd subsystem ?
Kindly advise.
I suspect it might make more sense to have a hwmon client, in
parallel to the other users/clients (battery control, thermal etc),
if the values reported by the ADC reflect information relevant for
Thanks Lars-Peter. That bridge is currently limited to voltage reading but
So there is already an experimental IIO to hwmon bridge in
drivers/staging/iio/, which you can use to expose a IIO ADC driver as
an hwmon device.
that's more because my test part didn't do anything else.
Trivial to add other bits and bobs as needed. In the short term, the interrupt
driven side of things is still under review (so you are limited to polling devices
- though this is typically fine for hwmon etc). I'll be submitting a patch to
move the existing hwmon bridge driver into drivers/hwmon in the next cycle
(after the IIO core is out of staging).
Longer term plans involve reducing the connection between the IIO
userspace front end and the backend to give cleaner support when people
don't want generic userspace interfaces. This means making absolutely
everything under the sun available through generic in kernel interfaces which
will be 'interesting' for some more interesting devices...
Jonathan
Hi Jonathan,
Thanks for your reply.
I was looking for generic ADC APIs. At present does the IIO subsystem support any kind of generic ADC APIS which can be used by drivers to read ADC samples?
-jtc