linux/drivers/iio/light
Javier Carrasco 5f4a056178 iio: light: as73211: fix channel handling in only-color triggered buffer
commit ab09c6cfe0 upstream.

The channel index is off by one unit if AS73211_SCAN_MASK_ALL is not
set (optimized path for color channel readings), and it must be shifted
instead of leaving an empty channel for the temperature when it is off.

Once the channel index is fixed, the uninitialized channel must be set
to zero to avoid pushing uninitialized data.

Add available_scan_masks for all channels and only-color channels to let
the IIO core demux and repack the enabled channels.

Cc: stable@vger.kernel.org
Fixes: 403e5586b5 ("iio: light: as73211: New driver")
Tested-by: Christian Eggers <ceggers@arri.de>
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20241214-iio_memset_scan_holes-v4-1-260b395b8ed5@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-02-17 10:05:31 +01:00
..
acpi-als.c iio: Rename iio_trigger_poll_chained and add kernel-doc 2023-03-11 12:18:29 +00:00
adjd_s311.c iio: light: adjd_s311: make use of iio_for_each_active_channel() 2024-08-03 10:13:40 +01:00
adux1020.c iio: light: adux1020: make use of regmap_clear_bits(), regmap_set_bits() 2024-06-25 21:04:47 +01:00
al3010.c iio: light: al3010: Fix an error handling path in al3010_probe() 2024-12-05 14:02:35 +01:00
al3320a.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
apds9300.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
apds9306.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
apds9960.c iio: light: apds9960: Add proximity and gesture offset calibration 2024-08-10 11:17:35 +01:00
as73211.c iio: light: as73211: fix channel handling in only-color triggered buffer 2025-02-17 10:05:31 +01:00
bh1745.c iio: light: bh1745: fix information leak in triggered buffer 2025-01-17 13:40:56 +01:00
bh1750.c iio: Switch i2c drivers back to use .probe() 2023-05-21 18:54:53 +01:00
bh1780.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
cm3232.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
cm3323.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
cm3605.c iio: light: cm3605: Convert to platform remove callback returning void 2023-09-23 15:06:55 +01:00
cm32181.c iio: Switch i2c drivers back to use .probe() 2023-05-21 18:54:53 +01:00
cm36651.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
cros_ec_light_prox.c iio: cros: Register FIFO callback after sensor is registered 2022-07-18 18:29:13 +01:00
gp2ap002.c iio: light: gp2ap002: Constify struct regmap_bus 2024-07-29 20:31:10 +01:00
gp2ap020a00f.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hid-sensor-als.c IIO: 1st set of new device support, features and cleanup for 6.9 2024-02-25 14:11:41 +01:00
hid-sensor-prox.c iio: light: hid-sensor-prox: Convert to platform remove callback returning void 2023-09-23 15:06:55 +01:00
iqs621-als.c iio: light: iqs621-als: make use of regmap_clear_bits() 2024-06-25 21:04:47 +01:00
isl29018.c iio: light: isl29018: make use of regmap_clear_bits() 2024-06-25 21:04:47 +01:00
isl29028.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
isl29125.c iio: light: isl29125: make use of iio_for_each_active_channel() 2024-08-03 10:13:40 +01:00
isl76682.c iio: light: isl76682: remove unreachable code 2023-12-11 19:16:35 +00:00
jsa1212.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
Kconfig iio: light: bu27008: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig 2024-10-06 16:29:32 +01:00
lm3533-als.c iio: light: lm3533-als: Convert to platform remove callback returning void 2023-09-23 15:06:55 +01:00
ltr390.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
ltr501.c iio: light: ltr501: Add LTER0303 to the supported devices 2024-12-14 20:04:08 +01:00
ltrf216a.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
lv0104cs.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
Makefile iio: light: ROHM BH1745 colour sensor 2024-08-03 10:13:41 +01:00
max44000.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
max44009.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
noa1305.c iio: light: noa1305: Fix up integration time look up 2024-08-17 15:37:37 +01:00
opt3001.c iio: light: opt3001: add missing full-scale range value 2024-09-30 09:20:53 +01:00
opt4001.c iio: light: opt4001: Use i2c_get_match_data() 2023-09-12 10:42:03 +01:00
pa12203001.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
rohm-bu27008.c iio: bu27008: Add illuminance channel 2023-11-16 19:10:27 +00:00
rohm-bu27034.c iio: bu27034: Add a read only HARDWAREGAIN 2024-08-03 10:13:35 +01:00
rpr0521.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
si1133.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
si1145.c iio: light: si1145: use new '.masklength' accessors 2024-08-03 10:13:40 +01:00
st_uvis25.h iio:light:st_uvis25: Fix timestamp alignment and prevent data leak. 2020-12-03 19:40:27 +00:00
st_uvis25_core.c iio: light: st_uvis25_core: make use of regmap_clear_bits() 2024-06-25 21:04:47 +01:00
st_uvis25_i2c.c iio: Switch i2c drivers back to use .probe() 2023-05-21 18:54:53 +01:00
st_uvis25_spi.c iio: light: st_uvis25: Use EXPORT_NS_SIMPLE_DEV_PM_OPS() 2022-09-21 18:42:57 +01:00
stk3310.c iio: light: stk3310: add support for stk3013 2024-08-03 10:13:44 +01:00
tcs3414.c iio: light: tcs3414: make use of iio_for_each_active_channel() 2024-08-03 10:13:40 +01:00
tcs3472.c iio: light: tcs3472: make use of iio_for_each_active_channel() 2024-08-03 10:13:40 +01:00
tsl2563.c iio: Switch i2c drivers back to use .probe() 2023-05-21 18:54:53 +01:00
tsl2583.c iio: Switch i2c drivers back to use .probe() 2023-05-21 18:54:53 +01:00
tsl2591.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
tsl2772.c iio: Switch i2c drivers back to use .probe() 2023-05-21 18:54:53 +01:00
tsl4531.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
us5182d.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
vcnl4000.c iio: light: vcnl4000: Set ps high definition for 4040/4200 2024-02-17 16:16:09 +00:00
vcnl4035.c iio: light: vcnl4035: fix information leak in triggered buffer 2025-01-17 13:40:56 +01:00
veml6030.c iio: light: veml6030: fix microlux value calculation 2024-10-24 18:30:03 +01:00
veml6040.c iio: light: driver for Vishay VEML6040 2024-06-13 19:19:25 +01:00
veml6070.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
veml6075.c iio: light: add VEML6075 UVA and UVB light sensor driver 2023-12-04 13:57:25 +00:00
vl6180.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
zopt2201.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00