]> 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)
commitc938ecb00928758519a9c9c0a4f5870cfc05224e
treea3a6ad21bf825e86dcf2b7afc0b3721b59e71aa9
parentb54522b00231f50db45e53107e8f773e4fce28e1
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