Lines Matching refs:uphy

28 	struct qcom_usb_hsic_phy *uphy = phy_get_drvdata(phy);  in qcom_usb_hsic_phy_power_on()  local
29 struct ulpi *ulpi = uphy->ulpi; in qcom_usb_hsic_phy_power_on()
33 ret = clk_prepare_enable(uphy->phy_clk); in qcom_usb_hsic_phy_power_on()
37 ret = clk_prepare_enable(uphy->cal_clk); in qcom_usb_hsic_phy_power_on()
41 ret = clk_prepare_enable(uphy->cal_sleep_clk); in qcom_usb_hsic_phy_power_on()
56 pins_default = pinctrl_lookup_state(uphy->pctl, PINCTRL_STATE_DEFAULT); in qcom_usb_hsic_phy_power_on()
62 ret = pinctrl_select_state(uphy->pctl, pins_default); in qcom_usb_hsic_phy_power_on()
79 clk_disable_unprepare(uphy->cal_sleep_clk); in qcom_usb_hsic_phy_power_on()
81 clk_disable_unprepare(uphy->cal_clk); in qcom_usb_hsic_phy_power_on()
83 clk_disable_unprepare(uphy->phy_clk); in qcom_usb_hsic_phy_power_on()
89 struct qcom_usb_hsic_phy *uphy = phy_get_drvdata(phy); in qcom_usb_hsic_phy_power_off() local
91 clk_disable_unprepare(uphy->cal_sleep_clk); in qcom_usb_hsic_phy_power_off()
92 clk_disable_unprepare(uphy->cal_clk); in qcom_usb_hsic_phy_power_off()
93 clk_disable_unprepare(uphy->phy_clk); in qcom_usb_hsic_phy_power_off()
106 struct qcom_usb_hsic_phy *uphy; in qcom_usb_hsic_phy_probe() local
110 uphy = devm_kzalloc(&ulpi->dev, sizeof(*uphy), GFP_KERNEL); in qcom_usb_hsic_phy_probe()
111 if (!uphy) in qcom_usb_hsic_phy_probe()
113 ulpi_set_drvdata(ulpi, uphy); in qcom_usb_hsic_phy_probe()
115 uphy->ulpi = ulpi; in qcom_usb_hsic_phy_probe()
116 uphy->pctl = devm_pinctrl_get(&ulpi->dev); in qcom_usb_hsic_phy_probe()
117 if (IS_ERR(uphy->pctl)) in qcom_usb_hsic_phy_probe()
118 return PTR_ERR(uphy->pctl); in qcom_usb_hsic_phy_probe()
120 uphy->phy_clk = clk = devm_clk_get(&ulpi->dev, "phy"); in qcom_usb_hsic_phy_probe()
124 uphy->cal_clk = clk = devm_clk_get(&ulpi->dev, "cal"); in qcom_usb_hsic_phy_probe()
128 uphy->cal_sleep_clk = clk = devm_clk_get(&ulpi->dev, "cal_sleep"); in qcom_usb_hsic_phy_probe()
132 uphy->phy = devm_phy_create(&ulpi->dev, ulpi->dev.of_node, in qcom_usb_hsic_phy_probe()
134 if (IS_ERR(uphy->phy)) in qcom_usb_hsic_phy_probe()
135 return PTR_ERR(uphy->phy); in qcom_usb_hsic_phy_probe()
136 phy_set_drvdata(uphy->phy, uphy); in qcom_usb_hsic_phy_probe()