[PATCH v2 0/7] Add helper method hid_sensor_adjust_channel_bit_mask()

Natália Salvino André
2026-04-21T22:22:27Z

This patch series introduces a generic helper function to handle channel bit mask adjustments
for HID sensors. Currently, multiple drivers implement identical logic for this task

Natália Salvino André (7):
iio: HID: Add helper method hid_sensor_adjust_channel_bit_mask()
iio: accel: HID: Replace method accel_3d_adjust_channel_bit_mask()
iio: gyro: HID: Replace method gyro_3d_adjust_channel_bit_mask()
iio: light: HID: Replace method als_adjust_channel_bit_mask()
iio: light: HID: Replace method prox_adjust_channel_bit_mask()
iio: magnetometer: HID: Replace method
magn_3d_adjust_channel_bit_mask()
iio: pressure: HID: Replace method press_adjust_channel_bit_mask()

drivers/iio/accel/hid-sensor-accel-3d.c | 17 +++--------------
.../common/hid-sensors/hid-sensor-attributes.c | 12 ++++++++++++
drivers/iio/gyro/hid-sensor-gyro-3d.c | 17 +++--------------
drivers/iio/light/hid-sensor-als.c | 13 +------------
drivers/iio/light/hid-sensor-prox.c | 15 ++-------------
drivers/iio/magnetometer/hid-sensor-magn-3d.c | 17 +++--------------
drivers/iio/pressure/hid-sensor-press.c | 15 ++-------------
include/linux/hid-sensor-hub.h | 3 +++
8 files changed, 29 insertions(+), 80 deletions(-)

--
2.51.0