Lines Matching +full:generic +full:- +full:ohci

4  * SPDX-License-Identifier:	GPL-2.0+
12 #include <generic-phy.h>
14 #include "ohci.h"
17 # error "Generic OHCI driver requires CONFIG_USB_OHCI_NEW"
21 ohci_t ohci; member
34 ret = generic_phy_get_by_index(dev, index, &priv->phy); in ohci_setup_phy()
36 if (ret != -ENOENT) { in ohci_setup_phy()
41 ret = generic_phy_init(&priv->phy); in ohci_setup_phy()
47 ret = generic_phy_power_on(&priv->phy); in ohci_setup_phy()
50 return generic_phy_exit(&priv->phy); in ohci_setup_phy()
62 if (generic_phy_valid(&priv->phy)) { in ohci_shutdown_phy()
63 ret = generic_phy_power_off(&priv->phy); in ohci_shutdown_phy()
69 ret = generic_phy_exit(&priv->phy); in ohci_shutdown_phy()
86 priv->clock_count = 0; in ohci_usb_probe()
87 clock_nb = dev_count_phandle_with_args(dev, "clocks", "#clock-cells"); in ohci_usb_probe()
89 priv->clocks = devm_kcalloc(dev, clock_nb, sizeof(struct clk), in ohci_usb_probe()
91 if (!priv->clocks) in ohci_usb_probe()
92 return -ENOMEM; in ohci_usb_probe()
95 err = clk_get_by_index(dev, i, &priv->clocks[i]); in ohci_usb_probe()
99 err = clk_enable(&priv->clocks[i]); in ohci_usb_probe()
100 if (err && err != -ENOSYS) { in ohci_usb_probe()
102 clk_free(&priv->clocks[i]); in ohci_usb_probe()
105 priv->clock_count++; in ohci_usb_probe()
107 } else if (clock_nb != -ENOENT) { in ohci_usb_probe()
112 priv->reset_count = 0; in ohci_usb_probe()
113 reset_nb = dev_count_phandle_with_args(dev, "resets", "#reset-cells"); in ohci_usb_probe()
115 priv->resets = devm_kcalloc(dev, reset_nb, in ohci_usb_probe()
118 if (!priv->resets) in ohci_usb_probe()
119 return -ENOMEM; in ohci_usb_probe()
122 err = reset_get_by_index(dev, i, &priv->resets[i]); in ohci_usb_probe()
126 err = reset_deassert(&priv->resets[i]); in ohci_usb_probe()
129 reset_free(&priv->resets[i]); in ohci_usb_probe()
132 priv->reset_count++; in ohci_usb_probe()
134 } else if (reset_nb != -ENOENT) { in ohci_usb_probe()
156 ret = reset_release_all(priv->resets, priv->reset_count); in ohci_usb_probe()
160 ret = clk_release_all(priv->clocks, priv->clock_count); in ohci_usb_probe()
180 ret = reset_release_all(priv->resets, priv->reset_count); in ohci_usb_remove()
184 return clk_release_all(priv->clocks, priv->clock_count); in ohci_usb_remove()
188 { .compatible = "generic-ohci" },