Re: [PATCH 0/2] staging: iio: addac: adt7316: error code and probe cleanups

From: Ethan Tidmore

Date: Sun Oct 18 2026 - 21:58:47 EST


On Sun Oct 18, 2026 at 4:41 PM CDT, Raffaele Tranfaglia via B4 Relay wrote:
> 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>
> ---

This is the current policy regarding AI and staging [1].

Thanks,
ET

[1] https://lore.kernel.org/r/2026080354-skater-urgent-31b2@gregkh