aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo.bianconi83@gmail.com>2017-04-27 22:31:56 +0200
committerJonathan Cameron <jic23@kernel.org>2017-04-30 17:55:15 +0100
commitd3f770582aeb11db9d8b433d6ee23bdfab3422a2 (patch)
tree53a0f0fe1eaf7d5796a9c91cd3b932997dbd0133 /drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c
parentiio: imu: st_lsm6dsx: modify st_lsm6dsx_flush_fifo and st_lsm6dsx_set_fifo_mode scope (diff)
downloadlinux-dev-d3f770582aeb11db9d8b433d6ee23bdfab3422a2.tar.xz
linux-dev-d3f770582aeb11db9d8b433d6ee23bdfab3422a2.zip
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>
Diffstat (limited to 'drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c')
-rw-r--r--drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c
index f765a5058488..95472f153ad2 100644
--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c
+++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c
@@ -115,6 +115,7 @@ MODULE_DEVICE_TABLE(spi, st_lsm6dsx_spi_id_table);
static struct spi_driver st_lsm6dsx_driver = {
.driver = {
.name = "st_lsm6dsx_spi",
+ .pm = &st_lsm6dsx_pm_ops,
.of_match_table = of_match_ptr(st_lsm6dsx_spi_of_match),
},
.probe = st_lsm6dsx_spi_probe,