[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241220-veml3235_scale-v1-0-b43b190bbb6a@gmail.com>
Date: Fri, 20 Dec 2024 20:28:27 +0100
From: Javier Carrasco <javier.carrasco.cruz@...il.com>
To: Matti Vaittinen <mazziesaccount@...il.com>,
Jonathan Cameron <jic23@...nel.org>, Lars-Peter Clausen <lars@...afoo.de>
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Javier Carrasco <javier.carrasco.cruz@...il.com>
Subject: [PATCH 0/2] iio: light: fix scale in veml3235 and add helpers to
iio-gts
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@...il.com>
---
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@...il.com>
Powered by blists - more mailing lists