aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSundar R Iyer <sundar.iyer@stericsson.com>2010-06-16 13:04:37 +0530
committerJohn Rigby <john.rigby@linaro.org>2010-09-02 22:45:47 -0600
commit3f681e66d2fe6a07774e9590bec5f5813381b126 (patch)
treeec8e19b13f8b55b364c04d07f6e4a6f5b82b74fc
parent024c86b83840d5fd9cf339d6db025191a79dbf2b (diff)
downloadlinux-2.6.34-ux500-3f681e66d2fe6a07774e9590bec5f5813381b126.tar.gz
ux500-pm: enable the on-board keypad wakeup for sleep/deepsleep states
The on-board keypad interfaces through the GPIO218. We make this GPIO wakeup capable in sleep/deep sleep modes ST-Ericsson Change ID: 264368 Signed-off-by: Sundar R Iyer <sundar.iyer@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/1717 Reviewed-by: Rickard ANDERSSON <rickard.andersson@stericsson.com> Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> Change-Id: Idb0eef23188f474c89b43d1eda07755c555fce8d Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/2633 Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
-rwxr-xr-xarch/arm/mach-ux500/board-mop500.c4
-rwxr-xr-xarch/arm/mach-ux500/pm.c19
2 files changed, 13 insertions, 10 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 5135969510f..e8147642177 100755
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -1386,6 +1386,10 @@ static void __init mop500_init_machine(void)
platform_add_devices(u8500_platform_devices,
ARRAY_SIZE(u8500_platform_devices));
+
+ /* enable the STMPE as wakeup capable in deepsleep */
+ set_irq_type(stmpe1601_data.irq, IRQ_TYPE_EDGE_BOTH);
+ set_irq_wake(stmpe1601_data.irq, true);
}
static int __init u8500_i2call_init(void)
diff --git a/arch/arm/mach-ux500/pm.c b/arch/arm/mach-ux500/pm.c
index 7ac13b70233..8974f5daa81 100755
--- a/arch/arm/mach-ux500/pm.c
+++ b/arch/arm/mach-ux500/pm.c
@@ -730,16 +730,6 @@ static int u8500_pm_enter(suspend_state_t state)
break;
case PM_SUSPEND_MEM:
-
- /* ROM code addresses to store backup contents */
- /* pass the physical address of back up to ROM code */
- writel(virt_to_phys(ux500_backup_ptr),
- IO_ADDRESS(U8500_EXT_BACKUPRAM_ADDR));
- writel(IO_ADDRESS(U8500_BACKUPRAM0_BASE),
- IO_ADDRESS(U8500_CPU0_PUBLIC_BACKUP));
- writel(IO_ADDRESS(U8500_BACKUPRAM0_BASE),
- IO_ADDRESS(U8500_CPU1_PUBLIC_BACKUP));
-
/* core context to be saved */
ux500_save_core_context();
@@ -849,6 +839,15 @@ static int __init u8500_pm_init(void)
return -ENOMEM;
}
+ /* ROM code addresses to store backup contents */
+ /* pass the physical address of back up to ROM code */
+ writel(virt_to_phys(ux500_backup_ptr),
+ IO_ADDRESS(U8500_EXT_BACKUPRAM_ADDR));
+ writel(IO_ADDRESS(U8500_BACKUPRAM0_BASE),
+ IO_ADDRESS(U8500_CPU0_PUBLIC_BACKUP));
+ writel(IO_ADDRESS(U8500_BACKUPRAM0_BASE),
+ IO_ADDRESS(U8500_CPU1_PUBLIC_BACKUP));
+
/* register the global power off hook */
pm_power_off = u8500_pm_poweroff;