phy: rockchip-inno-combphy: fix error codes in rockchip_combphy_xlate

Return ERR_PTR(-ENODEV) if rockchip_combphy_xlate fails to
set phy type. This fixes the usb dwc3 controller probe fail
if the phy type has been set to PCIe. With this patch, the
rk1808 can support PCIe and USB 2.0 at the same time.

Change-Id: I1cd58f720cb361e606f5e2ac761b9ca71ddaa67e
Signed-off-by: William Wu <william.wu@rock-chips.com>
This commit is contained in:
William Wu
2018-12-26 14:21:33 +08:00
committed by Tao Huang
parent a894b97af8
commit 9c66895461

View File

@@ -508,7 +508,7 @@ static struct phy *rockchip_combphy_xlate(struct device *dev,
if (priv->phy_type != PHY_NONE && priv->phy_type != args->args[0]) {
dev_err(dev, "type select %d overwriting phy type %d\n",
args->args[0], priv->phy_type);
return ERR_PTR(-EINVAL);
return ERR_PTR(-ENODEV);
}
priv->phy_type = args->args[0];