summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c64xx/include
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2011-06-01 10:44:50 +0100
committerKukjin Kim <kgene.kim@samsung.com>2011-07-20 23:13:20 +0900
commit1bac282af43d81d826ef25945a35536fa9bd041d (patch)
treeab533c42d30e54e2adae694e8b27558005c82518 /arch/arm/mach-s3c64xx/include
parentc17afc0aa69615b4c2250b6476431c4d601890a0 (diff)
downloadblackbird-op-linux-1bac282af43d81d826ef25945a35536fa9bd041d.tar.gz
blackbird-op-linux-1bac282af43d81d826ef25945a35536fa9bd041d.zip
ARM: SAMSUNG: Add support for pre-sleep/post-restore gpio control
Add a callback so that per-arch can do pre-sleep and post-resume gpio configuration so that for the S3C64XX, the GPIO configuration is restored before the sleep mode is cleared. For the S3C64XX case, it means that the GPIOs get set back to normal operation after the restore code puts the original configurations back in after the Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s3c64xx/include')
-rw-r--r--arch/arm/mach-s3c64xx/include/mach/pm-core.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c64xx/include/mach/pm-core.h b/arch/arm/mach-s3c64xx/include/mach/pm-core.h
index 4ed0f582d222..38659bebe4b1 100644
--- a/arch/arm/mach-s3c64xx/include/mach/pm-core.h
+++ b/arch/arm/mach-s3c64xx/include/mach/pm-core.h
@@ -96,3 +96,20 @@ static inline void s3c_pm_arch_update_uart(void __iomem *regs,
save->ucon = new_ucon;
}
}
+
+static inline void s3c_pm_restored_gpios(void)
+{
+ /* ensure sleep mode has been cleared from the system */
+
+ __raw_writel(0, S3C64XX_SLPEN);
+}
+
+static inline void s3c_pm_saved_gpios(void)
+{
+ /* turn on the sleep mode and keep it there, as it seems that during
+ * suspend the xCON registers get re-set and thus you can end up with
+ * problems between going to sleep and resuming.
+ */
+
+ __raw_writel(S3C64XX_SLPEN_USE_xSLP, S3C64XX_SLPEN);
+}
OpenPOWER on IntegriCloud