Lines Matching refs:tegra_phy
944 static int utmi_phy_probe(struct tegra_usb_phy *tegra_phy, in utmi_phy_probe() argument
951 tegra_phy->is_ulpi_phy = false; in utmi_phy_probe()
959 tegra_phy->pad_regs = devm_ioremap(&pdev->dev, res->start, in utmi_phy_probe()
961 if (!tegra_phy->pad_regs) { in utmi_phy_probe()
966 tegra_phy->config = devm_kzalloc(&pdev->dev, sizeof(*config), in utmi_phy_probe()
968 if (!tegra_phy->config) in utmi_phy_probe()
971 config = tegra_phy->config; in utmi_phy_probe()
1003 if (tegra_phy->soc_config->requires_extra_tuning_parameters) { in utmi_phy_probe()
1058 struct tegra_usb_phy *tegra_phy = NULL; in tegra_usb_phy_probe() local
1063 tegra_phy = devm_kzalloc(&pdev->dev, sizeof(*tegra_phy), GFP_KERNEL); in tegra_usb_phy_probe()
1064 if (!tegra_phy) in tegra_usb_phy_probe()
1072 tegra_phy->soc_config = match->data; in tegra_usb_phy_probe()
1080 tegra_phy->regs = devm_ioremap(&pdev->dev, res->start, in tegra_usb_phy_probe()
1082 if (!tegra_phy->regs) { in tegra_usb_phy_probe()
1087 tegra_phy->is_legacy_phy = in tegra_usb_phy_probe()
1093 err = utmi_phy_probe(tegra_phy, pdev); in tegra_usb_phy_probe()
1099 tegra_phy->is_ulpi_phy = true; in tegra_usb_phy_probe()
1101 tegra_phy->reset_gpio = in tegra_usb_phy_probe()
1103 if (!gpio_is_valid(tegra_phy->reset_gpio)) { in tegra_usb_phy_probe()
1105 "Invalid GPIO: %d\n", tegra_phy->reset_gpio); in tegra_usb_phy_probe()
1106 return tegra_phy->reset_gpio; in tegra_usb_phy_probe()
1108 tegra_phy->config = NULL; in tegra_usb_phy_probe()
1118 tegra_phy->mode = usb_get_dr_mode(&pdev->dev); in tegra_usb_phy_probe()
1120 tegra_phy->mode = USB_DR_MODE_HOST; in tegra_usb_phy_probe()
1122 if (tegra_phy->mode == USB_DR_MODE_UNKNOWN) { in tegra_usb_phy_probe()
1129 tegra_phy->vbus = devm_regulator_get(&pdev->dev, "vbus"); in tegra_usb_phy_probe()
1130 if (IS_ERR(tegra_phy->vbus)) in tegra_usb_phy_probe()
1131 return PTR_ERR(tegra_phy->vbus); in tegra_usb_phy_probe()
1134 tegra_phy->vbus = ERR_PTR(-ENODEV); in tegra_usb_phy_probe()
1137 tegra_phy->u_phy.dev = &pdev->dev; in tegra_usb_phy_probe()
1138 err = tegra_usb_phy_init(tegra_phy); in tegra_usb_phy_probe()
1142 tegra_phy->u_phy.set_suspend = tegra_usb_phy_suspend; in tegra_usb_phy_probe()
1144 platform_set_drvdata(pdev, tegra_phy); in tegra_usb_phy_probe()
1146 err = usb_add_phy_dev(&tegra_phy->u_phy); in tegra_usb_phy_probe()
1148 tegra_usb_phy_close(tegra_phy); in tegra_usb_phy_probe()
1157 struct tegra_usb_phy *tegra_phy = platform_get_drvdata(pdev); in tegra_usb_phy_remove() local
1159 usb_remove_phy(&tegra_phy->u_phy); in tegra_usb_phy_remove()
1160 tegra_usb_phy_close(tegra_phy); in tegra_usb_phy_remove()