diff options
author | Chunfeng Yun <chunfeng.yun@mediatek.com> | 2017-10-13 12:10:42 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2017-10-19 10:38:11 +0300 |
commit | c776f2c3e81308977e95a228b0665e3d5c63dff3 (patch) | |
tree | 2e0daefc114ea8a8e6ab388b72264749d4157d81 /drivers/usb/mtu3/mtu3_host.c | |
parent | 1a46dfea0841d5ebc08fafe7b3f60d33581f8e27 (diff) | |
download | linux-c776f2c3e81308977e95a228b0665e3d5c63dff3.tar.xz |
usb: mtu3: use FORCE/RG_IDDIG to implement manual DRD switch
In order to keep manual DRD switch independent on IDDIG interrupt,
make use of FORCE/RG_IDDIG instead of IDDIG EINT interrupt to
implement manual DRD switch function.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/mtu3/mtu3_host.c')
-rw-r--r-- | drivers/usb/mtu3/mtu3_host.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/mtu3/mtu3_host.c b/drivers/usb/mtu3/mtu3_host.c index edcc59148171..ec76b86dd887 100644 --- a/drivers/usb/mtu3/mtu3_host.c +++ b/drivers/usb/mtu3/mtu3_host.c @@ -189,6 +189,8 @@ int ssusb_host_disable(struct ssusb_mtk *ssusb, bool suspend) static void ssusb_host_setup(struct ssusb_mtk *ssusb) { + struct otg_switch_mtk *otg_sx = &ssusb->otg_switch; + host_ports_num_get(ssusb); /* @@ -197,6 +199,9 @@ static void ssusb_host_setup(struct ssusb_mtk *ssusb) */ ssusb_host_enable(ssusb); + if (otg_sx->manual_drd_enabled) + ssusb_set_force_mode(ssusb, MTU3_DR_FORCE_HOST); + /* if port0 supports dual-role, works as host mode by default */ ssusb_set_vbus(&ssusb->otg_switch, 1); } |