linux_dsm_epyc7002/drivers/iio/common/st_sensors
Linus Walleij 6436db37b4 iio: st_sensors: read each channel individually
The current buffer read code tries to optimize reads from the
sensor data registers by issuing a single read operation across
all the indata registers.

This doesn't work: when the LIS331DL accelerometer sensor is
configured to open drain, active low interrupt mode, this will
just clear the XDA (X-axis data available) bit in the STATUS_REG
register (0x27), while YDA, ZDA and even ZYXDA remain set to 1,
and the internal logic of the sensor holds the DRDY (INT1) line
asserted (the value of the status register is 0xee).

If we instead issue one read operation per enabled channel
(X, Y, Z) things start working and we can use open drain and
active low interrupts.

Note that a backported patch fixing this issue will be heading
via the fixes branch but changes in this file already in staging-next
will make that patch 'look' rather different.  The code in here
is the correct one when that clash hits.

Cc: Giuseppe Barba <giuseppe.barba@st.com>
Cc: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2016-04-19 19:58:11 +01:00
..
Kconfig
Makefile
st_sensors_buffer.c iio: st_sensors: read each channel individually 2016-04-19 19:58:11 +01:00
st_sensors_core.c iio: st_sensors: support active-low interrupts 2016-01-10 12:35:32 +00:00
st_sensors_core.h iio: st_sensors: support active-low interrupts 2016-01-10 12:35:32 +00:00
st_sensors_i2c.c iio:common: Set the device pointer into ST common sensors library 2014-10-04 11:26:21 +01:00
st_sensors_spi.c iio: common: remove unnecessary sizeof(u8) 2014-12-12 12:28:25 +00:00
st_sensors_trigger.c iio: st_sensors: support active-low interrupts 2016-01-10 12:35:32 +00:00