[PATCH 0/2] staging: iio: addac: adt7316: error code and probe cleanups
From: Raffaele Tranfaglia via B4 Relay
Date: Sun Oct 18 2026 - 17:43:02 EST
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
Signed-off-by: Raffaele Tranfaglia <raffaele.tranfaglia@xxxxxxxxx>
Signed-off-by: Raffaele Tranfaglia <raffaele.tranfaglia@xxxxxxxxx>
---
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,
--
Raffaele Tranfaglia <raffaele.tranfaglia@xxxxxxxxx>