aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHebbar, Gururaja2015-08-03 20:18:47 -0500
committerSekhar Nori2015-08-04 04:55:26 -0500
commit45d844e84cc73ec55d9d9bf06f4747cd1c2e0454 (patch)
tree7ff347a5643f2907ac9d982cc7ebc73858f82395
parentc78b2d24a89d9321cb2af60aafe70e7b9837a281 (diff)
downloadkernel-audio-45d844e84cc73ec55d9d9bf06f4747cd1c2e0454.tar.gz
kernel-audio-45d844e84cc73ec55d9d9bf06f4747cd1c2e0454.tar.xz
kernel-audio-45d844e84cc73ec55d9d9bf06f4747cd1c2e0454.zip
memory: gpmc: adopt pinctrl support
Update omap gpmc driver to set the state of the pins to: - "sleep" on suspend - "default" on resume By optionally putting the pins into sleep state in the suspend callback we can accomplish two things. - minimize current leakage from pins and thus save power, - prevent the IP from driving pins output in an uncontrolled manner, which may happen if the power domain drops the domain regulator. Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com> [d-gerlach@ti.com: Moved from mach-omap2 gpmc driver to drivers/memory] Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
-rw-r--r--drivers/memory/omap-gpmc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index 8911e51d410a..6a64d7c5f888 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -2189,11 +2189,18 @@ static int gpmc_suspend(struct device *dev)
2189{ 2189{
2190 omap3_gpmc_save_context(); 2190 omap3_gpmc_save_context();
2191 pm_runtime_put_sync(dev); 2191 pm_runtime_put_sync(dev);
2192
2193 /* Select sleep pin state */
2194 pinctrl_pm_select_sleep_state(dev);
2195
2192 return 0; 2196 return 0;
2193} 2197}
2194 2198
2195static int gpmc_resume(struct device *dev) 2199static int gpmc_resume(struct device *dev)
2196{ 2200{
2201 /* Select default pin state */
2202 pinctrl_pm_select_default_state(dev);
2203
2197 pm_runtime_get_sync(dev); 2204 pm_runtime_get_sync(dev);
2198 omap3_gpmc_restore_context(); 2205 omap3_gpmc_restore_context();
2199 return 0; 2206 return 0;