iio: imu: st_lsm6dsx: add system power management support
authorLorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Thu, 27 Apr 2017 20:31:56 +0000 (22:31 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 30 Apr 2017 16:55:15 +0000 (17:55 +0100)
commitd3f770582aeb11db9d8b433d6ee23bdfab3422a2
tree53a0f0fe1eaf7d5796a9c91cd3b932997dbd0133
parent535de397b28a3e24bf93da19dc9581936e420eea
iio: imu: st_lsm6dsx: add system power management support

Add system sleep power management support to st_lsm6dsx driver.
In particular during suspend phase each sensor is disabled and
hw fifo is configured in bypass in order to avoid subsequent
I/O operations. The patch has been tested on HiKey board device

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c