Re: [PATCH 1/2] iio: adc: ti-ads1015: fix conversion time

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

 



On Tue, Aug 1, 2017 at 12:59 PM, Ladislav Michl <ladis@xxxxxxxxxxxxxx> wrote:
> On Tue, Aug 01, 2017 at 12:09:34PM +0300, Daniel Baluta wrote:
>> On Tue, Aug 1, 2017 at 11:26 AM, Ladislav Michl <ladis@xxxxxxxxxxxxxx> wrote:
>> > When reading diffrent channel value than device is currently processing
>> > wait time of conversion period is applied, which is not enough as device
>> > might be already in the middle of conversion and therefore previously
>> > converted value is returned - the one belonging to another channel.
>> > Fix it by waiting for two sampling periods.
>> >
>> > Signed-off-by: Ladislav Michl <ladis@xxxxxxxxxxxxxx>
>>
>> Did you actually experienced this in practice? I guess you are right,
>> if you change the channel during a conversion, this change will be applied
>> to the next conversion *but* reading will still return old value because the
>> current conversion hasn't finished yet.
>
> Yes, that's what actually happens without patch and could be easily
> demonstrated from command line:
>
> $ cat in_voltage0_raw
> 847
> $ cat in_voltage1_raw
> 846
> $ cat in_voltage1_raw
> 195
> $ cat in_voltage0_raw
> 196
> $ cat in_voltage0_raw
> 846
>
> Btw, driver is using continuous conversion mode, but I was unable to
> make iio_generic_buffer work with it. And for reading values one by
> one single shot mode is enough. Any hints?

Haven't looked at this sensor for long time. Can you tell us what have you
tried and what doesn't work?

Daniel.
--
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