[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <1394698649-20996-7-git-send-email-cw00.choi@samsung.com>
Date: Thu, 13 Mar 2014 17:17:27 +0900
From: Chanwoo Choi <cw00.choi@...sung.com>
To: myungjoo.ham@...sung.com, kyungmin.park@...sung.com
Cc: rafael.j.wysocki@...el.com, nm@...com, b.zolnierkie@...saung.com,
pawel.moll@....com, mark.rutland@....com, swarren@...dotorg.org,
ijc+devicetree@...lion.org.uk, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-samsung-soc@...r.kernel.org,
devicetree@...r.kernel.org, linux-doc@...r.kernel.org,
Chanwoo Choi <cw00.choi@...sung.com>
Subject: [PATCHv2 6/8] devfreq: exynos4: Fix power-leakage of clock on suspend
state
This patch disable ppmu clocks before entering suspend state to remove
power-leakage and enable ppmu clocks on resume function.
Signed-off-by: Chanwoo Choi <cw00.choi@...sung.com>
---
drivers/devfreq/exynos/exynos4_bus.c | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/drivers/devfreq/exynos/exynos4_bus.c b/drivers/devfreq/exynos/exynos4_bus.c
index 9576ee2..3d35063 100644
--- a/drivers/devfreq/exynos/exynos4_bus.c
+++ b/drivers/devfreq/exynos/exynos4_bus.c
@@ -1251,14 +1251,37 @@ static int exynos4_busfreq_remove(struct platform_device *pdev)
static int exynos4_busfreq_resume(struct device *dev)
{
struct busfreq_data *data = dev_get_drvdata(dev);
+ int i;
+
+ /* Enable clock after wake-up from suspend state */
+ for (i = 0; i < PPMU_END; i++)
+ clk_prepare_enable(data->clk_ppmu[i]);
+
+ /* Reset PPMU to check utilization again */
busfreq_mon_reset(data);
+
return 0;
}
+
+static int exynos4_busfreq_suspend(struct device *dev)
+{
+ struct busfreq_data *data = dev_get_drvdata(dev);
+ int i;
+
+ /*
+ * Disable clock before entering suspend state
+ * to reduce leakage power on suspend state.
+ */
+ for (i = 0; i < PPMU_END; i++)
+ clk_disable_unprepare(data->clk_ppmu[i]);
+
+ return 0;
+};
#endif
static const struct dev_pm_ops exynos4_busfreq_pm = {
- SET_SYSTEM_SLEEP_PM_OPS(NULL, exynos4_busfreq_resume)
+ SET_SYSTEM_SLEEP_PM_OPS(exynos4_busfreq_suspend, exynos4_busfreq_resume)
};
static const struct platform_device_id exynos4_busfreq_id[] = {
--
1.8.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists