[PATCH 2/3] iio: pressure: dps310: reset the chip at probe
From: Rupesh Majhi
Date: Thu Oct 29 2026 - 18:07:35 EST
The chip keeps its registers across a warm reboot, and probe changes
only the shift bits in CFG_REG. A reboot during a FIFO capture leaves
FIFO_EN set, so the ready bits never come and every raw read times
out. The timeout reset does not clear it either, since the CFG_REG
update that follows writes FIFO_EN back from the register cache.
Reset the chip first, as remove already does.
Fixes: 90f0d1016398 ("iio: pressure: dps310: read buffered samples from the hardware FIFO")
Reported-by: Sashiko <sashiko-bot@xxxxxxxxxx>
Closes: https://sashiko.dev/#/patchset/20260921183132.233136-1-zoone.rupert%40gmail.com
Signed-off-by: Rupesh Majhi <zoone.rupert@xxxxxxxxx>
---
Cc: Paulius Zaleckas <paulius.zaleckas@xxxxxxxxx>
drivers/iio/pressure/dps310.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/iio/pressure/dps310.c b/drivers/iio/pressure/dps310.c
index b6aa5dbe2bcd..29778f25bb33 100644
--- a/drivers/iio/pressure/dps310.c
+++ b/drivers/iio/pressure/dps310.c
@@ -1445,6 +1445,11 @@ static int dps310_probe(struct i2c_client *client)
if (rc)
return rc;
+ /* The chip keeps its state across a warm reboot */
+ rc = dps310_reset_wait(data);
+ if (rc)
+ return rc;
+
rc = dps310_startup(data);
if (rc)
return rc;
--
2.43.0