MLK-13614 input: keyboard: imx: make sure keypad interrupts are enabled in suspend
Change the suspend/resume callback to suspend_noirq/resume_noirq callback to make sure keypad interrupts are enabled during suspend, as when there is keypad interrupt coming after suspend callback is called, the interrupt handler will still be called and it will disable keypad interrupts, it will cause keypad can NOT generate interrupts to wake up system from suspend. Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
This commit is contained in:
@ -528,7 +528,7 @@ static int imx_keypad_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused imx_kbd_suspend(struct device *dev)
|
||||
static int __maybe_unused imx_kbd_suspend_noirq(struct device *dev)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct imx_keypad *kbd = platform_get_drvdata(pdev);
|
||||
@ -556,7 +556,7 @@ static int __maybe_unused imx_kbd_suspend(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused imx_kbd_resume(struct device *dev)
|
||||
static int __maybe_unused imx_kbd_resume_noirq(struct device *dev)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct imx_keypad *kbd = platform_get_drvdata(pdev);
|
||||
@ -580,7 +580,10 @@ err_clk:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(imx_kbd_pm_ops, imx_kbd_suspend, imx_kbd_resume);
|
||||
static const struct dev_pm_ops imx_kbd_pm_ops = {
|
||||
.suspend_noirq = imx_kbd_suspend_noirq,
|
||||
.resume_noirq = imx_kbd_resume_noirq,
|
||||
};
|
||||
|
||||
static struct platform_driver imx_keypad_driver = {
|
||||
.driver = {
|
||||
|
||||
Reference in New Issue
Block a user