public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: sec-core: Prepare regulators for suspend state to reduce power-consumption
@ 2014-06-09 11:05 Chanwoo Choi
  2014-06-18  9:23 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Chanwoo Choi @ 2014-06-09 11:05 UTC (permalink / raw)
  To: lee.jones, sbkim73, sameo
  Cc: myungjoo.ham, kyungmin.park, linux-kernel, Chanwoo Choi

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>
---
This patch has a dependency on following patchset[1].
- [1] https://lkml.org/lkml/2014/6/9/255
  [PATCHv4 0/3] mfd: sec-core: Add support S2MPU02 PMIC device

 drivers/mfd/sec-core.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c
index 5e8784b..e3413d5 100644
--- a/drivers/mfd/sec-core.c
+++ b/drivers/mfd/sec-core.c
@@ -30,6 +30,7 @@
 #include <linux/mfd/samsung/s2mps14.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[] = {
@@ -406,6 +407,13 @@ 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;
+	};
+
 	return 0;
 }
 
-- 
1.8.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-18  9:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-09 11:05 [PATCH] mfd: sec-core: Prepare regulators for suspend state to reduce power-consumption Chanwoo Choi
2014-06-18  9:23 ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox