All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] staging: iio: addac: adt7316: error code and probe cleanups
@ 2026-10-18 21:41 ` Raffaele Tranfaglia
  0 siblings, 0 replies; 7+ messages in thread
From: Raffaele Tranfaglia via B4 Relay @ 2026-10-18 21:41 UTC (permalink / raw)
  To: Nuno Sá, Michael Hennerich, Jonathan Cameron, David Lechner,
	Andy Shevchenko, Greg Kroah-Hartman
  Cc: linux, linux-iio, linux-staging, linux-kernel,
	Raffaele Tranfaglia

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@gmail.com>

Signed-off-by: Raffaele Tranfaglia <raffaele.tranfaglia@gmail.com>
---
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@gmail.com>



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-10-19  1:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-18 21:41 [PATCH 0/2] staging: iio: addac: adt7316: error code and probe cleanups Raffaele Tranfaglia via B4 Relay
2026-10-18 21:41 ` Raffaele Tranfaglia
2026-10-18 21:41 ` [PATCH 1/2] staging: iio: addac: adt7316: propagate bus error codes Raffaele Tranfaglia via B4 Relay
2026-10-18 21:41   ` Raffaele Tranfaglia
2026-10-18 21:41 ` [PATCH 2/2] staging: iio: addac: adt7316: drop informational message in probe Raffaele Tranfaglia via B4 Relay
2026-10-18 21:41   ` Raffaele Tranfaglia
2026-10-19  1:57 ` [PATCH 0/2] staging: iio: addac: adt7316: error code and probe cleanups Ethan Tidmore

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.