OSDN Git Service

iio: imu: st_lsm6dsx: do not power-off accel if events are enabled
authorLorenzo Bianconi <lorenzo@kernel.org>
Fri, 29 Nov 2019 09:37:24 +0000 (11:37 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 8 Dec 2019 18:10:30 +0000 (18:10 +0000)
commitbd41c445b7b96e46efb799ff33bdf870479488cf
tree398bb6487127d469f641610a30e1fa6de4219a75
parentc2686eb2aed322c642b5a291d5b9d67fe4301d4a
iio: imu: st_lsm6dsx: do not power-off accel if events are enabled

Do not power-off accel unconditionally if wake-up events are enabled
powering off the hw FIFO. At the same time do not power-off the accel
sensor if it is 'batched' in the hw FIFO disabling sensor events

Fixes: b5969abfa8b8 ("iio: imu: st_lsm6dsx: add motion events")
Tested-by: Sean Nyekjaer <sean@geanix.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c