Skip to content

iio: pressure: dps310: fix input checks and resets

Rupesh Majhi linux-iio lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3iio: pressure: dps310: reject a zero rate or oversampling ratiodrivers/iio/pressure/dps310.c+4 -41 reply
2/3iio: pressure: dps310: reset the chip at probedrivers/iio/pressure/dps310.c+5 -05 replies
3/3iio: pressure: dps310: keep the user's settings across a timeout resetdrivers/iio/pressure/dps310.c+19 -61 reply

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchJoshua CroftsPaulius Zaleckas
SeriesT-b
1/3R-b
2/3R-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/3] iio: pressure: dps310: fix input checks and resets

Sashiko flagged these as pre-existing in its review of the FIFO series v8 [1]. All three reproduce on a DPS310 on a BeagleBone Black:

- 0 or 0.5 written to a rate or ratio is accepted. Ratio 0 puts a reserved value in the register: pressure reads fail with -ERANGE, temperature reads 974 C.
- A warm reboot during a FIFO capture leaves FIFO_EN set. After it, every raw read times out until the driver is unbound.
- The reset after a read timeout silently puts the rate and ratio back to their defaults.

Patch 2 fixes a commit that is only in iio testing so far.

Paulius, patch 2 also resets the ZTS8032 at probe, the same reset that remove already does. A Tested-by would be welcome if you have time.

Based on iio testing. Reproduced and fixed with help from an LLM coding assistant.

[1] https://sashiko.dev/#/patchset/20260921183132.233136-1-zoone.rupert%40gmail.com

Cc Paulius Zaleckas <[email protected]>

Rupesh Majhi (3):
iio: pressure: dps310: reject a zero rate or oversampling ratio
iio: pressure: dps310: reset the chip at probe
iio: pressure: dps310: keep the user's settings across a timeout reset

 drivers/iio/pressure/dps310.c | 38 ++++++++++++++++++++++++++---------
 1 file changed, 28 insertions(+), 10 deletions(-)

base-commit: 7d80b4b383bc53b48abd3a30ca4a91cdab568bfa

Signature · 1 line
2.43.0