summaryrefslogtreecommitdiff
path: root/drivers/iio/gyro
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2016-03-24 14:18:04 +0100
committerJonathan Cameron <jic23@kernel.org>2016-04-19 19:58:11 +0100
commit6436db37b4a5da1ae1f381e4791e17e2236fd276 (patch)
tree42f70f16fa231520f1bf6691decce196eb4ffe90 /drivers/iio/gyro
parent850c25c857647e4095c4290e32eb62395f9c8117 (diff)
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>
Diffstat (limited to 'drivers/iio/gyro')
0 files changed, 0 insertions, 0 deletions