提交 51c236d5 编写于 作者: C Chunfeng Yun 提交者: Greg Kroah-Hartman

usb: mtu3: skip getting extcon when use manual drd switch

When use manual drd switch, extcon is not used in fact, so no
need get it even it exists, just skip it like using role switch.
Signed-off-by: NChunfeng Yun <chunfeng.yun@mediatek.com>
Link: https://lore.kernel.org/r/1622182260-23767-5-git-send-email-chunfeng.yun@mediatek.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 f3ec606e
......@@ -299,7 +299,10 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
of_property_read_bool(node, "enable-manual-drd");
otg_sx->role_sw_used = of_property_read_bool(node, "usb-role-switch");
if (!otg_sx->role_sw_used && of_property_read_bool(node, "extcon")) {
if (otg_sx->role_sw_used || otg_sx->manual_drd_enabled)
goto out;
if (of_property_read_bool(node, "extcon")) {
otg_sx->edev = extcon_get_edev_by_phandle(ssusb->dev, 0);
if (IS_ERR(otg_sx->edev)) {
return dev_err_probe(dev, PTR_ERR(otg_sx->edev),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册