]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: accel: fxls8962af: Fix temperature scan element sign
authorSean Nyekjaer <sean@geanix.com>
Mon, 5 May 2025 19:20:08 +0000 (21:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:07:31 +0000 (11:07 +0100)
commit228c6c61fa2b49521c8fdb7a663330e4919b07a9
tree4699c569f5a6cf53c5c3b9360331dc304d827563
parentd598d95ca407c41f637e7caa4a2c4c8d8ed34be7
iio: accel: fxls8962af: Fix temperature scan element sign

commit 9c78317b42e7c32523c91099859bc4721e9f75dd upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/accel/fxls8962af-core.c