OpenWrt – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | From b6712b72d1273e792ee8a533048ba731a3709163 Mon Sep 17 00:00:00 2001 |
2 | From: Chunfeng Yun <chunfeng.yun@mediatek.com> |
||
3 | Date: Fri, 13 Oct 2017 17:10:44 +0800 |
||
4 | Subject: [PATCH 110/224] usb: mtu3: get optional vbus for host only mode |
||
5 | |||
6 | When dr_mode is set as USB_DR_MODE_HOST, it's better to try to |
||
7 | get optional vbus, this can increase flexibility, although we |
||
8 | can set vbus as always on for regulator or put it in host driver |
||
9 | to turn it on. |
||
10 | |||
11 | Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> |
||
12 | Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> |
||
13 | --- |
||
14 | drivers/usb/mtu3/mtu3_plat.c | 8 ++++---- |
||
15 | 1 file changed, 4 insertions(+), 4 deletions(-) |
||
16 | |||
17 | --- a/drivers/usb/mtu3/mtu3_plat.c |
||
18 | +++ b/drivers/usb/mtu3/mtu3_plat.c |
||
19 | @@ -300,10 +300,6 @@ static int get_ssusb_rscs(struct platfor |
||
20 | of_property_read_u32(node, "mediatek,u3p-dis-msk", |
||
21 | &ssusb->u3p_dis_msk); |
||
22 | |||
23 | - if (ssusb->dr_mode != USB_DR_MODE_OTG) |
||
24 | - return 0; |
||
25 | - |
||
26 | - /* if dual-role mode is supported */ |
||
27 | vbus = devm_regulator_get(&pdev->dev, "vbus"); |
||
28 | if (IS_ERR(vbus)) { |
||
29 | dev_err(dev, "failed to get vbus\n"); |
||
30 | @@ -311,6 +307,10 @@ static int get_ssusb_rscs(struct platfor |
||
31 | } |
||
32 | otg_sx->vbus = vbus; |
||
33 | |||
34 | + if (ssusb->dr_mode == USB_DR_MODE_HOST) |
||
35 | + return 0; |
||
36 | + |
||
37 | + /* if dual-role mode is supported */ |
||
38 | otg_sx->is_u3_drd = of_property_read_bool(node, "mediatek,usb3-drd"); |
||
39 | otg_sx->manual_drd_enabled = |
||
40 | of_property_read_bool(node, "enable-manual-drd"); |