diff options
author | Nuno Sá | 2021-08-11 15:32:20 +0200 |
---|---|---|
committer | Jonathan Cameron | 2021-08-15 16:58:37 +0100 |
commit | b76d26d69ecc97ebb24aaf40427a13c808a4f488 (patch) | |
tree | 8e36b1a7b14ba7bb3a0916aec9203b74459d562f /security | |
parent | d03a74bfaccefcf271bf8e889c31229aa521cd66 (diff) |
iio: ltc2983: fix device probe
There is no reason to assume that the IRQ rising edge (indicating that
the device start up phase is done) will happen after we request the IRQ.
If the device is already up by the time we request it, the call to
'wait_for_completion_timeout()' will timeout and we will fail the device
probe even though there's nothing wrong.
Fix it by just polling the status register until we get the indication that
the device is up and running. As a side effect of this fix, requesting the
IRQ is also moved to after the setup function.
Fixes: f110f3188e563 ("iio: temperature: Add support for LTC2983")
Reported-and-tested-by: Drew Fustini <drew@pdp7.com>
Reviewed-by: Drew Fustini <drew@pdp7.com>
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: <Stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210811133220.190264-2-nuno.sa@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions