iio: pressure: bmp280: add power management
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 30 Jun 2016 01:48:53 +0000 (03:48 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 3 Jul 2016 10:32:14 +0000 (11:32 +0100)
commit3d838118c6aa73ae28e49bd9a014e2e9bd6ed3ab
treefd7be968315ad6ba5922a49a6e441b8858fac80d
parentaae9539496510a728bfe7d555b3ecfd5a146359a
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>
drivers/iio/pressure/bmp280-core.c
drivers/iio/pressure/bmp280-i2c.c
drivers/iio/pressure/bmp280-spi.c
drivers/iio/pressure/bmp280.h