Commit dd9d2f3a authored by Chunfeng Yun's avatar Chunfeng Yun Committed by Felipe Balbi

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: default avatarChunfeng Yun <chunfeng.yun@mediatek.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 6638ec51
...@@ -283,10 +283,8 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb) ...@@ -283,10 +283,8 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
return PTR_ERR(ssusb->ippc_base); return PTR_ERR(ssusb->ippc_base);
ssusb->dr_mode = usb_get_dr_mode(dev); ssusb->dr_mode = usb_get_dr_mode(dev);
if (ssusb->dr_mode == USB_DR_MODE_UNKNOWN) { if (ssusb->dr_mode == USB_DR_MODE_UNKNOWN)
dev_err(dev, "dr_mode is error\n"); ssusb->dr_mode = USB_DR_MODE_OTG;
return -EINVAL;
}
if (ssusb->dr_mode == USB_DR_MODE_PERIPHERAL) if (ssusb->dr_mode == USB_DR_MODE_PERIPHERAL)
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment