[PATCH v2 0/7] HID: iio: Unify probe-path logging

From: Sanjay Chitroda via B4 Relay

Date: Fri Nov 27 2026 - 05:34:32 EST


This series provides consistent support for logs in probe() path for
HID IIO drivers with suggestion and input from Jonathan.

This is followup series on top of multiple sub-series submitted for HID
IIO device drivers which included fixes, devm support, cleanup and using
preferred kernel coding style. This series adopts a common logging
approach throughout the HID IIO device drivers in probe path.

The result is more consistent error reporting and improved
maintainability across the HID IIO subsystem for following drivers:
find drivers/iio/ -name "*hid*.c"
drivers/iio/orientation/hid-sensor-rotation.c
drivers/iio/orientation/hid-sensor-incl-3d.c
drivers/iio/gyro/hid-sensor-gyro-3d.c
drivers/iio/pressure/hid-sensor-press.c
drivers/iio/temperature/hid-sensor-temperature.c
drivers/iio/common/hid-sensors/hid-sensor-trigger.c
drivers/iio/common/hid-sensors/hid-sensor-attributes.c
drivers/iio/humidity/hid-sensor-humidity.c
drivers/iio/light/hid-sensor-prox.c
drivers/iio/light/hid-sensor-als.c
drivers/iio/magnetometer/hid-sensor-magn-3d.c
drivers/iio/position/hid-sensor-custom-intel-hinge.c
drivers/iio/accel/hid-sensor-accel-3d.c

Additionally, I have kept changes specific to logical diff instead of
driver specific and covered all HID IIO device drivers.

Testing:
- Compiled with W=1 for each patch in series
PS:
- Sashiko reported an issue in a different driver and noted that it is not
introduced by this series. I have taken this feedback into account and
will address the actual issue in a separate series focus on that driver.

Signed-off-by: Sanjay Chitroda <sanjayembeddedse@xxxxxxxxx>
---
Changes in v2:
- Following suggestion of Joshua, remove the comparison and change the
checks to `if (ret)` as respective devm_*() API `return 0` on success.
- Link to v1: https://patch.msgid.link/20261105-19-oct-hid-iio-unified-print-framework-v1-0-0b360d9552d9@xxxxxxxxx

To: Jiri Kosina <jikos@xxxxxxxxxx>
To: Jonathan Cameron <jic23@xxxxxxxxxx>
To: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>
To: David Lechner <dlechner@xxxxxxxxxxxx>
To: Nuno Sá <nuno.sa@xxxxxxxxxx>
To: Andy Shevchenko <andy@xxxxxxxxxx>
Cc: linux-input@xxxxxxxxxxxxxxx
Cc: linux-iio@xxxxxxxxxxxxxxx

---
Sanjay Chitroda (7):
iio: Remove redundant probe error messages for HID device drivers
iio: Remove redundant devm_kmemdup() allocation failure messages
iio: magnetometer: hid-sensor-magn-3d: drop redundant probe error messages
iio: Use dev_err_probe() in HID IIO device drivers
iio: add probe error messages to hid humidity and temperature drivers
iio: Simplify trigger setup error checks
iio: Simplify callback registration error checks

drivers/iio/accel/hid-sensor-accel-3d.c | 27 +++++---------
drivers/iio/gyro/hid-sensor-gyro-3d.c | 24 ++++---------
drivers/iio/humidity/hid-sensor-humidity.c | 4 +--
drivers/iio/light/hid-sensor-als.c | 20 ++++-------
drivers/iio/light/hid-sensor-prox.c | 20 ++++-------
drivers/iio/magnetometer/hid-sensor-magn-3d.c | 41 ++++++----------------
drivers/iio/orientation/hid-sensor-incl-3d.c | 24 ++++---------
drivers/iio/orientation/hid-sensor-rotation.c | 20 ++++-------
.../iio/position/hid-sensor-custom-intel-hinge.c | 20 ++++-------
drivers/iio/pressure/hid-sensor-press.c | 24 ++++---------
drivers/iio/temperature/hid-sensor-temperature.c | 4 +--
11 files changed, 69 insertions(+), 159 deletions(-)
---
base-commit: 39508411b82d4dc29dd245bb471ec9ecc1111c9d
change-id: 20261019-19-oct-hid-iio-unified-print-framework-3c877471fc73

Best regards,
--
Sanjay Chitroda <sanjayembeddedse@xxxxxxxxx>