]> git.baikalelectronics.ru Git - kernel.git/commit
iio: pressure: dps310: Reset chip after timeout
authorEddie James <eajames@linux.ibm.com>
Thu, 15 Sep 2022 19:57:19 +0000 (14:57 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 21 Sep 2022 17:42:55 +0000 (18:42 +0100)
commita10c3c6a037db5b69a2b07d56d3540c6936f351f
tree88a8b2a77d7f775b57b23979905705c118caf029
parent5c5c44b303611a1d11961afb4b5cb1596f4b3158
iio: pressure: dps310: Reset chip after timeout

The DPS310 chip has been observed to get "stuck" such that pressure
and temperature measurements are never indicated as "ready" in the
MEAS_CFG register. The only solution is to reset the device and try
again. In order to avoid continual failures, use a boolean flag to
only try the reset after timeout once if errors persist.

Fixes: b90e51464454 ("iio: Add driver for Infineon DPS310")
Cc: <stable@vger.kernel.org>
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220915195719.136812-3-eajames@linux.ibm.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/pressure/dps310.c