linux-stable/drivers/iio
Lorenzo Bianconi d1f13dcad5 iio: st_sensors: add register mask for status register
[ Upstream commit e72a060151 ]

Introduce register mask for data-ready status register since
pressure sensors (e.g. LPS22HB) export just two channels
(BIT(0) and BIT(1)) and BIT(2) is marked reserved while in
st_sensors_new_samples_available() value read from status register
is masked using 0x7.
Moreover do not mask status register using active_scan_mask since
now status value is properly masked and if the result is not zero the
interrupt has to be consumed by the driver. This fix an issue on LPS25H
and LPS331AP where channel definition is swapped respect to status
register.
Furthermore that change allows to properly support new devices
(e.g LIS2DW12) that report just ZYXDA (data-ready) field in status register
to figure out if the interrupt has been generated by the device.

Fixes: 97865fe413 (iio: st_sensors: verify interrupt event to status)
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-25 14:26:26 +01:00
..
accel iio: st_sensors: add register mask for status register 2017-12-25 14:26:26 +01:00
adc iio: adc: meson-saradc: Meson8 and Meson8b do not have REG11 and REG13 2017-12-14 09:52:49 +01:00
amplifiers
buffer License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
chemical iio: chemical: ccs811: Add triggered buffer support 2017-08-18 08:08:02 +01:00
common iio: st_sensors: add register mask for status register 2017-12-25 14:26:26 +01:00
counter iio: counter: Add support for STM32 LPTimer 2017-09-04 14:49:30 +01:00
dac License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dummy License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
frequency
gyro iio: st_sensors: add register mask for status register 2017-12-25 14:26:26 +01:00
health iio: health: max30102: Temperature should be in milli Celsius 2017-12-14 09:52:48 +01:00
humidity License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
imu License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
light License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
magnetometer iio: st_sensors: add register mask for status register 2017-12-25 14:26:26 +01:00
multiplexer iio: multiplexer: add NULL check on devm_kzalloc() and devm_kmemdup() return values 2017-12-10 13:40:43 +01:00
orientation iio: orientation: hid-sensor-rotation: Drop unnecessary static 2017-07-17 21:45:01 +01:00
potentiometer License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
potentiostat iio: lmp91000: Set parent device 2017-02-19 12:01:52 +00:00
pressure iio: st_sensors: add register mask for status register 2017-12-25 14:26:26 +01:00
proximity License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
temperature License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
trigger License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
iio_core.h
iio_core_trigger.h
industrialio-buffer.c sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h> 2017-03-02 08:42:32 +01:00
industrialio-configfs.c
industrialio-core.c iio: core: Return error for failed read_reg 2017-09-24 16:58:32 +01:00
industrialio-event.c iio: iio_push_event(): Don't crash if the event interface is not registered 2016-09-10 16:40:44 +01:00
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c iio: trigger: fix NULL pointer dereference in iio_trigger_write_current() 2017-05-21 12:36:59 +01:00
industrialio-triggered-event.c
inkern.c First round of IIO new device support, features and cleanups for the 4.14 cycle. 2017-07-27 21:29:49 -07:00
Kconfig iio: multiplexer: new iio category and iio-mux driver 2017-06-03 19:29:26 +09:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00