linux/drivers/iio/chemical
Fiona Klute de8755ae29 iio: chemical: scd4x: fix reported channel endianness
commit 81d5a5366d upstream.

The driver converts values read from the sensor from BE to CPU
endianness in scd4x_read_meas(). The result is then pushed into the
buffer in scd4x_trigger_handler(), so on LE architectures parsing the
buffer using the reported BE type gave wrong results.

scd4x_read_raw() which provides sysfs *_raw values is not affected, it
used the values returned by scd4x_read_meas() without further
conversion.

Fixes: 49d22b695c ("drivers: iio: chemical: Add support for Sensirion SCD4x CO2 sensor")
Signed-off-by: Fiona Klute <fiona.klute@gmx.de>
Reviewed-by: David Lechner <dlechner@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 2026-01-30 10:32:23 +01:00
..
ags02ma.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
ams-iaq-core.c iio: chemical: ams-iaq-core: clean up codestyle warning 2024-06-08 14:44:28 +01:00
atlas-ezo-sensor.c iio: chemical: atlas-ezo-sensor: make atlas_ezo_devices const 2025-07-06 10:37:52 +01:00
atlas-sensor.c iio: chemical: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:34 +01:00
bme680.h iio: chemical: bme680: add power management 2024-12-11 19:20:49 +00:00
bme680_core.c iio: chemical: Remove redundant pm_runtime_mark_last_busy() calls 2025-08-25 15:57:34 +01:00
bme680_i2c.c iio: normalize array sentinel style 2025-04-22 19:10:04 +01:00
bme680_spi.c iio: chemical: bme680_spi: remove bits_per_word = 8 2025-05-21 14:20:30 +01:00
ccs811.c iio: chemical: Use iio_push_to_buffers_with_ts() to provide length for runtime checks. 2025-05-21 14:20:26 +01:00
ens160.h iio: chemical: ens160: add power management support 2024-06-13 19:19:26 +01:00
ens160_core.c iio: chemical: Remove dev_err_probe() if error is -ENOMEM 2025-08-25 09:40:24 +01:00
ens160_i2c.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
ens160_spi.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
Kconfig iio: chemical: Add driver for SEN0322 2025-05-21 14:22:32 +01:00
Makefile iio: chemical: Add driver for SEN0322 2025-05-21 14:22:32 +01:00
mhz19b.c iio: chemical: mhz19b: Fix error code in probe() 2025-05-21 14:21:08 +01:00
pms7003.c IIO: New device support, features and cleanup for 6.16 - take 2 2025-05-22 15:54:52 +02:00
scd4x.c iio: chemical: scd4x: fix reported channel endianness 2026-01-30 10:32:23 +01:00
scd30.h iio: chemical: scd30: Export dev_pm_ops instead of suspend() and resume() 2022-04-05 20:16:34 +02:00
scd30_core.c iio: chemical: Remove dev_err_probe() if error is -ENOMEM 2025-08-25 09:40:24 +01:00
scd30_i2c.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
scd30_serial.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
sen0322.c iio: chemical: Add driver for SEN0322 2025-05-21 14:22:32 +01:00
sgp30.c iio: chemical: sgp30: Convert enum->pointer for data in the match tables 2023-09-12 10:42:03 +01:00
sgp40.c iio: sgp40: retain documentation in driver 2024-08-21 21:28:02 +01:00
sps30.c IIO: New device support, features and cleanup for 6.16 - take 2 2025-05-22 15:54:52 +02:00
sps30.h iio: sps30: separate core and interface specific code 2021-05-17 13:49:10 +01:00
sps30_i2c.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
sps30_serial.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
sunrise_co2.c iio: chemical: sunrise_co2: use = { } instead of memset() 2025-06-26 19:32:56 +01:00
vz89x.c iio: chemical: vz89x: Convert enum->pointer for data in the match tables 2023-09-11 20:12:41 +01:00