OpenCloudOS-Kernel/drivers/iio/temperature
Nuno Sá b76d26d69e 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: f110f3188e ("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>
2021-08-15 16:58:37 +01:00
..
Kconfig iio: temperature: add driver support for ti tmp117 2021-05-17 13:49:05 +01:00
Makefile iio: temperature: add driver support for ti tmp117 2021-05-17 13:49:05 +01:00
hid-sensor-temperature.c iio: hid-sensors: Update header includes 2021-06-16 14:53:13 +01:00
iqs620at-temp.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
ltc2983.c iio: ltc2983: fix device probe 2021-08-15 16:58:37 +01:00
max31856.c iio: Remove superfluous of_node assignments 2020-06-14 14:20:08 +01:00
maxim_thermocouple.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
mlx90614.c iio: temp: mlx90614: Handle failure in pm_runtime_resume_and_get() 2021-05-17 13:54:26 +01:00
mlx90632.c drivers: iio: temperature: Add delay after the addressed reset command in mlx90632.c 2021-01-14 20:56:55 +00:00
tmp006.c iio: temperature: tmp006: make sure the chip is powered up in probe 2021-07-19 09:51:59 +01:00
tmp007.c iio: temperature: tmp007: use device-managed functions in probe 2021-03-25 19:13:51 +00:00
tmp117.c iio: temperature: add driver support for ti tmp117 2021-05-17 13:49:05 +01:00
tsys01.c iio:temperature:tsys01: Drop of_match_ptr protection 2020-09-21 18:41:30 +01:00
tsys02d.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00