summaryrefslogtreecommitdiffstats
path: root/drivers/iio/pressure/bmp280.h
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2016-06-30 03:48:53 +0200
committerJonathan Cameron <jic23@kernel.org>2016-07-03 12:32:14 +0200
commit3d838118c6aa73ae28e49bd9a014e2e9bd6ed3ab (patch)
treefd7be968315ad6ba5922a49a6e441b8858fac80d /drivers/iio/pressure/bmp280.h
parentiio: pressure: bmp280: add support for BMP085 EOC interrupt (diff)
downloadlinux-3d838118c6aa73ae28e49bd9a014e2e9bd6ed3ab.tar.xz
linux-3d838118c6aa73ae28e49bd9a014e2e9bd6ed3ab.zip
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.h')
-rw-r--r--drivers/iio/pressure/bmp280.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iio/pressure/bmp280.h b/drivers/iio/pressure/bmp280.h
index 573334b8e93b..2c770e13be0e 100644
--- a/drivers/iio/pressure/bmp280.h
+++ b/drivers/iio/pressure/bmp280.h
@@ -107,3 +107,6 @@ int bmp280_common_probe(struct device *dev,
const char *name,
int irq);
int bmp280_common_remove(struct device *dev);
+
+/* PM ops */
+extern const struct dev_pm_ops bmp280_dev_pm_ops;