]> 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:05:27 +0000 (11:05 +0100)
commite401d55901a83cf022b81d28e892c69f356a6321
tree19a820ac752492e2a242ef8b9f0f636820f31e06
parentfe551adf4bd399111fb31e01fce1b53bdfb26bca
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