提交 f86bcc30 编写于 作者: N Nishanth Menon 提交者: Tarun Kanti DebBarma

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: NNishanth Menon <nm@ti.com>
Signed-off-by: NTarun Kanti DebBarma <tarun.kanti@ti.com>
Reviewed-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
Reviewed-by: NKevin Hilman <khilman@ti.com>
Signed-off-by: NKevin Hilman <khilman@ti.com>
上级 6d13eaaf
...@@ -1363,7 +1363,12 @@ static void omap_gpio_restore_context(struct gpio_bank *bank) ...@@ -1363,7 +1363,12 @@ static void omap_gpio_restore_context(struct gpio_bank *bank)
bank->base + bank->regs->risingdetect); bank->base + bank->regs->risingdetect);
__raw_writel(bank->context.fallingdetect, __raw_writel(bank->context.fallingdetect,
bank->base + bank->regs->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);
__raw_writel(bank->context.oe, bank->base + bank->regs->direction); __raw_writel(bank->context.oe, bank->base + bank->regs->direction);
if (bank->dbck_enable_mask) { if (bank->dbck_enable_mask) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册