This series addresses an issue in the veml3235 that was inherited from an older driver (veml6030, not covered here but probably addressed after discussing this series), where the scale is does not follow ABI. To simplify the gain/integration time handling, the iio-gts helpers have been used. And to further simplify the process, two new helpers have been proposed to address repetitive patterns that are found in all users of iio-gts. The additions to iio-gts are wrappers around existing helpers, and I have tried to keep their names short, as adding more prefixes to the existing functions looked too cumbersome and inconvenient to follow the 80-char/line recommendation. I have not added any test for the new helpers because I would prefer to discuss them first. This series has been tested with a veml3235sl under all supported gains and integration times as well as with a few unsupported values to make sure the operations fail in those cases. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx> --- Javier Carrasco (2): iio: gts-helper: add helpers to ease searches of gain_sel and new_gain iio: veml3235: fix scale to conform to ABI drivers/iio/industrialio-gts-helper.c | 74 ++++++++++ drivers/iio/light/Kconfig | 1 + drivers/iio/light/veml3235.c | 252 +++++++++++++++++++--------------- include/linux/iio/iio-gts-helper.h | 5 + 4 files changed, 219 insertions(+), 113 deletions(-) --- base-commit: e25c8d66f6786300b680866c0e0139981273feba change-id: 20241215-veml3235_scale-62de98c7b5fa Best regards, -- Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>