On 11/09/15 12:22, Chung-Yih Wang (王崇懿) wrote:
Hi Sudeep and Maoguang, Please correct me if I am wrong. I think the wake_mask Maoguang implemented is the wake-up configuration and it is how he disabled other unwanted interrupt sources(e.g. audio jacket insertion) during suspend.
OK, you are right, I think I now understand the issue. I misread the code initially thinking the suspend/resume are implemented as syscore_ops but they are standard device pm ops.
With Sudeep's patch which we had similar one before, the system got waken up by audio jack insertion which we don't want. Maoguang tried to implement wake_mask as the wake-up configuration to keep track of effective wakeup sources(i.e. those who makes enable_irq_wake) and write the wake-up configuration in mtk_eint_suspend(). What is your suggestion to address this issue? Thanks!
One option is to convert them to *_noirq callbacks assuming all the users of this pinctrl irqchip have sanely implemented their suspend/resume and don't trigger interrupts between dpm_suspend and suspend_device_irqs. What do you think ? Regards, Sudeep ---->8 @@ -1130,8 +1130,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, }; -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html