summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/mfp-pxa2xx.c
diff options
context:
space:
mode:
authorEric Miao <eric.y.miao@gmail.com>2010-01-11 14:25:15 +0100
committerEric Miao <eric.y.miao@gmail.com>2010-05-11 17:24:59 +0200
commit1106143d7ab43ba07678c88c85417df219354ae8 (patch)
tree93eed0f0dae58aaa00549a4e1d49a349a631de14 /arch/arm/mach-pxa/mfp-pxa2xx.c
parent[ARM] pxa: use resource_size() in ssp.c (diff)
downloadlinux-1106143d7ab43ba07678c88c85417df219354ae8.tar.xz
linux-1106143d7ab43ba07678c88c85417df219354ae8.zip
[ARM] pxa: add MFP_LPM_KEEP_OUTPUT flag to pin config
Some pins are expected to keep their last level during suspend, and introduce MFP_LPM_KEEP_OUTPUT for this. Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa/mfp-pxa2xx.c')
-rw-r--r--arch/arm/mach-pxa/mfp-pxa2xx.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/mfp-pxa2xx.c b/arch/arm/mach-pxa/mfp-pxa2xx.c
index cf6b720c055f..c98b5a8c3b0f 100644
--- a/arch/arm/mach-pxa/mfp-pxa2xx.c
+++ b/arch/arm/mach-pxa/mfp-pxa2xx.c
@@ -328,6 +328,17 @@ static int pxa2xx_mfp_suspend(struct sys_device *d, pm_message_t state)
{
int i;
+ /* set corresponding PGSR bit of those marked MFP_LPM_KEEP_OUTPUT */
+ for (i = 0; i < pxa_last_gpio; i++) {
+ if ((gpio_desc[i].config & MFP_LPM_KEEP_OUTPUT) &&
+ (GPDR(i) & GPIO_bit(i))) {
+ if (GPLR(i) & GPIO_bit(i))
+ PGSR(i) |= GPIO_bit(i);
+ else
+ PGSR(i) &= ~GPIO_bit(i);
+ }
+ }
+
for (i = 0; i <= gpio_to_bank(pxa_last_gpio); i++) {
saved_gafr[0][i] = GAFR_L(i);