Skip to content
Commit 68d8ab3c authored by Andreas Klinger's avatar Andreas Klinger Committed by Jonathan Cameron
Browse files

iio: adc: hx711: optimize performance in read cycle



Set gain in hx711_reset() to its default value after a reset cycle. This
omits one precautionary read cycle, because the read is performed in
hx711_set_gain_for_channel() anyway if gain has changed.

Check for DOUT low and if its high wait some time if it goes down
instead of doing a blind reset cycle when DOUT is not down.

This is a performance optimization which allows to query the sensor with
a higher frequency.

Signed-off-by: default avatarAndreas Klinger <ak@it-klinger.de>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 1cd92d42
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment