aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2011-08-08 20:51:41 -0500
committerNishanth Menon <nm@ti.com>2011-08-29 19:35:16 -0500
commit0c2491311aa4a79cd65de0a4da06da99507b60e2 (patch)
tree648ce8e32a5fc8c31a70efb5f3ab9f71f2072435 /drivers/gpio
parent1745ac53873b9251b47475c9c3a3f787340ecbf2 (diff)
downloadkernel_samsung_tuna-0c2491311aa4a79cd65de0a4da06da99507b60e2.zip
kernel_samsung_tuna-0c2491311aa4a79cd65de0a4da06da99507b60e2.tar.gz
kernel_samsung_tuna-0c2491311aa4a79cd65de0a4da06da99507b60e2.tar.bz2
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. Change-Id: I07c8c0d90f4fe115533711bd587ae0d92f9e0232 Signed-off-by: Nishanth Menon <nm@ti.com>
Diffstat (limited to 'drivers/gpio')
-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 41b9a2d..5dd380d 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1457,7 +1457,12 @@ void omap_gpio_restore_context(struct gpio_bank *bank)
bank->base + bank->regs->risingdetect);
__raw_writel(bank->context.fallingdetect,
bank->base + bank->regs->fallingdetect);
- __raw_writel(bank->context.dataout, bank->base + bank->regs->dataout);
+ if (bank->regs->set_dataout && bank->regs->clr_dataout)
+ __raw_writel(bank->context.dataout,
+ bank->base + bank->regs->set_dataout);
+ else
+ __raw_writel(bank->context.dataout,
+ bank->base + bank->regs->dataout);
if (bank->dbck_enable_mask) {
__raw_writel(bank->context.debounce, bank->base +
bank->regs->debounce);