Skip to content

Commit 9c78317

Browse files
sknseanjic23
authored andcommitted
iio: accel: fxls8962af: Fix temperature scan element sign
Mark the temperature element signed, data read from the TEMP_OUT register is in two's complement format. This will avoid the temperature being mishandled and miss displayed. Fixes: a3e0b51 ("iio: accel: add support for FXLS8962AF/FXLS8964AF accelerometers") Suggested-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com> Cc: stable@vger.kernel.org Reviewed-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com> Signed-off-by: Sean Nyekjaer <sean@geanix.com> Link: https://patch.msgid.link/20250505-fxls-v4-2-a38652e21738@geanix.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 1603847 commit 9c78317

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/iio/accel/fxls8962af-core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,7 @@ static const struct iio_event_spec fxls8962af_event[] = {
749749
BIT(IIO_CHAN_INFO_OFFSET),\
750750
.scan_index = -1, \
751751
.scan_type = { \
752+
.sign = 's', \
752753
.realbits = 8, \
753754
.storagebits = 8, \
754755
}, \

0 commit comments

Comments
 (0)