Lines Matching defs:da8xx_ohci

54 	struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
57 ret = clk_prepare_enable(da8xx_ohci->usb11_clk);
61 ret = phy_init(da8xx_ohci->usb11_phy);
65 ret = phy_power_on(da8xx_ohci->usb11_phy);
72 phy_exit(da8xx_ohci->usb11_phy);
74 clk_disable_unprepare(da8xx_ohci->usb11_clk);
81 struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
83 phy_power_off(da8xx_ohci->usb11_phy);
84 phy_exit(da8xx_ohci->usb11_phy);
85 clk_disable_unprepare(da8xx_ohci->usb11_clk);
90 struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
94 if (!da8xx_ohci->vbus_reg)
98 ret = regulator_enable(da8xx_ohci->vbus_reg);
104 ret = regulator_disable(da8xx_ohci->vbus_reg);
116 struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
118 if (da8xx_ohci->vbus_reg)
119 return regulator_is_enabled(da8xx_ohci->vbus_reg);
126 struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
130 if (da8xx_ohci->oc_gpio)
131 return gpiod_get_value_cansleep(da8xx_ohci->oc_gpio);
133 if (!da8xx_ohci->vbus_reg)
136 ret = regulator_get_error_flags(da8xx_ohci->vbus_reg, &flags);
148 struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
150 if (da8xx_ohci->vbus_reg)
158 struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
160 if (da8xx_ohci->oc_gpio)
163 if (da8xx_ohci->vbus_reg)
183 struct da8xx_ohci_hcd *da8xx_ohci =
188 ohci_da8xx_set_power(da8xx_ohci->hcd, 0);
196 struct da8xx_ohci_hcd *da8xx_ohci = data;
197 struct device *dev = da8xx_ohci->hcd->self.controller;
200 if (gpiod_get_value_cansleep(da8xx_ohci->oc_gpio) &&
201 da8xx_ohci->vbus_reg) {
202 ret = regulator_disable(da8xx_ohci->vbus_reg);
212 struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
216 if (!da8xx_ohci->oc_gpio && da8xx_ohci->vbus_reg) {
217 da8xx_ohci->nb.notifier_call = ohci_da8xx_regulator_event;
218 ret = devm_regulator_register_notifier(da8xx_ohci->vbus_reg,
219 &da8xx_ohci->nb);
376 struct da8xx_ohci_hcd *da8xx_ohci;
386 da8xx_ohci = to_da8xx_ohci(hcd);
387 da8xx_ohci->hcd = hcd;
389 da8xx_ohci->usb11_clk = devm_clk_get(dev, NULL);
390 if (IS_ERR(da8xx_ohci->usb11_clk)) {
391 error = PTR_ERR(da8xx_ohci->usb11_clk);
397 da8xx_ohci->usb11_phy = devm_phy_get(dev, "usb-phy");
398 if (IS_ERR(da8xx_ohci->usb11_phy)) {
399 error = PTR_ERR(da8xx_ohci->usb11_phy);
405 da8xx_ohci->vbus_reg = devm_regulator_get_optional(dev, "vbus");
406 if (IS_ERR(da8xx_ohci->vbus_reg)) {
407 error = PTR_ERR(da8xx_ohci->vbus_reg);
409 da8xx_ohci->vbus_reg = NULL;
418 da8xx_ohci->oc_gpio = devm_gpiod_get_optional(dev, "oc", GPIOD_IN);
419 if (IS_ERR(da8xx_ohci->oc_gpio)) {
420 error = PTR_ERR(da8xx_ohci->oc_gpio);
424 if (da8xx_ohci->oc_gpio) {
425 oc_irq = gpiod_to_irq(da8xx_ohci->oc_gpio);
434 "OHCI over-current indicator", da8xx_ohci);