aboutsummaryrefslogtreecommitdiff
path: root/drivers/iio/pressure/mpl115.h
diff options
context:
space:
mode:
authorRajat Khandelwal <rajat.khandelwal@linux.intel.com>2022-10-10 23:07:20 +0530
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-11-23 19:44:00 +0000
commit0c3a333524a3e5ba4b6c7b2638faef8420cfdb2a (patch)
tree7b11a0f8142da445ce05a9095cb59fc245519ea5 /drivers/iio/pressure/mpl115.h
parent16afe125b53f88b855d2713c8ba253d905dcf3cc (diff)
iio: pressure: mpl115: Implementing low power mode by shutdown gpio
MPL115 supports shutdown gpio which can be used to set the state to low power mode. Power from all internal circuits and registers is removed. This is done by pulling the SHDN pin to low. This patch enables runtime PM on MPL115 to increase power savings. According to spec., a wakeup time period of ~5 ms exists between waking up and actually communicating with the device. This is implemented using sleep delay. Signed-off-by: Rajat Khandelwal <rajat.khandelwal@linux.intel.com> Link: https://lore.kernel.org/r/20221010173720.568916-1-rajat.khandelwal@linux.intel.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/pressure/mpl115.h')
-rw-r--r--drivers/iio/pressure/mpl115.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/iio/pressure/mpl115.h b/drivers/iio/pressure/mpl115.h
index 57d55eb8e661..78a0068a17bb 100644
--- a/drivers/iio/pressure/mpl115.h
+++ b/drivers/iio/pressure/mpl115.h
@@ -6,6 +6,8 @@
* Copyright (c) 2016 Akinobu Mita <akinobu.mita@gmail.com>
*/
+#include <linux/pm_runtime.h>
+
#ifndef _MPL115_H_
#define _MPL115_H_
@@ -18,4 +20,7 @@ struct mpl115_ops {
int mpl115_probe(struct device *dev, const char *name,
const struct mpl115_ops *ops);
+/*PM ops */
+extern const struct dev_pm_ops mpl115_dev_pm_ops;
+
#endif