From: Chanwoo Choi <cw00.choi@samsung.com>
To: lee.jones@linaro.org, sbkim73@samsung.com, sameo@linux.intel.com,
broonie@kernel.org
Cc: myungjoo.ham@samsung.com, kyungmin.park@samsung.com,
linux-kernel@vger.kernel.org,
Chanwoo Choi <cw00.choi@samsung.com>
Subject: [PATCHv8 4/4] mfd: sec-core: Prepare regulators for suspend state to reduce power-consumption
Date: Wed, 25 Jun 2014 16:14:47 +0900 [thread overview]
Message-ID: <1403680487-12141-5-git-send-email-cw00.choi@samsung.com> (raw)
In-Reply-To: <1403680487-12141-1-git-send-email-cw00.choi@samsung.com>
This patch use regulator_suspend_prepare() function to prepare the proper state
of regulators for suspend state to remove un-necessary leakage power-consumption.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
---
drivers/mfd/Kconfig | 1 +
drivers/mfd/sec-core.c | 10 ++++++++++
2 files changed, 11 insertions(+)
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index af0e83f..b5898dc 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -586,6 +586,7 @@ config MFD_SEC_CORE
select MFD_CORE
select REGMAP_I2C
select REGMAP_IRQ
+ select REGULATOR
help
Support for the Samsung Electronics MFD series.
This driver provides common support for accessing the device,
diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
index 2621328..fb8ba64 100644
--- a/drivers/mfd/sec-core.c
+++ b/drivers/mfd/sec-core.c
@@ -31,6 +31,7 @@
#include <linux/mfd/samsung/s2mpu02.h>
#include <linux/mfd/samsung/s5m8763.h>
#include <linux/mfd/samsung/s5m8767.h>
+#include <linux/regulator/machine.h>
#include <linux/regmap.h>
static const struct mfd_cell s5m8751_devs[] = {
@@ -430,6 +431,15 @@ static int sec_pmic_suspend(struct device *dev)
*/
disable_irq(sec_pmic->irq);
+ switch (sec_pmic->device_type) {
+ case S2MPS14X:
+ case S2MPU02:
+ regulator_suspend_prepare(PM_SUSPEND_MEM);
+ break;
+ default:
+ break;
+ }
+
return 0;
}
--
1.8.0
next prev parent reply other threads:[~2014-06-25 7:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-25 7:14 [PATCHv8 0/4] mfd: sec-core: Add support S2MPU02 PMIC device Chanwoo Choi
2014-06-25 7:14 ` [PATCHv8 1/4] mfd: sec-core: Add support for S2MPU02 device Chanwoo Choi
2014-07-01 14:00 ` Lee Jones
2014-06-25 7:14 ` [PATCHv8 2/4] regulator: s2mps11: Add support S2MPU02 regulator device Chanwoo Choi
2014-07-01 14:02 ` Lee Jones
2014-06-25 7:14 ` [PATCHv8 3/4] dt-bindings: mfd: s2mps11: Add support S2MPU02 PMIC Chanwoo Choi
2014-06-25 7:14 ` Chanwoo Choi [this message]
2014-07-01 14:04 ` [PATCHv8 4/4] mfd: sec-core: Prepare regulators for suspend state to reduce power-consumption Lee Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1403680487-12141-5-git-send-email-cw00.choi@samsung.com \
--to=cw00.choi@samsung.com \
--cc=broonie@kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=sameo@linux.intel.com \
--cc=sbkim73@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®