linux/drivers/iio/proximity
David Lechner 993e0cadd8 iio: proximity: isl29501: fix buffered read on big-endian systems
commit de18e978d0 upstream.

Fix passing a u32 value as a u16 buffer scan item. This works on little-
endian systems, but not on big-endian systems.

A new local variable is introduced for getting the register value and
the array is changed to a struct to make the data layout more explicit
rather than just changing the type and having to recalculate the proper
length needed for the timestamp.

Fixes: 1c28799257 ("iio: light: isl29501: Add support for the ISL29501 ToF sensor.")
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://patch.msgid.link/20250722-iio-use-more-iio_declare_buffer_with_ts-7-v2-1-d3ebeb001ed3@baylibre.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-08-28 16:31:09 +02:00
..
as3935.c iio: Rename iio_trigger_poll_chained and add kernel-doc 2023-03-11 12:18:29 +00:00
aw96103.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
cros_ec_mkbp_proximity.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hx9023s.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
irsd200.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
isl29501.c iio: proximity: isl29501: fix buffered read on big-endian systems 2025-08-28 16:31:09 +02:00
Kconfig iio: proximity: mb1232: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig 2024-10-06 16:30:15 +01:00
Makefile iio: proximity: aw96103: Add support for aw96103/aw96105 proximity sensor 2024-09-05 19:27:06 +01:00
mb1232.c iio: mb1232: relax return value check for IRQ get 2023-08-01 18:55:46 +01:00
ping.c iio: proximity: ping: fix typo in comment 2022-06-11 14:35:27 +01:00
pulsedlight-lidar-lite-v2.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
rfd77402.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00
srf04.c iio: proximity: srf04: Convert to platform remove callback returning void 2023-09-23 15:06:56 +01:00
srf08.c iio: Switch i2c drivers back to use .probe() 2023-05-21 18:54:53 +01:00
sx9310.c iio: proximity: sx9310: Use automated cleanup for locks and IIO mode claiming. 2024-02-17 16:16:11 +00:00
sx9324.c iio: proximity: sx9324: make use of regmap_set_bits() 2024-06-25 21:04:48 +01:00
sx9360.c iio: proximity: sx9360: make use of regmap_set_bits() 2024-06-25 21:04:48 +01:00
sx9500.c iio: proximity: sx9500: make use of iio_for_each_active_channel() 2024-08-03 10:13:41 +01:00
sx_common.c iio: proximity: sx_common: make use of iio_for_each_active_channel() 2024-08-03 10:13:41 +01:00
sx_common.h iio: proximity: sx_common: Add old register mapping 2023-03-11 12:18:28 +00:00
vcnl3020.c iio: Switch i2c drivers back to use .probe() 2023-05-21 18:54:53 +01:00
vl53l0x-i2c.c iio: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-27 09:48:57 +01:00