diff options
author | Chanwoo Choi <cw00.choi@samsung.com> | 2014-06-25 03:14:47 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2014-07-09 09:58:12 -0400 |
commit | b7cde7078d2344073c310aa65fc2b0a845d2cb5b (patch) | |
tree | cea3062fcf908fed85cf3d4aad78367567a4171e /drivers/mfd | |
parent | b264fc7002b658aceb679449952a674ef60b4655 (diff) |
mfd: sec-core: Prepare regulators for suspend state to reduce power-consumption
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>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/Kconfig | 1 | ||||
-rw-r--r-- | drivers/mfd/sec-core.c | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index defe58d65940..b8d9ca0b68e2 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig | |||
@@ -587,6 +587,7 @@ config MFD_SEC_CORE | |||
587 | select MFD_CORE | 587 | select MFD_CORE |
588 | select REGMAP_I2C | 588 | select REGMAP_I2C |
589 | select REGMAP_IRQ | 589 | select REGMAP_IRQ |
590 | select REGULATOR | ||
590 | help | 591 | help |
591 | Support for the Samsung Electronics MFD series. | 592 | Support for the Samsung Electronics MFD series. |
592 | This driver provides common support for accessing the device, | 593 | This driver provides common support for accessing the device, |
diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index 2621328851ba..fb8ba6438268 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/mfd/samsung/s2mpu02.h> | 31 | #include <linux/mfd/samsung/s2mpu02.h> |
32 | #include <linux/mfd/samsung/s5m8763.h> | 32 | #include <linux/mfd/samsung/s5m8763.h> |
33 | #include <linux/mfd/samsung/s5m8767.h> | 33 | #include <linux/mfd/samsung/s5m8767.h> |
34 | #include <linux/regulator/machine.h> | ||
34 | #include <linux/regmap.h> | 35 | #include <linux/regmap.h> |
35 | 36 | ||
36 | static const struct mfd_cell s5m8751_devs[] = { | 37 | static const struct mfd_cell s5m8751_devs[] = { |
@@ -430,6 +431,15 @@ static int sec_pmic_suspend(struct device *dev) | |||
430 | */ | 431 | */ |
431 | disable_irq(sec_pmic->irq); | 432 | disable_irq(sec_pmic->irq); |
432 | 433 | ||
434 | switch (sec_pmic->device_type) { | ||
435 | case S2MPS14X: | ||
436 | case S2MPU02: | ||
437 | regulator_suspend_prepare(PM_SUSPEND_MEM); | ||
438 | break; | ||
439 | default: | ||
440 | break; | ||
441 | } | ||
442 | |||
433 | return 0; | 443 | return 0; |
434 | } | 444 | } |
435 | 445 | ||