Lines Matching defs:phy

17 #include <linux/phy/phy.h>
23 struct phy *phy;
29 static int ipq4019_ss_phy_power_off(struct phy *_phy)
31 struct ipq4019_usb_phy *phy = phy_get_drvdata(_phy);
33 reset_control_assert(phy->por_rst);
39 static int ipq4019_ss_phy_power_on(struct phy *_phy)
41 struct ipq4019_usb_phy *phy = phy_get_drvdata(_phy);
45 reset_control_deassert(phy->por_rst);
55 static int ipq4019_hs_phy_power_off(struct phy *_phy)
57 struct ipq4019_usb_phy *phy = phy_get_drvdata(_phy);
59 reset_control_assert(phy->por_rst);
62 reset_control_assert(phy->srif_rst);
68 static int ipq4019_hs_phy_power_on(struct phy *_phy)
70 struct ipq4019_usb_phy *phy = phy_get_drvdata(_phy);
74 reset_control_deassert(phy->srif_rst);
77 reset_control_deassert(phy->por_rst);
88 { .compatible = "qcom,usb-hs-ipq4019-phy", .data = &ipq4019_usb_hs_phy_ops},
89 { .compatible = "qcom,usb-ss-ipq4019-phy", .data = &ipq4019_usb_ss_phy_ops},
98 struct ipq4019_usb_phy *phy;
100 phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL);
101 if (!phy)
104 phy->dev = &pdev->dev;
105 phy->base = devm_platform_ioremap_resource(pdev, 0);
106 if (IS_ERR(phy->base)) {
108 return PTR_ERR(phy->base);
111 phy->por_rst = devm_reset_control_get(phy->dev, "por_rst");
112 if (IS_ERR(phy->por_rst)) {
113 if (PTR_ERR(phy->por_rst) != -EPROBE_DEFER)
115 return PTR_ERR(phy->por_rst);
118 phy->srif_rst = devm_reset_control_get_optional(phy->dev, "srif_rst");
119 if (IS_ERR(phy->srif_rst))
120 return PTR_ERR(phy->srif_rst);
122 phy->phy = devm_phy_create(dev, NULL, of_device_get_match_data(dev));
123 if (IS_ERR(phy->phy)) {
125 return PTR_ERR(phy->phy);
127 phy_set_drvdata(phy->phy, phy);
138 .name = "ipq4019-usb-phy",
143 MODULE_DESCRIPTION("QCOM/IPQ4019 USB phy driver");