diff options
author | Chunfeng Yun <chunfeng.yun@mediatek.com> | 2021-07-15 17:07:58 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-27 15:58:37 +0200 |
commit | 6b587394c65c23d5ba05a33e5899e2ed8dab3c97 (patch) | |
tree | 675abaf38feeb6f7798d562d403f8e1380b0923b /drivers/usb/mtu3/mtu3_dr.c | |
parent | 427c66422e14b8468ee005aa6edf76ef0c2a8fc2 (diff) | |
download | lwn-6b587394c65c23d5ba05a33e5899e2ed8dab3c97.tar.gz lwn-6b587394c65c23d5ba05a33e5899e2ed8dab3c97.zip |
usb: mtu3: support suspend/resume for dual-role mode
Support suspend/resume for dual-role mode including the single
port and multi-ports supported by host controller, when the host
supports mult-ports, only port0 (u2/u3) is used to support dual
role mode.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/1626340078-29111-14-git-send-email-chunfeng.yun@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/mtu3/mtu3_dr.c')
-rw-r--r-- | drivers/usb/mtu3/mtu3_dr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/mtu3/mtu3_dr.c b/drivers/usb/mtu3/mtu3_dr.c index 30e7e5fc0f88..a6b04831b20b 100644 --- a/drivers/usb/mtu3/mtu3_dr.c +++ b/drivers/usb/mtu3/mtu3_dr.c @@ -149,6 +149,7 @@ static void ssusb_mode_sw_work(struct work_struct *work) dev_dbg(ssusb->dev, "set role : %s\n", usb_role_string(desired_role)); mtu3_dbg_trace(ssusb->dev, "set role : %s", usb_role_string(desired_role)); + pm_runtime_get_sync(ssusb->dev); switch (desired_role) { case USB_ROLE_HOST: @@ -169,6 +170,7 @@ static void ssusb_mode_sw_work(struct work_struct *work) default: dev_err(ssusb->dev, "invalid role\n"); } + pm_runtime_put(ssusb->dev); } static void ssusb_set_mode(struct otg_switch_mtk *otg_sx, enum usb_role role) |