aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorTom Rini2024-01-20 11:39:13 -0500
committerTom Rini2024-01-20 11:39:13 -0500
commit3c04fcf3137d5f694d52b8f355373e4baabe5f78 (patch)
tree1dcce68d488046855985cab3fc653a966e64fb93 /drivers/usb
parentfea3efb757f7a9c6831c023cb456f9fa5fd0278e (diff)
parent172c846f39f19738630a3a1854689f7df1a08312 (diff)
Merge patch series "k3-j721e: beagleboneai: Fix USB"
Roger Quadros <rogerq@kernel.org> says: Hi, This series fixes USB operation on k3-j721e based boards.
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/cdns3/core.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c
index 644a9791b9c..12a741c6ea7 100644
--- a/drivers/usb/cdns3/core.c
+++ b/drivers/usb/cdns3/core.c
@@ -333,20 +333,28 @@ static int cdns3_probe(struct cdns3 *cdns)
mutex_init(&cdns->mutex);
ret = generic_phy_get_by_name(dev, "cdns3,usb2-phy", &cdns->usb2_phy);
- if (ret)
- dev_warn(dev, "Unable to get USB2 phy (ret %d)\n", ret);
-
- ret = generic_phy_init(&cdns->usb2_phy);
- if (ret)
+ if (!ret) {
+ ret = generic_phy_init(&cdns->usb2_phy);
+ if (ret) {
+ dev_err(dev, "USB2 PHY init failed: %d\n", ret);
+ return ret;
+ }
+ } else if (ret != -ENOENT && ret != -ENODATA) {
+ dev_err(dev, "Couldn't get USB2 PHY: %d\n", ret);
return ret;
+ }
ret = generic_phy_get_by_name(dev, "cdns3,usb3-phy", &cdns->usb3_phy);
- if (ret)
- dev_warn(dev, "Unable to get USB3 phy (ret %d)\n", ret);
-
- ret = generic_phy_init(&cdns->usb3_phy);
- if (ret)
+ if (!ret) {
+ ret = generic_phy_init(&cdns->usb3_phy);
+ if (ret) {
+ dev_err(dev, "USB3 PHY init failed: %d\n", ret);
+ return ret;
+ }
+ } else if (ret != -ENOENT && ret != -ENODATA) {
+ dev_err(dev, "Couldn't get USB3 PHY: %d\n", ret);
return ret;
+ }
ret = generic_phy_power_on(&cdns->usb2_phy);
if (ret)