pinctrl: mediatek: fix suspend/resume timing issue
authorhongkun.cao <hongkun.cao@mediatek.com>
Fri, 3 Jun 2016 03:28:14 +0000 (11:28 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 8 Jun 2016 08:09:40 +0000 (10:09 +0200)
An irq which is a wake up source maybe masked unexpectedly if the wake
up source irq was triggered after pinctrl irqchip suspend and before
suspend_device_irqs finished.
Use *_noirq callbacks to guarantee pinctrl irqchip suspend would be
called after suspend_devices_irqs.

Signed-off-by: hongkun.cao <hongkun.cao@mediatek.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mediatek/pinctrl-mtk-common.c

index 207b13b618cf16c2b7c9ff863481580879d58ced..5db59a64f147f4ace6b4821c58819007b28e61e2 100644 (file)
@@ -1183,8 +1183,8 @@ static int mtk_eint_resume(struct device *device)
 }
 
 const struct dev_pm_ops mtk_eint_pm_ops = {
-       .suspend = mtk_eint_suspend,
-       .resume = mtk_eint_resume,
+       .suspend_noirq = mtk_eint_suspend,
+       .resume_noirq = mtk_eint_resume,
 };
 
 static void mtk_eint_ack(struct irq_data *d)