aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-omap.c
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2011-09-09 09:44:08 -0400
committerTarun Kanti DebBarma <tarun.kanti@ti.com>2012-02-06 06:28:45 -0500
commitf86bcc302a8c570dd0f5a50097a6af96a0e717c2 (patch)
tree9cd40d3445205a6a7ce4959ac6be905cc5c68750 /drivers/gpio/gpio-omap.c
parent6d13eaaf33436e20d1a41122f28434bcc37999dc (diff)
gpio/omap: handle set_dataout reg capable IP on restore
GPIO IP revisions such as those used in OMAP4 have a set_dataout while the previous revisions used a single dataout register. Depending on what is available restore the dataout settings to the right register. Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'drivers/gpio/gpio-omap.c')
-rw-r--r--drivers/gpio/gpio-omap.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index e0fd2e4b2b9c..f49bd6f47a50 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1363,7 +1363,12 @@ static void omap_gpio_restore_context(struct gpio_bank *bank)
1363 bank->base + bank->regs->risingdetect); 1363 bank->base + bank->regs->risingdetect);
1364 __raw_writel(bank->context.fallingdetect, 1364 __raw_writel(bank->context.fallingdetect,
1365 bank->base + bank->regs->fallingdetect); 1365 bank->base + bank->regs->fallingdetect);
1366 __raw_writel(bank->context.dataout, bank->base + bank->regs->dataout); 1366 if (bank->regs->set_dataout && bank->regs->clr_dataout)
1367 __raw_writel(bank->context.dataout,
1368 bank->base + bank->regs->set_dataout);
1369 else
1370 __raw_writel(bank->context.dataout,
1371 bank->base + bank->regs->dataout);
1367 __raw_writel(bank->context.oe, bank->base + bank->regs->direction); 1372 __raw_writel(bank->context.oe, bank->base + bank->regs->direction);
1368 1373
1369 if (bank->dbck_enable_mask) { 1374 if (bank->dbck_enable_mask) {