summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMichael Hennerich <michael.hennerich@analog.com>2009-07-08 12:04:43 +0000
committerMike Frysinger <vapier@gentoo.org>2009-07-16 01:52:42 -0400
commitc03c2a87347b849ec927d7d2ea79a6955e19f492 (patch)
tree40c4fe316aa4ff92ad9a59f924d68b01726ca091 /arch
parent4c94c3e09adba9718218d6e3d35b2dfae81f3911 (diff)
Blackfin: fix bugs in GPIO resume code
Change the bfin_gpio_pm_hibernate_restore() function to: 1) AND restored DATA with DIR (not OR) to get correct final state 2) Restore DATA before setting DIR to avoid glitches Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/blackfin/kernel/bfin_gpio.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c
index beffa00a93c3..6b9446271371 100644
--- a/arch/blackfin/kernel/bfin_gpio.c
+++ b/arch/blackfin/kernel/bfin_gpio.c
@@ -686,14 +686,12 @@ void bfin_gpio_pm_hibernate_restore(void)
*port_fer[bank] = gpio_bank_saved[bank].fer;
#endif
gpio_array[bank]->inen = gpio_bank_saved[bank].inen;
+ gpio_array[bank]->data_set = gpio_bank_saved[bank].data
+ & gpio_bank_saved[bank].dir;
gpio_array[bank]->dir = gpio_bank_saved[bank].dir;
gpio_array[bank]->polar = gpio_bank_saved[bank].polar;
gpio_array[bank]->edge = gpio_bank_saved[bank].edge;
gpio_array[bank]->both = gpio_bank_saved[bank].both;
-
- gpio_array[bank]->data_set = gpio_bank_saved[bank].data
- | gpio_bank_saved[bank].dir;
-
gpio_array[bank]->maska = gpio_bank_saved[bank].maska;
}
AWA_DUMMY_READ(maska);