diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2017-07-20 18:24:20 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2017-08-20 17:41:13 +0300 |
commit | 73e3e3fc50de50cfd68e945d85679c983ed31bd9 (patch) | |
tree | e6277bcfcd388098fb38483ba4df45cfff750226 /drivers/iio/potentiometer | |
parent | e8245c68350104b6022b6783719e843d69ea7c43 (diff) | |
download | linux-73e3e3fc50de50cfd68e945d85679c983ed31bd9.tar.xz |
iio: adc: ti-ads1015: avoid getting stale result after runtime resume
This driver assumes that the device is operating in the continuous
conversion mode which performs the conversion continuously. So this driver
doesn't insert a wait time before reading the conversion register if the
configuration is not changed from a previous request.
This assumption is broken if the device is runtime suspended and entered
a power-down state. The forthcoming request causes reading a stale result
from the conversion register as the device is runtime resumed just before.
Fix it by adding a flag to detect that condition and insert a necessary
wait time.
Cc: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/potentiometer')
0 files changed, 0 insertions, 0 deletions