[PATCH 0/7] iio: HID: Add helper method hid_sensor_adjust_channel_bit_mask()
Natália Salvino André
natalia.andre em ime.usp.br
Qui Abr 16 22:47:04 -03 2026
This patch set addresses code duplication within the IIO HID sensor drivers.
Multiple drivers (accel, gyro, light, magnetometer, pressure) were found to
implement identical function for adjusting the channel bit mask
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 | 13 +------------
.../iio/common/hid-sensors/hid-sensor-attributes.c | 11 +++++++++++
drivers/iio/gyro/hid-sensor-gyro-3d.c | 13 +------------
drivers/iio/light/hid-sensor-als.c | 13 +------------
drivers/iio/light/hid-sensor-prox.c | 13 +------------
drivers/iio/magnetometer/hid-sensor-magn-3d.c | 13 +------------
drivers/iio/pressure/hid-sensor-press.c | 13 +------------
include/linux/hid-sensor-hub.h | 3 +++
8 files changed, 20 insertions(+), 72 deletions(-)
--
2.51.0
Mais detalhes sobre a lista de discussão kernel