diff options
author | Chunfeng Yun <chunfeng.yun@mediatek.com> | 2018-01-03 16:53:18 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-01-09 16:21:27 +0100 |
commit | f0ede2c6282b4a710b63dd8566b0aa1e2afbe225 (patch) | |
tree | 63dcd174e0e9104324b94770af243687e0b43e0d /drivers/usb/mtu3/mtu3_plat.c | |
parent | 3849c2901339b97e548104c282b6750bb367bb33 (diff) | |
download | linux-next-f0ede2c6282b4a710b63dd8566b0aa1e2afbe225.tar.gz |
usb: mtu3: supports remote wakeup for mt2712 with two SSUSB IPs
The old way of usb wakeup only supports platform with single SSUSB IP,
such as mt8173, but mt2712 has two SSUSB IPs, so rebuild its flow and
also supports the new glue layer of usb wakeup on mt2712 which is
different from mt8173.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/mtu3/mtu3_plat.c')
-rw-r--r-- | drivers/usb/mtu3/mtu3_plat.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c index 5b2110bdee96..628d5ce356ca 100644 --- a/drivers/usb/mtu3/mtu3_plat.c +++ b/drivers/usb/mtu3/mtu3_plat.c @@ -282,8 +282,10 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb) /* if host role is supported */ ret = ssusb_wakeup_of_property_parse(ssusb, node); - if (ret) + if (ret) { + dev_err(dev, "failed to parse uwk property\n"); return ret; + } /* optional property, ignore the error if it does not exist */ of_property_read_u32(node, "mediatek,u3p-dis-msk", @@ -457,7 +459,7 @@ static int __maybe_unused mtu3_suspend(struct device *dev) ssusb_host_disable(ssusb, true); ssusb_phy_power_off(ssusb); ssusb_clks_disable(ssusb); - ssusb_wakeup_enable(ssusb); + ssusb_wakeup_set(ssusb, true); return 0; } @@ -473,7 +475,7 @@ static int __maybe_unused mtu3_resume(struct device *dev) if (!ssusb->is_host) return 0; - ssusb_wakeup_disable(ssusb); + ssusb_wakeup_set(ssusb, false); ret = ssusb_clks_enable(ssusb); if (ret) goto clks_err; |