usb: xhci-mtk: add support runtime PM
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Sat, 10 Apr 2021 05:10:04 +0000 (13:10 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Apr 2021 14:41:58 +0000 (16:41 +0200)
commit04284eb74e0c350be5e75eda178b97063343af13
treeef8a553ad8f2941341b3a3c271114bc4ea04c433
parentfe8e488058c47e9a8a2c85321f7198a0a17b0131
usb: xhci-mtk: add support runtime PM

A dedicated wakeup irq will be used to handle runtime suspend/resume,
we use dev_pm_set_dedicated_wake_irq API to take care of requesting
and attaching wakeup irq, then the suspend/resume framework will help
to enable/disable wakeup irq.

The runtime PM is default off since some platforms may not support it.
users can enable it via power/control (set "auto") in sysfs.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/1618031406-15347-3-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mtk.c