Linux IIO development
 help / color / mirror / Atom feed
* [PATCH v3 0/6] iio: hid-sensor: standardize scan_type initialization
@ 2026-05-12  1:16 Natália Salvino André
  2026-05-12  1:16 ` [PATCH v3 1/6] iio: accel: HID: hid-sensor-accel-3d: Refactor channel initialization Natália Salvino André
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Natália Salvino André @ 2026-05-12  1:16 UTC (permalink / raw)
  To: andy, dlechner, jic23, jikos, nuno.sa, srinivas.pandruvada
  Cc: Natália Salvino André, linux-iio, linux-input

This series refactors the HID sensor drivers to standardize the
initialization of the iio_chan_spec scan_type structure.
Direct initialization using compound literals was used.

This change improves code readability and ensures that all fields
of the scan_type structure are properly zero-initialized.
Additionally, for the hid-sensor-accel-3d driver, the channel
initialization loop was refactored to iterate directly over the
scan indices, eliminating redundant logic.

Natália Salvino André (6):
  iio: accel: HID: hid-sensor-accel-3d: Refactor channel initialization
  iio: gyro: HID: hid-sensor-gyro-3d: Refactor channel initialization
  iio: light: HID: hid-sensor-als: Refactor channel initialization
  iio: light: HID: hid-sensor-prox: Refactor channel initialization
  iio: magnetometer: HID: hid-sensor-magn-3d: Refactor channel
    initialization
  iio: pressure: HID: hid-sensor-press: Refactor channel initialization

 drivers/iio/accel/hid-sensor-accel-3d.c       | 27 +++++++------------
 drivers/iio/gyro/hid-sensor-gyro-3d.c         | 24 +++++++----------
 drivers/iio/light/hid-sensor-als.c            | 18 +++++--------
 drivers/iio/light/hid-sensor-prox.c           | 19 +++++--------
 drivers/iio/magnetometer/hid-sensor-magn-3d.c | 20 +++++---------
 drivers/iio/pressure/hid-sensor-press.c       | 19 +++++--------
 6 files changed, 42 insertions(+), 85 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2026-05-13  3:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12  1:16 [PATCH v3 0/6] iio: hid-sensor: standardize scan_type initialization Natália Salvino André
2026-05-12  1:16 ` [PATCH v3 1/6] iio: accel: HID: hid-sensor-accel-3d: Refactor channel initialization Natália Salvino André
2026-05-12  1:16 ` [PATCH v3 2/6] iio: gyro: HID: hid-sensor-gyro-3d: " Natália Salvino André
2026-05-12  1:16 ` [PATCH v3 3/6] iio: light: HID: hid-sensor-als: " Natália Salvino André
2026-05-12  1:16 ` [PATCH v3 4/6] iio: light: HID: hid-sensor-prox: " Natália Salvino André
2026-05-12  1:16 ` [PATCH v3 5/6] iio: magnetometer: HID: hid-sensor-magn-3d: " Natália Salvino André
2026-05-12  1:16 ` [PATCH v3 6/6] iio: pressure: HID: hid-sensor-press: " Natália Salvino André
2026-05-12 14:42 ` [PATCH v3 0/6] iio: hid-sensor: standardize scan_type initialization Jonathan Cameron
2026-05-12 20:21   ` Andy Shevchenko
2026-05-12 14:48 ` Jonathan Cameron
2026-05-13  3:27   ` Zhang, Lixu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox