patch "iio: light: al3320a: read both ALS ADC registers again" added to char-misc-next
Subsystems (2)
This is a note to let you know that I've just added the patch titled
iio: light: al3320a: read both ALS ADC registers again
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-next branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will also be merged in the next major kernel release during the merge window.
If you have any questions about this process, please let me know.
From 744bccc2647c6b2206290e8e40890a23812116b3 Mon Sep 17 00:00:00 2001
From: "Alexander A. Klimov" <[email protected]>
Date: Sat, 23 May 2026 13:44:58 +0200
Subject: iio: light: al3320a: read both ALS ADC registers again
al3320a_read_raw() used to read two adjacent registers until the driver was modernized using the regmap framework. That cleanup accidentally replaced the 16-bit word read with a single byte read. I'm reverting latter.
--- drivers/iio/light/al3320a.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/iio/light/al3320a.c +5 -3
@@ -135,7 +135,8 @@ static int al3320a_read_raw(struct iio_dev *indio_dev, int *val2, long mask) {struct al3320a_data *data =iio_priv (indio_dev); -int ret, gain, raw; +int ret, gain; +__le16 raw;switch (mask) {case IIO_CHAN_INFO_RAW :
@@ -144,11 +145,12 @@ static int al3320a_read_raw(struct iio_dev *indio_dev,* - low byte of output is stored at AL3320A_REG_DATA_LOW * - high byte of output is stored at AL3320A_REG_DATA_LOW + 1 */ - ret =regmap_read (data->regmap,AL3320A_REG_DATA_LOW , &raw); + ret =regmap_bulk_read (data->regmap,AL3320A_REG_DATA_LOW , + &raw,sizeof (raw));if (ret)return ret; - *val = raw; + *val =le16_to_cpu (raw);return IIO_VAL_INT ;case IIO_CHAN_INFO_SCALE :
Signature · 1 line
2.54.0