WSL2-Linux-Kernel/drivers/iio/humidity
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
..
Kconfig iio: humidity: hts221: add regmap API support 2018-01-30 18:33:18 +00:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
am2315.c iio:humidity: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:30:20 +01:00
dht11.c iio: dht11: Improve detection of sensor type 2018-02-17 12:03:16 +00:00
hdc100x.c iio: add SPDX identifier for various drivers 2018-02-18 11:55:19 +00:00
hid-sensor-humidity.c iio/hid-sensors: Fix IIO_CHAN_INFO_RAW returning wrong values for signed numbers 2018-11-16 11:42:12 +00:00
hts221.h iio: humidity: hts221: add regmap API support 2018-01-30 18:33:18 +00:00
hts221_buffer.c iio: humidity: hts221: add regmap API support 2018-01-30 18:33:18 +00:00
hts221_core.c iio: humidity: hts221: remove unnecessary get_unaligned_le16() 2018-01-30 18:33:19 +00:00
hts221_i2c.c iio: humidity: hts221: add regmap API support 2018-01-30 18:33:18 +00:00
hts221_spi.c iio: humidity: hts221: add regmap API support 2018-01-30 18:33:18 +00:00
htu21.c iio:humidity: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:30:20 +01:00
si7005.c iio:humidity: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:30:20 +01:00
si7020.c iio:humidity: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:30:20 +01:00