iio: imu: st_lsm6dsx: track hw FIFO buffering with fifo_mask
authorLorenzo Bianconi <lorenzo@kernel.org>
Thu, 28 Nov 2019 15:42:30 +0000 (17:42 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 8 Dec 2019 18:10:30 +0000 (18:10 +0000)
commitc2686eb2aed322c642b5a291d5b9d67fe4301d4a
tree7d2bc606473667064f8d5f5e1b6a4e8e211ed969
parent5685b145c138b2ca696076106d0fb87b7b90b14a
iio: imu: st_lsm6dsx: track hw FIFO buffering with fifo_mask

Track hw FIFO state introducing fifo_mask since now the accel sensor
can be enabled during suspend/resume in order to trigger the wake-up
enabling the FIFO in st_lsm6dsx_resume even if it was disabled before
the suspend.  Hence we must separately track the fifo state.

Fixes: 4c997dfa692d ("iio: imu: st_lsm6dsx: add wakeup-source option")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Tested-by: Sean Nyekjaer <sean@geanix.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c