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>
This commit is contained in:
parent
4c94c3e09a
commit
c03c2a8734
|
@ -686,14 +686,12 @@ void bfin_gpio_pm_hibernate_restore(void)
|
||||||
*port_fer[bank] = gpio_bank_saved[bank].fer;
|
*port_fer[bank] = gpio_bank_saved[bank].fer;
|
||||||
#endif
|
#endif
|
||||||
gpio_array[bank]->inen = gpio_bank_saved[bank].inen;
|
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]->dir = gpio_bank_saved[bank].dir;
|
||||||
gpio_array[bank]->polar = gpio_bank_saved[bank].polar;
|
gpio_array[bank]->polar = gpio_bank_saved[bank].polar;
|
||||||
gpio_array[bank]->edge = gpio_bank_saved[bank].edge;
|
gpio_array[bank]->edge = gpio_bank_saved[bank].edge;
|
||||||
gpio_array[bank]->both = gpio_bank_saved[bank].both;
|
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;
|
gpio_array[bank]->maska = gpio_bank_saved[bank].maska;
|
||||||
}
|
}
|
||||||
AWA_DUMMY_READ(maska);
|
AWA_DUMMY_READ(maska);
|
||||||
|
|
Loading…
Reference in New Issue