Linux kernel staging patches
 help / color / mirror / Atom feed
From: Raffaele Tranfaglia via B4 Relay <devnull+raffaele.tranfaglia.gmail.com@kernel.org>
To: "Nuno Sá" <nuno.sa@analog.com>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: linux@analog.com, linux-iio@vger.kernel.org,
	 linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	 Raffaele Tranfaglia <raffaele.tranfaglia@gmail.com>
Subject: [PATCH 0/2] staging: iio: addac: adt7316: error code and probe cleanups
Date: Sun, 18 Oct 2026 22:41:49 +0100	[thread overview]
Message-ID: <20261018-adt7316-error-codes-v1-0-1970b7e242ac@gmail.com> (raw)

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>



             reply	other threads:[~2026-10-18 21:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-18 21:41 Raffaele Tranfaglia via B4 Relay [this message]
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 ` [PATCH 2/2] staging: iio: addac: adt7316: drop informational message in probe Raffaele Tranfaglia via B4 Relay
2026-10-19  1:57 ` [PATCH 0/2] staging: iio: addac: adt7316: error code and probe cleanups Ethan Tidmore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261018-adt7316-error-codes-v1-0-1970b7e242ac@gmail.com \
    --to=devnull+raffaele.tranfaglia.gmail.com@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=linux@analog.com \
    --cc=nuno.sa@analog.com \
    --cc=raffaele.tranfaglia@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox