From 6f125a95c5a63b48d791e53e0c638dbae6aecd99 Mon Sep 17 00:00:00 2001 From: Oleg Date: Mon, 26 Sep 2022 19:35:17 +0300 Subject: [PATCH] fix usb for nanopc t4 (#4235) --- .../archive/media-5.19/600-usb-fix.patch | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 patch/kernel/archive/media-5.19/600-usb-fix.patch diff --git a/patch/kernel/archive/media-5.19/600-usb-fix.patch b/patch/kernel/archive/media-5.19/600-usb-fix.patch new file mode 100644 index 0000000000..c4b775d411 --- /dev/null +++ b/patch/kernel/archive/media-5.19/600-usb-fix.patch @@ -0,0 +1,31 @@ +--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c ++++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c +@@ -1124,7 +1124,7 @@ + struct rockchip_usb2phy_port *rport, + struct device_node *child_np) + { +- int ret; ++ int ret, id; + + rport->port_id = USB2PHY_PORT_OTG; + rport->port_cfg = &rphy->phy_cfg->port_cfgs[USB2PHY_PORT_OTG]; +@@ -1162,13 +1162,15 @@ + + ret = devm_extcon_register_notifier(rphy->dev, rphy->edev, + EXTCON_USB_HOST, &rport->event_nb); +- if (ret) ++ if (ret) { + dev_err(rphy->dev, "register USB HOST notifier failed\n"); ++ goto out; ++ } + + if (!of_property_read_bool(rphy->dev->of_node, "extcon")) { + /* do initial sync of usb state */ +- ret = property_enabled(rphy->grf, &rport->port_cfg->utmi_id); +- extcon_set_state_sync(rphy->edev, EXTCON_USB_HOST, !ret); ++ id = property_enabled(rphy->grf, &rport->port_cfg->utmi_id); ++ extcon_set_state_sync(rphy->edev, EXTCON_USB_HOST, !id); + } + } + +