linux/drivers/iio
Javier Carrasco 71c3926459 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-21 13:49:48 +01:00
..
accel iio: accel: bma400: Fix uninitialized variable field_value in tap event handling. 2024-11-01 01:55:56 +01:00
adc iio: adc: rockchip_saradc: fix information leak in triggered buffer 2025-01-23 17:17:16 +01:00
addac iio: addac: Kconfig: update ad74413r selections 2023-10-19 23:08:55 +02:00
afe iio: afe: rescale: Accept only offset channels 2023-11-02 09:35:29 +01:00
amplifiers iio: amplifiers: ada4250: add missing select REGMAP_SPI in Kconfig 2024-10-22 15:56:47 +02:00
buffer iio: buffer-dmaengine: fix releasing dma channel on error 2024-09-12 11:10:26 +02:00
cdc iio: cdc: ad7746: Move driver out of staging. 2022-08-15 22:30:01 +01:00
chemical iio: chemical: bme680: Fix read/write ops to device by adding mutexes 2024-10-17 15:21:11 +02:00
common iio: hid-sensors: Fix an error handling path in _hid_sensor_set_report_latency() 2024-10-22 15:56:47 +02:00
dac iio: dac: ad3552r: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig 2024-10-22 15:56:48 +02:00
dummy iio: dummy: iio_simply_dummy_buffer: fix information leak in triggered buffer 2025-01-17 13:34:45 +01:00
filter iio:filter:admv8818: select REGMAP_SPI for ADMV8818 2022-04-04 09:19:01 +01:00
frequency iio: frequency: admv4420: fix missing select REMAP_SPI in Kconfig 2024-11-01 01:55:58 +01:00
gyro iio: gyro: fxas21002c: Fix missing data update in trigger handler 2025-01-17 13:34:46 +01:00
health iio: health: afe4404: Fix oob read in afe4404_[read|write]_raw 2022-11-12 16:30:23 +00:00
humidity i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
imu iio: imu: inv_icm42600: fix timestamps after suspend if sensor is on 2025-01-23 17:17:15 +01:00
light iio: light: as73211: fix channel handling in only-color triggered buffer 2025-02-21 13:49:48 +01:00
magnetometer iio: magnetometer: yas530: use signed integer type for clamp limits 2024-12-14 19:54:31 +01:00
multiplexer iio: multiplexer: Make use of device properties 2022-04-04 09:11:24 +01:00
orientation iio: hid-sensors: bind IIO channels alloc to device object 2021-07-13 18:21:53 +01:00
position iio: hid-sensors: Update header includes 2021-06-16 14:53:13 +01:00
potentiometer iio: potentiometer: mcp4131: Fix alignment for DMA safety 2022-06-14 11:53:19 +01:00
potentiostat i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
pressure iio: pressure: zpa2326: fix information leak in triggered buffer 2025-01-17 13:34:45 +01:00
proximity iio: proximity: mb1232: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig 2024-10-22 15:56:48 +02:00
resolver iio: resolver: ad2s90: Fix alignment for DMA safety 2022-06-14 11:53:19 +01:00
temperature iio: temperature: ltc2983: make bulk write buffer DMA-safe 2022-12-31 13:32:40 +01:00
test iio: test: Mark file local structure arrays static. 2022-08-15 22:30:01 +01:00
trigger iio: trigger: sysfs: fix possible memory leak in iio_sysfs_trig_init() 2022-10-24 18:48:57 +01:00
iio_core.h iio: Mark iio_device_type as const 2021-11-17 17:51:35 +00:00
iio_core_trigger.h iio: core-trigger: make iio_device_register_trigger_consumer() an int return 2021-03-11 20:47:02 +00:00
industrialio-buffer.c iio: buffer: make sure O_NONBLOCK is respected 2023-04-13 16:55:27 +02:00
industrialio-configfs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
industrialio-core.c driver: iio: add missing checks on iio_info's callback access 2024-09-08 07:53:11 +02:00
industrialio-event.c driver: iio: add missing checks on iio_info's callback access 2024-09-08 07:53:11 +02:00
industrialio-sw-device.c iio: Don't use bare "unsigned" 2022-07-01 11:19:08 +01:00
industrialio-sw-trigger.c iio: core: Fix entry not deleted when iio_register_sw_trigger_type() fails 2022-11-12 17:53:35 +00:00
industrialio-trigger.c iio: Add blank lines after declarations. 2022-08-15 22:29:56 +01:00
industrialio-triggered-event.c iio: core: move @id from struct iio_dev to struct iio_dev_opaque 2021-05-17 13:49:13 +01:00
inkern.c iio: inkern: call iio_device_put() only on mapped devices 2025-01-17 13:34:46 +01:00
Kconfig iio: add filter subfolder 2021-12-16 17:29:46 +00:00
Makefile iio: add filter subfolder 2021-12-16 17:29:46 +00:00
TODO iio: add a TODO 2020-03-08 17:28:53 +00:00