diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2016-06-30 04:48:53 +0300 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-07-03 13:32:14 +0300 |
commit | 3d838118c6aa73ae28e49bd9a014e2e9bd6ed3ab (patch) | |
tree | fd7be968315ad6ba5922a49a6e441b8858fac80d /drivers/iio/pressure/bmp280-spi.c | |
parent | aae9539496510a728bfe7d555b3ecfd5a146359a (diff) | |
download | linux-3d838118c6aa73ae28e49bd9a014e2e9bd6ed3ab.tar.xz |
iio: pressure: bmp280: add power management
The PM280 has an internal standby-mode, but to really save power
we should shut the sensor down and disconnect the power. With
the proper .pm hooks we can enable both runtime and system power
management of the sensor. We use the *force callbacks from the
system PM hooks. When the sensor comes back we always reconfigure
it to make sure it is ready to roll as expected.
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/pressure/bmp280-spi.c')
-rw-r--r-- | drivers/iio/pressure/bmp280-spi.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/pressure/bmp280-spi.c b/drivers/iio/pressure/bmp280-spi.c index cd365ba74b68..17bc95586f9e 100644 --- a/drivers/iio/pressure/bmp280-spi.c +++ b/drivers/iio/pressure/bmp280-spi.c @@ -113,6 +113,7 @@ static struct spi_driver bmp280_spi_driver = { .driver = { .name = "bmp280", .of_match_table = bmp280_of_spi_match, + .pm = &bmp280_dev_pm_ops, }, .id_table = bmp280_spi_id, .probe = bmp280_spi_probe, |