summaryrefslogtreecommitdiff
path: root/drivers/iio/pressure/mpl115_i2c.c
diff options
context:
space:
mode:
authorRajat Khandelwal <rajat.khandelwal@linux.intel.com>2022-10-10 20:37:20 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-11-23 22:44:00 +0300
commit0c3a333524a3e5ba4b6c7b2638faef8420cfdb2a (patch)
tree7b11a0f8142da445ce05a9095cb59fc245519ea5 /drivers/iio/pressure/mpl115_i2c.c
parent16afe125b53f88b855d2713c8ba253d905dcf3cc (diff)
downloadlinux-0c3a333524a3e5ba4b6c7b2638faef8420cfdb2a.tar.xz
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_i2c.c')
-rw-r--r--drivers/iio/pressure/mpl115_i2c.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/pressure/mpl115_i2c.c b/drivers/iio/pressure/mpl115_i2c.c
index 099ab1c6832c..555bda1146fb 100644
--- a/drivers/iio/pressure/mpl115_i2c.c
+++ b/drivers/iio/pressure/mpl115_i2c.c
@@ -53,6 +53,7 @@ MODULE_DEVICE_TABLE(i2c, mpl115_i2c_id);
static struct i2c_driver mpl115_i2c_driver = {
.driver = {
.name = "mpl115",
+ .pm = pm_ptr(&mpl115_dev_pm_ops),
},
.probe = mpl115_i2c_probe,
.id_table = mpl115_i2c_id,