OSDN Git Service

usb: mtu3: set otg_sel for u2port only if works as dual-role mode
authorChunfeng Yun <chunfeng.yun@mediatek.com>
Fri, 13 Oct 2017 09:10:46 +0000 (17:10 +0800)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 19 Oct 2017 07:38:13 +0000 (10:38 +0300)
commit4da72e6d2afb24c9cd5707eef7947c2f22dd03fc
tree059750fc27cd098350be497013f0cff167b6b02e
parentdd9d2f3aa3f8908fc3133041ccba45792549f25c
usb: mtu3: set otg_sel for u2port only if works as dual-role mode

When set otg_sel(SSUSB_U2_PORT_OTG_SEL) for u2port which supports
dual-role mode, the controller will automatically switch mode
between host and device according to IDDIG signal. But if the
u2port only supports device mode, and no IDDIG pin is provided,
setting otg_sel may cause failure of detection by host.
So set it only for dual-role mode.

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/mtu3/mtu3_core.c