Re: [PATCH 9/9] i2c: move twl4030-madc to new registration style

Mikko Ylinen
2008-10-01T14:21:17Z

Hi,

David Brownell wrote:
> A question that may well come up when this heads upstream:
> why is this exporting a miscdev, for an ioctl, when this
> could all be done using sysfs and hwmon rules? That is,
> was this the "appropriate" way to export ADC channels?

We could still do both, right?

> And a slightly more pragmatic question: does Nokia have
> tools that would break if this were switched to hwmon style?

We've used ioctl() mechanism to get ADC readings to user space quite
some time already.

I believe this is still a better option compared with hwmon/sysfs
approach (Reason: sometimes we do those readings very often and
for many channels. Instead of doing all that fd magic and atoi(),
we just call ioctl() to get raw ADC data available for further
processing).

>> How detailed information would you like to have here?
>
> Enough to answer the question "what's a MADC?" for someone
> who doesn't have TWL specs and hasn't read even any kind
> of summary data sheet. Three sentences would likely be
> excessive; one good sentence might suffice.

Perhaps duplicate the comments we have in Kconfig to .c?

--
Regards, Mikko