linux/drivers/iio/magnetometer
Lorenzo Bianconi e72a060151 iio: st_sensors: add register mask for status register
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>
2017-10-09 21:01:45 +01: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: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:32:52 +01: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
bmc150_magn_i2c.c
bmc150_magn_spi.c
hid-sensor-magn-3d.c iio:magnetometer: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:32:52 +01:00
hmc5843.h
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
hmc5843_spi.c
Kconfig iio: magnetometer: ak8974: support AMI306 variant 2017-08-20 11:18:33 +01:00
mag3110.c iio:magnetometer: drop assign iio_info.driver_module and iio_trigger_ops.owner 2017-08-22 21:32:52 +01:00
Makefile
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
st_magn_core.c iio: st_sensors: add register mask for status register 2017-10-09 21:01:45 +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