Lines Matching defs:da8xx_ohci

53 	struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
56 ret = clk_prepare_enable(da8xx_ohci->usb11_clk);
60 ret = phy_init(da8xx_ohci->usb11_phy);
64 ret = phy_power_on(da8xx_ohci->usb11_phy);
71 phy_exit(da8xx_ohci->usb11_phy);
73 clk_disable_unprepare(da8xx_ohci->usb11_clk);
80 struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
82 phy_power_off(da8xx_ohci->usb11_phy);
83 phy_exit(da8xx_ohci->usb11_phy);
84 clk_disable_unprepare(da8xx_ohci->usb11_clk);
89 struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
93 if (!da8xx_ohci->vbus_reg)
97 ret = regulator_enable(da8xx_ohci->vbus_reg);
103 ret = regulator_disable(da8xx_ohci->vbus_reg);
115 struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
117 if (da8xx_ohci->vbus_reg)
118 return regulator_is_enabled(da8xx_ohci->vbus_reg);
125 struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
129 if (da8xx_ohci->oc_gpio)
130 return gpiod_get_value_cansleep(da8xx_ohci->oc_gpio);
132 if (!da8xx_ohci->vbus_reg)
135 ret = regulator_get_error_flags(da8xx_ohci->vbus_reg, &flags);
147 struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
149 if (da8xx_ohci->vbus_reg)
157 struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
159 if (da8xx_ohci->oc_gpio)
162 if (da8xx_ohci->vbus_reg)
182 struct da8xx_ohci_hcd *da8xx_ohci =
187 ohci_da8xx_set_power(da8xx_ohci->hcd, 0);
195 struct da8xx_ohci_hcd *da8xx_ohci = data;
196 struct device *dev = da8xx_ohci->hcd->self.controller;
199 if (gpiod_get_value_cansleep(da8xx_ohci->oc_gpio) &&
200 da8xx_ohci->vbus_reg) {
201 ret = regulator_disable(da8xx_ohci->vbus_reg);
211 struct da8xx_ohci_hcd *da8xx_ohci = to_da8xx_ohci(hcd);
215 if (!da8xx_ohci->oc_gpio && da8xx_ohci->vbus_reg) {
216 da8xx_ohci->nb.notifier_call = ohci_da8xx_regulator_event;
217 ret = devm_regulator_register_notifier(da8xx_ohci->vbus_reg,
218 &da8xx_ohci->nb);
375 struct da8xx_ohci_hcd *da8xx_ohci;
385 da8xx_ohci = to_da8xx_ohci(hcd);
386 da8xx_ohci->hcd = hcd;
388 da8xx_ohci->usb11_clk = devm_clk_get(dev, NULL);
389 if (IS_ERR(da8xx_ohci->usb11_clk)) {
390 error = PTR_ERR(da8xx_ohci->usb11_clk);
396 da8xx_ohci->usb11_phy = devm_phy_get(dev, "usb-phy");
397 if (IS_ERR(da8xx_ohci->usb11_phy)) {
398 error = PTR_ERR(da8xx_ohci->usb11_phy);
404 da8xx_ohci->vbus_reg = devm_regulator_get_optional(dev, "vbus");
405 if (IS_ERR(da8xx_ohci->vbus_reg)) {
406 error = PTR_ERR(da8xx_ohci->vbus_reg);
408 da8xx_ohci->vbus_reg = NULL;
417 da8xx_ohci->oc_gpio = devm_gpiod_get_optional(dev, "oc", GPIOD_IN);
418 if (IS_ERR(da8xx_ohci->oc_gpio)) {
419 error = PTR_ERR(da8xx_ohci->oc_gpio);
423 if (da8xx_ohci->oc_gpio) {
424 oc_irq = gpiod_to_irq(da8xx_ohci->oc_gpio);
433 "OHCI over-current indicator", da8xx_ohci);