OpenCloudOS-Kernel/drivers/iio
Dumitru Ceclan f7dc14df1b iio: adc: ad7124: fix DT configuration parsing
[ Upstream commit 61cbfb5368dd50ed0d65ce21d305aa923581db2b ]

The cfg pointer is set before reading the channel number that the
configuration should point to. This causes configurations to be shifted
by one channel.
For example setting bipolar to the first channel defined in the DT will
cause bipolar mode to be active on the second defined channel.

Fix by moving the cfg pointer setting after reading the channel number.

Fixes: 7b8d045e49 ("iio: adc: ad7124: allow more than 8 channels")
Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20240806085133.114547-1-dumitru.ceclan@analog.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-09-18 19:24:04 +02:00
..
accel iio: accel: fxls8962af: select IIO_BUFFER & IIO_KFIFO_BUF 2024-07-05 09:33:57 +02:00
adc iio: adc: ad7124: fix DT configuration parsing 2024-09-18 19:24:04 +02:00
addac iio: addac: Kconfig: update ad74413r selections 2023-10-05 18:06:45 +01:00
afe iio: afe: rescale: Accept only offset channels 2023-10-17 20:25:32 +01:00
amplifiers iio: amplifiers: ad8366: add support for HMC792A Attenuator 2023-07-23 12:22:56 +01:00
buffer iio: buffer-dmaengine: fix releasing dma channel on error 2024-09-12 11:11:40 +02:00
cdc iio: cdc: ad7150: relax return value check for IRQ get 2023-08-01 18:55:55 +01:00
chemical iio: chemical: bme680: Fix sensor data read operation 2024-07-05 09:33:58 +02:00
common iio: invensense: fix interrupt timestamp alignment 2024-06-21 14:38:42 +02:00
dac iio: dac: ad5592r: fix temperature channel scaling value 2024-06-21 14:38:37 +02:00
dummy Bitmap patches for 5.19-rc1 2022-06-04 14:04:27 -07:00
filter drivers: iio: filter: admv8818: add bypass mode 2023-08-08 09:51:06 +01:00
frequency iio: frequency: adrf6780: rm clk provider include 2024-08-03 08:53:56 +02:00
gyro iio: Switch i2c drivers back to use .probe() 2023-05-21 18:54:53 +01:00
health iio: Switch i2c drivers back to use .probe() 2023-05-21 18:54:53 +01:00
humidity iio: Switch i2c drivers back to use .probe() 2023-05-21 18:54:53 +01:00
imu iio: imu: inv_icm42600: delete unneeded update watermark call 2024-06-21 14:38:37 +02:00
light iio: hid-sensor-als: Return 0 for HID_USAGE_SENSOR_TIME_TIMESTAMP 2024-02-23 09:24:56 +01:00
magnetometer iio: magnetometer: rm3100: add boundary check for the value read from RM3100_REG_TMRC 2024-02-23 09:25:06 +01:00
multiplexer iio: multiplexer: Switch to use dev_err_probe() helper 2022-11-23 19:43:57 +00:00
orientation
position
potentiometer iio: potentiometer: mcp4531: Use i2c_get_match_data() 2023-07-29 15:55:48 +01:00
potentiostat iio: Switch i2c drivers back to use .probe() 2023-05-21 18:54:53 +01:00
pressure iio: pressure: bmp280: Fix BMP580 temperature reading 2024-07-05 09:33:42 +02:00
proximity iio: irsd200: fix -Warray-bounds bug in irsd200_trigger_handler 2023-10-05 18:06:45 +01:00
resolver iio: resolver: ad2s90: Fix alignment for DMA safety 2022-06-14 11:53:19 +01:00
temperature iio: adc: Explicitly include correct DT includes 2023-07-23 13:38:13 +01:00
test iio: test: Mark file local structure arrays static. 2022-08-15 22:30:01 +01:00
trigger iio: trigger: stm32-lptimer-trigger: remove unneeded platform_set_drvdata() 2023-08-05 19:29:39 +01:00
Kconfig iio: add the IIO backend framework 2024-06-12 11:12:21 +02:00
Makefile iio: add the IIO backend framework 2024-06-12 11:12:21 +02:00
TODO iio: core: move 'mlock' to 'struct iio_dev_opaque' 2022-11-23 19:44:00 +00:00
iio_core.h
iio_core_trigger.h
industrialio-backend.c iio: add the IIO backend framework 2024-06-12 11:12:21 +02:00
industrialio-buffer.c iio: buffer: fix coding style warnings 2023-05-13 17:56:06 +01:00
industrialio-configfs.c
industrialio-core.c driver: iio: add missing checks on iio_info's callback access 2024-09-08 07:54:47 +02:00
industrialio-event.c driver: iio: add missing checks on iio_info's callback access 2024-09-08 07:54:47 +02:00
industrialio-gts-helper.c iio: Fix the sorting functionality in iio_gts_build_avail_time_table 2024-08-03 08:53:55 +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: trigger: Fix condition for own trigger 2024-07-18 13:21:20 +02:00
industrialio-triggered-event.c
inkern.c iio: fix scale application in iio_convert_raw_to_processed_unlocked 2024-09-12 11:11:40 +02:00