mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 22:51:35 +00:00
usb: mtu3: set invalid dr_mode as dual-role mode
Treat dr_mode of USB_DR_MODE_UNKNOWN as USB_DR_MODE_OTG to enhance functional robustness. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
parent
6638ec515f
commit
dd9d2f3aa3
@ -283,10 +283,8 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
|
||||
return PTR_ERR(ssusb->ippc_base);
|
||||
|
||||
ssusb->dr_mode = usb_get_dr_mode(dev);
|
||||
if (ssusb->dr_mode == USB_DR_MODE_UNKNOWN) {
|
||||
dev_err(dev, "dr_mode is error\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (ssusb->dr_mode == USB_DR_MODE_UNKNOWN)
|
||||
ssusb->dr_mode = USB_DR_MODE_OTG;
|
||||
|
||||
if (ssusb->dr_mode == USB_DR_MODE_PERIPHERAL)
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user