linux_dsm_epyc7002/drivers/iio
Stephan Gerhold b500c086e4 iio: magnetometer: ak8974: Fix negative raw values in sysfs
At the moment, reading from in_magn_*_raw in sysfs tends to return
large values around 65000, even though the output of ak8974 is actually
limited to ±32768. This happens because the value is never converted
to the signed 16-bit integer variant.

Add an explicit cast to s16 to fix this.

Fixes: 7c94a8b2ee ("iio: magn: add a driver for AK8974")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Reviewed-by: Linus Waleij <linus.walleij@linaro.org>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-02-21 11:59:46 +00:00
..
accel iio: accel: kxcjk1013: Support orientation matrix 2020-01-18 14:26:13 +00:00
adc iio: adc: stm32-dfsdm: fix sleep in atomic context 2020-02-02 14:07:49 +00:00
afe
amplifiers
buffer iio: buffer: rename 'read_first_n' callback to 'read' 2019-12-29 15:20:09 +00:00
chemical Merge 5.5-rc7 into staging-next 2020-01-22 09:05:34 +01:00
common iio: st_sensors: Make use of device properties 2020-01-13 21:53:39 +00:00
dac iio: dac: stm32-dac: better handle reset controller failures 2020-01-18 14:32:01 +00:00
dummy
frequency iio: adf4350: Convert to use GPIO descriptor 2019-12-15 11:42:16 +00:00
gyro iio: st_sensors: Make use of device properties 2020-01-13 21:53:39 +00:00
health
humidity iio: humidity: dht11 remove TODO since it doesn't make sense 2020-01-12 11:34:15 +00:00
imu Merge 5.5-rc7 into staging-next 2020-01-22 09:05:34 +01:00
light Merge 5.5-rc7 into staging-next 2020-01-22 09:05:34 +01:00
magnetometer iio: magnetometer: ak8974: Fix negative raw values in sysfs 2020-02-21 11:59:46 +00:00
multiplexer
orientation
potentiometer
potentiostat
pressure iio: st_sensors: Make use of device properties 2020-01-13 21:53:39 +00:00
proximity iio: as3935: Drop GPIO includes 2019-12-15 11:42:15 +00:00
resolver iio: ad2s1200: Drop legacy include 2019-12-15 11:42:15 +00:00
temperature First set of new device support, features and cleanups for IIO in the 5.6 cycle 2020-01-10 10:44:00 +01:00
trigger iio: trigger: stm32-timer: disable master mode when stopping 2020-02-15 18:41:00 +00:00
iio_core_trigger.h
iio_core.h iio: buffer: rename 'read_first_n' callback to 'read' 2019-12-29 15:20:09 +00:00
industrialio-buffer.c Merge 5.5-rc7 into staging-next 2020-01-22 09:05:34 +01:00
industrialio-configfs.c
industrialio-core.c First set of new device support, features and cleanups for IIO in the 5.6 cycle 2020-01-10 10:44:00 +01:00
industrialio-event.c
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c
industrialio-triggered-event.c
inkern.c
Kconfig
Makefile