summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorAndreas Klinger <ak@it-klinger.de>2019-09-09 14:37:21 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-10-09 19:11:25 +0100
commit4043ecfb5fc4355a090111e14faf7945ff0fdbd5 (patch)
treea98a336e51142e4dbb844fa9a5c6826af7e73028 /include/sound
parent6c59a962e081df6d8fe43325bbfabec57e0d4751 (diff)
downloadlinux-stable-4043ecfb5fc4355a090111e14faf7945ff0fdbd5.tar.gz
linux-stable-4043ecfb5fc4355a090111e14faf7945ff0fdbd5.tar.bz2
linux-stable-4043ecfb5fc4355a090111e14faf7945ff0fdbd5.zip
iio: adc: hx711: fix bug in sampling of data
Fix bug in sampling function hx711_cycle() when interrupt occures while PD_SCK is high. If PD_SCK is high for at least 60 us power down mode of the sensor is entered which in turn leads to a wrong measurement. Switch off interrupts during a PD_SCK high period and move query of DOUT to the latest point of time which is at the end of PD_SCK low period. This bug exists in the driver since it's initial addition. The more interrupts on the system the higher is the probability that it happens. Fixes: c3b2fdd0ea7e ("iio: adc: hx711: Add IIO driver for AVIA HX711") Signed-off-by: Andreas Klinger <ak@it-klinger.de> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/sound')
0 files changed, 0 insertions, 0 deletions