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)
commit461631face58054c72b1f1453f2d66d71b1974e7
treef8231b1ad45dbe199e31c032a699f1ad0d52bb8e
parent7f310e5d07112e0bae57ce63de954e6773a26f81
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