1
0
Fork 0

gpio-mxc: drop GPIO_IMR register save/restore from runtime suspend/resume hooks

An issue is found in suspend/resume - if we touch screen with pen when
system is in Sleep state, system is not responding when it wakes up.
It's a similar issue that commit 20c3781a7fb9 ("MLK-20306 gpio: mxc:
Skip GPIO_IMR restore in noirq resume") was fixing.

The root cause is that GPIO_IMR is saved as enabled before suspend,
and IRQ arrived in suspend state, during resume, the IMR is restored
to unmask the IRQ, the IRQ keep coming and touch driver is NOT ready
to handle it. Similar to commit 20c3781a7fb9, fix the issue by removing
GPIO_IMR register save/restore from GPIO driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
pull/10/head
Shawn Guo 2019-08-22 09:55:59 +02:00 committed by Steinar Bakkemo
parent ce15e28ef5
commit 82383b2bb2
1 changed files with 0 additions and 2 deletions

View File

@ -724,7 +724,6 @@ static void mxc_gpio_save_regs(struct mxc_gpio_port *port)
spin_lock_irqsave(&port->gc.bgpio_lock, flags);
port->saved_reg[0] = readl(port->base + GPIO_ICR1);
port->saved_reg[1] = readl(port->base + GPIO_ICR2);
port->saved_reg[2] = readl(port->base + GPIO_IMR);
port->saved_reg[3] = readl(port->base + GPIO_GDIR);
port->saved_reg[4] = readl(port->base + GPIO_EDGE_SEL);
port->saved_reg[5] = readl(port->base + GPIO_DR);
@ -741,7 +740,6 @@ static void mxc_gpio_restore_regs(struct mxc_gpio_port *port)
spin_lock_irqsave(&port->gc.bgpio_lock, flags);
writel(port->saved_reg[0], port->base + GPIO_ICR1);
writel(port->saved_reg[1], port->base + GPIO_ICR2);
writel(port->saved_reg[2], port->base + GPIO_IMR);
writel(port->saved_reg[3], port->base + GPIO_GDIR);
writel(port->saved_reg[4], port->base + GPIO_EDGE_SEL);
writel(port->saved_reg[5], port->base + GPIO_DR);