Lines Matching refs:lane
109 int tegra_xusb_lane_parse_dt(struct tegra_xusb_lane *lane, in tegra_xusb_lane_parse_dt() argument
112 struct device *dev = &lane->pad->dev; in tegra_xusb_lane_parse_dt()
120 err = match_string(lane->soc->funcs, lane->soc->num_funcs, function); in tegra_xusb_lane_parse_dt()
127 lane->function = err; in tegra_xusb_lane_parse_dt()
135 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra_xusb_lane_destroy() local
137 lane->pad->ops->remove(lane); in tegra_xusb_lane_destroy()
185 struct phy *lane; in tegra_xusb_pad_register() local
193 pad->lanes = devm_kcalloc(&pad->dev, pad->soc->num_lanes, sizeof(lane), in tegra_xusb_pad_register()
202 struct tegra_xusb_lane *lane; in tegra_xusb_pad_register() local
217 lane = pad->ops->probe(pad, np, i); in tegra_xusb_pad_register()
218 if (IS_ERR(lane)) { in tegra_xusb_pad_register()
220 err = PTR_ERR(lane); in tegra_xusb_pad_register()
224 list_add_tail(&lane->list, &pad->padctl->lanes); in tegra_xusb_pad_register()
225 phy_set_drvdata(pad->lanes[i], lane); in tegra_xusb_pad_register()
314 static void tegra_xusb_lane_program(struct tegra_xusb_lane *lane) in tegra_xusb_lane_program() argument
316 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra_xusb_lane_program()
317 const struct tegra_xusb_lane_soc *soc = lane->soc; in tegra_xusb_lane_program()
324 if (lane->pad->ops->iddq_enable) in tegra_xusb_lane_program()
325 lane->pad->ops->iddq_enable(lane); in tegra_xusb_lane_program()
330 value |= lane->function << soc->shift; in tegra_xusb_lane_program()
333 if (lane->pad->ops->iddq_disable) in tegra_xusb_lane_program()
334 lane->pad->ops->iddq_disable(lane); in tegra_xusb_lane_program()
342 struct tegra_xusb_lane *lane; in tegra_xusb_pad_program() local
345 lane = phy_get_drvdata(pad->lanes[i]); in tegra_xusb_pad_program()
346 tegra_xusb_lane_program(lane); in tegra_xusb_pad_program()
385 bool tegra_xusb_lane_check(struct tegra_xusb_lane *lane, in tegra_xusb_lane_check() argument
388 const char *func = lane->soc->funcs[lane->function]; in tegra_xusb_lane_check()
397 struct tegra_xusb_lane *lane, *hit = ERR_PTR(-ENODEV); in tegra_xusb_find_lane() local
404 list_for_each_entry(lane, &padctl->lanes, list) { in tegra_xusb_find_lane()
405 if (strcmp(lane->soc->name, name) == 0) { in tegra_xusb_find_lane()
406 hit = lane; in tegra_xusb_find_lane()
420 struct tegra_xusb_lane *lane, *match = ERR_PTR(-ENODEV); in tegra_xusb_port_find_lane() local
426 lane = tegra_xusb_find_lane(port->padctl, map->type, in tegra_xusb_port_find_lane()
428 if (IS_ERR(lane)) in tegra_xusb_port_find_lane()
431 if (!tegra_xusb_lane_check(lane, function)) in tegra_xusb_port_find_lane()
438 match = lane; in tegra_xusb_port_find_lane()
655 struct tegra_xusb_lane *lane; in tegra_xusb_setup_usb_role_switch() local
690 lane = tegra_xusb_find_lane(port->padctl, "usb2", port->index); in tegra_xusb_setup_usb_role_switch()
696 port->usb_phy.dev = &lane->pad->lanes[port->index]->dev; in tegra_xusb_setup_usb_role_switch()
781 usb2->base.lane = usb2->base.ops->map(&usb2->base); in tegra_xusb_add_usb2_port()
782 if (IS_ERR(usb2->base.lane)) { in tegra_xusb_add_usb2_port()
783 err = PTR_ERR(usb2->base.lane); in tegra_xusb_add_usb2_port()
847 ulpi->base.lane = ulpi->base.ops->map(&ulpi->base); in tegra_xusb_add_ulpi_port()
848 if (IS_ERR(ulpi->base.lane)) { in tegra_xusb_add_ulpi_port()
849 err = PTR_ERR(ulpi->base.lane); in tegra_xusb_add_ulpi_port()
902 hsic->base.lane = hsic->base.ops->map(&hsic->base); in tegra_xusb_add_hsic_port()
903 if (IS_ERR(hsic->base.lane)) { in tegra_xusb_add_hsic_port()
904 err = PTR_ERR(hsic->base.lane); in tegra_xusb_add_hsic_port()
988 usb3->base.lane = usb3->base.ops->map(&usb3->base); in tegra_xusb_add_usb3_port()
989 if (IS_ERR(usb3->base.lane)) { in tegra_xusb_add_usb3_port()
990 err = PTR_ERR(usb3->base.lane); in tegra_xusb_add_usb3_port()
1375 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra_xusb_padctl_enable_phy_sleepwalk() local
1377 if (lane->pad->ops->enable_phy_sleepwalk) in tegra_xusb_padctl_enable_phy_sleepwalk()
1378 return lane->pad->ops->enable_phy_sleepwalk(lane, speed); in tegra_xusb_padctl_enable_phy_sleepwalk()
1386 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra_xusb_padctl_disable_phy_sleepwalk() local
1388 if (lane->pad->ops->disable_phy_sleepwalk) in tegra_xusb_padctl_disable_phy_sleepwalk()
1389 return lane->pad->ops->disable_phy_sleepwalk(lane); in tegra_xusb_padctl_disable_phy_sleepwalk()
1397 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra_xusb_padctl_enable_phy_wake() local
1399 if (lane->pad->ops->enable_phy_wake) in tegra_xusb_padctl_enable_phy_wake()
1400 return lane->pad->ops->enable_phy_wake(lane); in tegra_xusb_padctl_enable_phy_wake()
1408 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra_xusb_padctl_disable_phy_wake() local
1410 if (lane->pad->ops->disable_phy_wake) in tegra_xusb_padctl_disable_phy_wake()
1411 return lane->pad->ops->disable_phy_wake(lane); in tegra_xusb_padctl_disable_phy_wake()
1419 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra_xusb_padctl_remote_wake_detected() local
1421 if (lane->pad->ops->remote_wake_detected) in tegra_xusb_padctl_remote_wake_detected()
1422 return lane->pad->ops->remote_wake_detected(lane); in tegra_xusb_padctl_remote_wake_detected()
1451 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra_phy_xusb_utmi_port_reset() local
1452 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra_phy_xusb_utmi_port_reset()