]> git.baikalelectronics.ru Git - kernel.git/commit
iio: hx711: add delay until DOUT is ready
authorAndreas Klinger <ak@it-klinger.de>
Tue, 10 Jul 2018 18:19:03 +0000 (20:19 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 15 Jul 2018 08:36:38 +0000 (09:36 +0100)
commitc5b6ef42d06484ad2b446887c0690d24841da7fd
treef8231b1ad45dbe199e31c032a699f1ad0d52bb8e
parentbad03d110f279125cf1b9b2f1385157776b8aa64
iio: hx711: add delay until DOUT is ready

On a system with parasitic capacitance it turned out that DOUT is not ready
after 100 ns after PD_SCK has raised. A measurement showed almost 1000 ns
until DOUT has reached its correct value.

With this patch its now possible to wait until data is ready.

The wait time should not be higher than the maximum PD_SCK high time which
is corresponding to the datasheet 50000 ns.

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