staging: iio: addac: adt7316: error code and probe cleanups
Get series with b4
b4 am [email protected] change-id 20261018-adt7316-error-codes-48500bb0b1cbVersions newest first
- v1 Latest2 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | staging: iio: addac: adt7316: propagate bus error codesdrivers/ | +43 | 0 replies | |
| 2/2 | staging: iio: addac: adt7316: drop informational message in probedrivers/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] staging: iio: addac: adt7316: error code and probe cleanups
Two small cleanups for the adt7316 driver.
Patch 1 makes the driver return the error codes reported by the bus helpers instead of replacing them with -EIO, so callers see the actual cause of a failure.
Patch 2 removes the dev_info() printed on successful probe, as drivers that are working properly should be quiet (see Documentation/process/coding-style.rst).
Tested on arm64 QEMU, with i2c-stub providing the device:
insmod i2c-stub.ko chip_addr=0x48
i2cset -y 0 0x48 0x4d 0x01
echo adt7316 0x48 > /sys/bus/i2c/devices/i2c-0/new_device
- probe succeeds and no longer prints a message
- device_id reads back the stub register value
- writing 0/1 to "enabled" updates CONFIG1 (0x18)
Error path, instantiating the device where no stub chip exists:
echo adt7316 0x49 > /sys/bus/i2c/devices/i2c-0/new_device
before: probe with driver adt7316 failed with error -5
after: probe with driver adt7316 rejects match -19
---
Raffaele Tranfaglia (2):
staging: iio: addac: adt7316: propagate bus error codes
staging: iio: addac: adt7316: drop informational message in probe
drivers/staging/iio/addac/adt7316.c | 91 ++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 48 deletions(-)
---
base-commit: 6a27f3a7d1063aec5aa3d9370161e850fc3a85dd
change-id: 20261018-adt7316-error-codes-48500bb0b1cb
Best regards,
Signature · 1 line
Raffaele Tranfaglia <[email protected]>