fix usb for nanopc t4 (#4235)
This commit is contained in:
parent
d4ea8e98be
commit
6f125a95c5
31
patch/kernel/archive/media-5.19/600-usb-fix.patch
Normal file
31
patch/kernel/archive/media-5.19/600-usb-fix.patch
Normal file
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user