summaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@nxp.com>2017-02-13 15:14:17 +0800
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:25:49 +0800
commita9ef2d7ef91b4b0d4852dc0faee9de65c358441d (patch)
tree0ddf476f729074c92dbcb1eab6e3412bd43595f1 /drivers/gpio
parentd52204638b5679c22142aa0c3ac1d22d1680ddb0 (diff)
MLK-13912-2 gpio: gpio-vf610: mask interrupt on suspend for imx7ulp
At imx7ulp, any interrupts can wake system up from suspend at "standby" mode, so we mask interrupt for gpio by default. The user can still enable wakeup through /sys entry. Signed-off-by: Peter Chen <peter.chen@nxp.com>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-vf610.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c
index cbe9e06861de..43b20760b0dc 100644
--- a/drivers/gpio/gpio-vf610.c
+++ b/drivers/gpio/gpio-vf610.c
@@ -303,6 +303,14 @@ static int vf610_gpio_probe(struct platform_device *pdev)
/* Clear the interrupt status register for all GPIO's */
vf610_gpio_writel(~0, port->base + PORT_ISFR);
+ /*
+ * At imx7ulp, any interrupts can wake system up from "standby" mode,
+ * so, mask interrupt at suspend mode by default, and the user
+ * can still enable wakeup through /sys entry.
+ */
+ if (of_machine_is_compatible("fsl,imx7ulp"))
+ vf610_gpio_irq_chip.flags = IRQCHIP_MASK_ON_SUSPEND;
+
ret = gpiochip_irqchip_add(gc, &vf610_gpio_irq_chip, 0,
handle_edge_irq, IRQ_TYPE_NONE);
if (ret) {