]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
iio: accel: fix ADXL355 temperature signature value
authorValek Andrej <andrej.v@skyrain.eu>
Fri, 13 Mar 2026 09:24:13 +0000 (10:24 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 22 Mar 2026 11:43:00 +0000 (11:43 +0000)
Temperature was wrongly represented as 12-bit signed, confirmed by checking
the datasheet. Even if the temperature is negative, the value in the
register stays unsigned.

Fixes: 12ed27863ea3 iio: accel: Add driver support for ADXL355
Signed-off-by: Valek Andrej <andrej.v@skyrain.eu>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/adxl355_core.c

index 1c1d64d5cbcb208a6e46fa9b00a7fe24a05d39d0..8f90c58f41008a729e8442853703bb888580497e 100644 (file)
@@ -745,7 +745,7 @@ static const struct iio_chan_spec adxl355_channels[] = {
                                      BIT(IIO_CHAN_INFO_OFFSET),
                .scan_index = 3,
                .scan_type = {
-                       .sign = 's',
+                       .sign = 'u',
                        .realbits = 12,
                        .storagebits = 16,
                        .endianness = IIO_BE,