]> git.baikalelectronics.ru Git - kernel.git/commit
iio: hx711: fix bug in reset functionality
authorAndreas Klinger <ak@it-klinger.de>
Wed, 13 Dec 2017 17:10:34 +0000 (18:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Jan 2018 15:03:42 +0000 (16:03 +0100)
commit532e51e1948958ffd7c12d3fc0e6eb56bf104832
treea3a6ad21bf825e86dcf2b7afc0b3721b59e71aa9
parent68f7665201e8343c37e0d15bede298f1f8087850
iio: hx711: fix bug in reset functionality

Return value in hx711_reset() should indicate status of dout otherwise the
calling function is reporting an error as false positive

If there are two reads too close to each other, then the second one will
never succeed. This happens especially when using buffered mode with both
channels enabled.

When changing the channel on every trigger event the former 100 ms are not
enough for waiting until the device indicates normal mode.

Wait up to 1 second until the device turns into normal mode.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/adc/hx711.c