Loading drivers/usb/phy/phy-msm-hsusb.c +9 −1 Original line number Diff line number Diff line Loading @@ -106,6 +106,7 @@ struct msm_hsphy { struct regulator *vdda33; struct regulator *vdda18; int vdd_levels[3]; /* none, low, high */ bool suspended; /* Using external VBUS/ID notification */ bool ext_vbus_id; Loading Loading @@ -285,6 +286,12 @@ static int msm_hsphy_set_suspend(struct usb_phy *uphy, int suspend) bool host = uphy->flags & PHY_HOST_MODE; bool chg_connected = uphy->flags & PHY_CHARGER_CONNECTED; if (!!suspend == phy->suspended) { dev_dbg(uphy->dev, "%s\n", suspend ? "already suspended" : "already resumed"); return 0; } if (suspend) { /* Clear interrupt latch register */ writel_relaxed(ALT_INTERRUPT_MASK, Loading Loading @@ -360,6 +367,7 @@ static int msm_hsphy_set_suspend(struct usb_phy *uphy, int suspend) } } phy->suspended = !!suspend; /* double-NOT coerces to bool value */ return 0; } Loading Loading @@ -477,6 +485,7 @@ static int msm_hsphy_probe(struct platform_device *pdev) phy->ext_vbus_id = of_property_read_bool(dev->of_node, "qcom,ext-vbus-id"); phy->phy.dev = dev; phy->vdd = devm_regulator_get(dev, "vdd"); if (IS_ERR(phy->vdd)) { Loading Loading @@ -528,7 +537,6 @@ static int msm_hsphy_probe(struct platform_device *pdev) if (of_property_read_bool(dev->of_node, "qcom,vbus-valid-override")) phy->phy.flags |= PHY_VBUS_VALID_OVERRIDE; phy->phy.dev = dev; phy->phy.init = msm_hsphy_init; phy->phy.set_suspend = msm_hsphy_set_suspend; phy->phy.notify_connect = msm_hsphy_notify_connect; Loading drivers/usb/phy/phy-msm-ssusb.c +9 −1 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ struct msm_ssphy { void __iomem *base; struct regulator *vdd; struct regulator *vdda18; bool suspended; int vdd_levels[3]; /* none, low, high */ int deemphasis_val; }; Loading Loading @@ -304,6 +305,12 @@ static int msm_ssphy_set_suspend(struct usb_phy *uphy, int suspend) void __iomem *base = phy->base; int ret = 0; if (!!suspend == phy->suspended) { dev_dbg(uphy->dev, "%s\n", suspend ? "already suspended" : "already resumed"); return 0; } if (suspend) { /* Clear REF_SS_PHY_EN */ msm_usb_write_readback(base, SS_PHY_CTRL_REG, REF_SS_PHY_EN, 0); Loading Loading @@ -341,6 +348,7 @@ static int msm_ssphy_set_suspend(struct usb_phy *uphy, int suspend) msm_ssphy_set_params(uphy); } phy->suspended = !!suspend; /* double-NOT coerces to bool value */ return ret; } Loading Loading @@ -407,6 +415,7 @@ static int msm_ssphy_probe(struct platform_device *pdev) return ret; } phy->phy.dev = dev; phy->vdd = devm_regulator_get(dev, "vdd"); if (IS_ERR(phy->vdd)) { dev_err(dev, "unable to get vdd supply\n"); Loading Loading @@ -446,7 +455,6 @@ static int msm_ssphy_probe(struct platform_device *pdev) &phy->deemphasis_val)) dev_dbg(dev, "unable to read ssphy deemphasis value\n"); phy->phy.dev = dev; phy->phy.init = msm_ssphy_init; phy->phy.set_suspend = msm_ssphy_set_suspend; phy->phy.set_params = msm_ssphy_set_params; Loading Loading
drivers/usb/phy/phy-msm-hsusb.c +9 −1 Original line number Diff line number Diff line Loading @@ -106,6 +106,7 @@ struct msm_hsphy { struct regulator *vdda33; struct regulator *vdda18; int vdd_levels[3]; /* none, low, high */ bool suspended; /* Using external VBUS/ID notification */ bool ext_vbus_id; Loading Loading @@ -285,6 +286,12 @@ static int msm_hsphy_set_suspend(struct usb_phy *uphy, int suspend) bool host = uphy->flags & PHY_HOST_MODE; bool chg_connected = uphy->flags & PHY_CHARGER_CONNECTED; if (!!suspend == phy->suspended) { dev_dbg(uphy->dev, "%s\n", suspend ? "already suspended" : "already resumed"); return 0; } if (suspend) { /* Clear interrupt latch register */ writel_relaxed(ALT_INTERRUPT_MASK, Loading Loading @@ -360,6 +367,7 @@ static int msm_hsphy_set_suspend(struct usb_phy *uphy, int suspend) } } phy->suspended = !!suspend; /* double-NOT coerces to bool value */ return 0; } Loading Loading @@ -477,6 +485,7 @@ static int msm_hsphy_probe(struct platform_device *pdev) phy->ext_vbus_id = of_property_read_bool(dev->of_node, "qcom,ext-vbus-id"); phy->phy.dev = dev; phy->vdd = devm_regulator_get(dev, "vdd"); if (IS_ERR(phy->vdd)) { Loading Loading @@ -528,7 +537,6 @@ static int msm_hsphy_probe(struct platform_device *pdev) if (of_property_read_bool(dev->of_node, "qcom,vbus-valid-override")) phy->phy.flags |= PHY_VBUS_VALID_OVERRIDE; phy->phy.dev = dev; phy->phy.init = msm_hsphy_init; phy->phy.set_suspend = msm_hsphy_set_suspend; phy->phy.notify_connect = msm_hsphy_notify_connect; Loading
drivers/usb/phy/phy-msm-ssusb.c +9 −1 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ struct msm_ssphy { void __iomem *base; struct regulator *vdd; struct regulator *vdda18; bool suspended; int vdd_levels[3]; /* none, low, high */ int deemphasis_val; }; Loading Loading @@ -304,6 +305,12 @@ static int msm_ssphy_set_suspend(struct usb_phy *uphy, int suspend) void __iomem *base = phy->base; int ret = 0; if (!!suspend == phy->suspended) { dev_dbg(uphy->dev, "%s\n", suspend ? "already suspended" : "already resumed"); return 0; } if (suspend) { /* Clear REF_SS_PHY_EN */ msm_usb_write_readback(base, SS_PHY_CTRL_REG, REF_SS_PHY_EN, 0); Loading Loading @@ -341,6 +348,7 @@ static int msm_ssphy_set_suspend(struct usb_phy *uphy, int suspend) msm_ssphy_set_params(uphy); } phy->suspended = !!suspend; /* double-NOT coerces to bool value */ return ret; } Loading Loading @@ -407,6 +415,7 @@ static int msm_ssphy_probe(struct platform_device *pdev) return ret; } phy->phy.dev = dev; phy->vdd = devm_regulator_get(dev, "vdd"); if (IS_ERR(phy->vdd)) { dev_err(dev, "unable to get vdd supply\n"); Loading Loading @@ -446,7 +455,6 @@ static int msm_ssphy_probe(struct platform_device *pdev) &phy->deemphasis_val)) dev_dbg(dev, "unable to read ssphy deemphasis value\n"); phy->phy.dev = dev; phy->phy.init = msm_ssphy_init; phy->phy.set_suspend = msm_ssphy_set_suspend; phy->phy.set_params = msm_ssphy_set_params; Loading