diff options
author | Harald Geyer <harald@ccbib.org> | 2015-07-07 13:39:31 (GMT) |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-07-20 17:41:20 (GMT) |
commit | 081d974031bafb204d64de3e82f398daf1d0b899 (patch) | |
tree | 6859eb7ca8777b832bb39e185f1611bebed3fa9e /drivers/iio/humidity/Kconfig | |
parent | 5fbb0bc466b7b43036b1dd8c9e9166ca9e69e07a (diff) | |
download | linux-081d974031bafb204d64de3e82f398daf1d0b899.tar.xz |
iio: dht11: Use new function ktime_get_resolution_ns()
This cleans up the most ugly workaround in this driver. There are no
functional changes yet in the decoding algorithm, but we improve the
following things:
* Get rid of spurious warning messages on systems with fast HRTIMER.
* If the clock is not fast enough for decoding to work, we give
up immediately.
* In that case we return EAGAIN instead of EIO, so it's easier to
discriminate causes of failure.
Returning EAGAIN is somewhat controversial: It's technically correct
as a faster clock might become available. OTOH once all clocks are
enabled this is a permanent error. There is no ECLOCKTOOSLOW error
code.
Signed-off-by: Harald Geyer <harald@ccbib.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/humidity/Kconfig')
0 files changed, 0 insertions, 0 deletions