diff options
| author | Nishanth Menon <[email protected]> | 2011-08-29 13:24:50 +0000 |
|---|---|---|
| committer | Tarun Kanti DebBarma <[email protected]> | 2012-02-06 11:27:29 +0000 |
| commit | 6d13eaaf33436e20d1a41122f28434bcc37999dc (patch) | |
| tree | 32c190d212f1456a38e977a6c7325c124d223e5c /drivers/gpio/gpio-omap.c | |
| parent | gpio/omap: enable irq at the end of all configuration in restore (diff) | |
| download | kernel-6d13eaaf33436e20d1a41122f28434bcc37999dc.tar.gz kernel-6d13eaaf33436e20d1a41122f28434bcc37999dc.zip | |
gpio/omap: restore OE only after setting the output level
Setup the dataout register before restoring OE. This is to make
sure that we have valid data in dataout register which would be
made available in output pins as soon as OE is enabled. Else,
there is risk of unknown data getting out into gpio pins.
Signed-off-by: Nishanth Menon <[email protected]>
Signed-off-by: Tarun Kanti DebBarma <[email protected]>
Reviewed-by: Santosh Shilimkar <[email protected]>
Reviewed-by: Kevin Hilman <[email protected]>
Signed-off-by: Kevin Hilman <[email protected]>
Diffstat (limited to 'drivers/gpio/gpio-omap.c')
| -rw-r--r-- | drivers/gpio/gpio-omap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 41265e823b23..e0fd2e4b2b9c 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -1355,7 +1355,6 @@ static void omap_gpio_restore_context(struct gpio_bank *bank) __raw_writel(bank->context.wake_en, bank->base + bank->regs->wkup_en); __raw_writel(bank->context.ctrl, bank->base + bank->regs->ctrl); - __raw_writel(bank->context.oe, bank->base + bank->regs->direction); __raw_writel(bank->context.leveldetect0, bank->base + bank->regs->leveldetect0); __raw_writel(bank->context.leveldetect1, @@ -1365,6 +1364,8 @@ static void omap_gpio_restore_context(struct gpio_bank *bank) __raw_writel(bank->context.fallingdetect, bank->base + bank->regs->fallingdetect); __raw_writel(bank->context.dataout, bank->base + bank->regs->dataout); + __raw_writel(bank->context.oe, bank->base + bank->regs->direction); + if (bank->dbck_enable_mask) { __raw_writel(bank->context.debounce, bank->base + bank->regs->debounce); |
