Commit 1b92691
iio: accel: adxl367: fix DEVID read after reset
regmap_read_poll_timeout() will not sleep before reading,
causing the first read to return -ENXIO on I2C, since the
chip does not respond to it while it is being reset.
The datasheet specifies that a soft reset operation has a
latency of 7.5ms.
Add a 15ms sleep between reset and reading the DEVID register,
and switch to a simple regmap_read() call.
Fixes: cbab791 ("iio: accel: add ADXL367 driver")
Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20240207033657.206171-1-demonsingur@gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>1 parent a1c9f50 commit 1b92691
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1429 | 1429 | | |
1430 | 1430 | | |
1431 | 1431 | | |
1432 | | - | |
1433 | | - | |
| 1432 | + | |
1434 | 1433 | | |
| 1434 | + | |
| 1435 | + | |
| 1436 | + | |
1435 | 1437 | | |
1436 | 1438 | | |
1437 | 1439 | | |
| |||
1510 | 1512 | | |
1511 | 1513 | | |
1512 | 1514 | | |
| 1515 | + | |
| 1516 | + | |
1513 | 1517 | | |
1514 | 1518 | | |
1515 | 1519 | | |
| |||
0 commit comments