diff options
author | Sean Nyekjaer <sean@geanix.com> | 2025-05-05 22:20:08 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2025-05-15 19:17:02 +0300 |
commit | 9c78317b42e7c32523c91099859bc4721e9f75dd (patch) | |
tree | 11c2458ceebd77ff3aeb7f9650abc397bddee95d | |
parent | 16038474e3a0263572f36326ef85057aaf341814 (diff) | |
download | linux-9c78317b42e7c32523c91099859bc4721e9f75dd.tar.xz |
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: a3e0b51884ee ("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>
-rw-r--r-- | drivers/iio/accel/fxls8962af-core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/accel/fxls8962af-core.c b/drivers/iio/accel/fxls8962af-core.c index 5f5e917f7aa5..ae965a8f560d 100644 --- a/drivers/iio/accel/fxls8962af-core.c +++ b/drivers/iio/accel/fxls8962af-core.c @@ -749,6 +749,7 @@ static const struct iio_event_spec fxls8962af_event[] = { BIT(IIO_CHAN_INFO_OFFSET),\ .scan_index = -1, \ .scan_type = { \ + .sign = 's', \ .realbits = 8, \ .storagebits = 8, \ }, \ |