Re: [RFC] iio: mxs-lradc: Add support for current source

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

 




On February 12, 2014 4:10:46 PM GMT+00:00, Mark Brown <broonie@xxxxxxxxxx> wrote:
>On Sat, Feb 08, 2014 at 11:59:38AM +0000, Jonathan Cameron wrote:
>> On 28/01/14 13:52, Harald Geyer wrote:
>
>> >The LRADC can drive two of its ADC channels with a defined current
>> >between 0 and 300uA to allow reading thermistors without external
>> >current source. I'm not sure what the right IIO ABI in this case
>
>> I'd be tempted to do this via the regulator framework instead of IIO.
>> At somepoint we could have a bridge to allow an iio interface on a
>regulator
>> if anyone wants it (you never know)
>
>I'm very worried about the idea of an ABI - if IIO wants to offer
>something that is implemented using the regulator API that's fine but
>doing it directly from the regulator API sounds worrying.

Would definitely be implemented using the regulator ABI. Would effectively pipe DAC writes from user space to regulator voltage requests.

Not sure I really like the idea anyway but some DACs look awfully like regulators so it might become an issue...

Definitely leave it until someone cares though!
>
>> I guess the main advantage in doing it in IIO would be to keep stuff
>in
>> one logical group.  Still they might just as easily be using an
>external
>> regulator to drive thermistors so using the regulator framework would
>be
>> more consistent...
>
>The current that's driven seems more a property of the thermistor than
>of the regulator if it is a generic regulator.

True. So do we give the thermistor a driver of its own?  Might make sense with it using a regulator and an iio channel. Output probably as hwmon?

Would be a small bit of glue code really.  There are quite a few similar cases with analog sensors that we don't currently represent at all.  Trick would be writing something generic and lightweight.

J



-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
--
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