alistair23-linux/drivers/iio/magnetometer
Hans de Goede 0145b50566 iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers
Before this commit sensor_hub_input_attr_get_raw_value() failed to take
the signedness of 16 and 8 bit values into account, returning e.g.
65436 instead of -100 for the z-axis reading of an accelerometer.

This commit adds a new is_signed parameter to the function and makes all
callers pass the appropriate value for this.

While at it, this commit also fixes up some neighboring lines where
statements were needlessly split over 2 lines to improve readability.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2018-11-16 11:42:12 +00:00
..
ak8974.c iio:magnetometer: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:32:52 +01:00
ak8975.c iio: magnetometer: ak8975: Add another ACPI ID 2017-12-02 10:40:02 +00:00
bmc150_magn.c iio:magnetometer: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:32:52 +01:00
bmc150_magn.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bmc150_magn_i2c.c iio: magnetometer: bmc150_magn_i2c: Add OF device ID table 2017-03-19 10:50:10 +00:00
bmc150_magn_spi.c iio: magn: Add support for BMM150 magnetometer 2016-05-21 17:37:21 +01:00
hid-sensor-magn-3d.c iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers 2018-11-16 11:42:12 +00:00
hmc5843.h iio: magnetometer: hmc5843: Fixed a comment error. 2018-09-22 10:23:51 +01:00
hmc5843_core.c iio:magnetometer: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:32:52 +01:00
hmc5843_i2c.c iio: hmc5843: Move hmc5843 out of staging 2016-02-24 20:40:39 +00:00
hmc5843_spi.c iio: hmc5843: Move hmc5843 out of staging 2016-02-24 20:40:39 +00:00
Kconfig iio: magnetometer: ak8974: support AMI306 variant 2017-08-20 11:18:33 +01:00
mag3110.c iio: magnetometer: mag3110: Add ability to run in continuous mode 2018-05-12 11:01:59 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mmc35240.c iio:magnetometer: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:32:52 +01:00
st_magn.h iio: magnetometer: add support to LIS2MDL 2017-08-17 15:51:39 +01:00
st_magn_buffer.c iio:st_magn: Fix enable device after trigger 2018-11-03 11:24:07 +00:00
st_magn_core.c iio: magnetometer: st_magn: add SPI-3wire support to LIS3MDL 2017-10-10 20:36:33 +01:00
st_magn_i2c.c iio: magnetometer: add support to LIS2MDL 2017-08-17 15:51:39 +01:00
st_magn_spi.c iio: magnetometer: add support to LIS2MDL 2017-08-17 15:51:39 +01:00