From 3d838118c6aa73ae28e49bd9a014e2e9bd6ed3ab Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Thu, 30 Jun 2016 03:48:53 +0200 Subject: 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 Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron --- drivers/iio/pressure/bmp280-i2c.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/iio/pressure/bmp280-i2c.c') diff --git a/drivers/iio/pressure/bmp280-i2c.c b/drivers/iio/pressure/bmp280-i2c.c index 8cf8a900bdaa..03742b15b72a 100644 --- a/drivers/iio/pressure/bmp280-i2c.c +++ b/drivers/iio/pressure/bmp280-i2c.c @@ -78,6 +78,7 @@ static struct i2c_driver bmp280_i2c_driver = { .name = "bmp280", .acpi_match_table = ACPI_PTR(bmp280_acpi_i2c_match), .of_match_table = of_match_ptr(bmp280_of_i2c_match), + .pm = &bmp280_dev_pm_ops, }, .probe = bmp280_i2c_probe, .remove = bmp280_i2c_remove, -- cgit v1.2.3-59-g8ed1b