iio: pressure: mpl115: Implementing low power mode by shutdown gpio
authorRajat Khandelwal <rajat.khandelwal@linux.intel.com>
Mon, 10 Oct 2022 17:37:20 +0000 (23:07 +0530)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 23 Nov 2022 19:44:00 +0000 (19:44 +0000)
commit0c3a333524a3e5ba4b6c7b2638faef8420cfdb2a
tree7b11a0f8142da445ce05a9095cb59fc245519ea5
parent16afe125b53f88b855d2713c8ba253d905dcf3cc
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>
drivers/iio/pressure/mpl115.c
drivers/iio/pressure/mpl115.h
drivers/iio/pressure/mpl115_i2c.c
drivers/iio/pressure/mpl115_spi.c