Lines Matching full:lane
115 int tegra_xusb_lane_parse_dt(struct tegra_xusb_lane *lane, in tegra_xusb_lane_parse_dt() argument
118 struct device *dev = &lane->pad->dev; in tegra_xusb_lane_parse_dt()
126 err = match_string(lane->soc->funcs, lane->soc->num_funcs, function); in tegra_xusb_lane_parse_dt()
128 dev_err(dev, "invalid function \"%s\" for lane \"%pOFn\"\n", in tegra_xusb_lane_parse_dt()
133 lane->function = err; in tegra_xusb_lane_parse_dt()
141 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra_xusb_lane_destroy() local
143 lane->pad->ops->remove(lane); in tegra_xusb_lane_destroy()
191 struct phy *lane; in tegra_xusb_pad_register() local
199 pad->lanes = devm_kcalloc(&pad->dev, pad->soc->num_lanes, sizeof(lane), in tegra_xusb_pad_register()
208 struct tegra_xusb_lane *lane; in tegra_xusb_pad_register() local
223 lane = pad->ops->probe(pad, np, i); in tegra_xusb_pad_register()
224 if (IS_ERR(lane)) { in tegra_xusb_pad_register()
226 err = PTR_ERR(lane); in tegra_xusb_pad_register()
230 list_add_tail(&lane->list, &pad->padctl->lanes); in tegra_xusb_pad_register()
231 phy_set_drvdata(pad->lanes[i], lane); in tegra_xusb_pad_register()
320 static void tegra_xusb_lane_program(struct tegra_xusb_lane *lane) in tegra_xusb_lane_program() argument
322 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra_xusb_lane_program()
323 const struct tegra_xusb_lane_soc *soc = lane->soc; in tegra_xusb_lane_program()
330 if (lane->pad->ops->iddq_enable) in tegra_xusb_lane_program()
331 lane->pad->ops->iddq_enable(lane); in tegra_xusb_lane_program()
336 value |= lane->function << soc->shift; in tegra_xusb_lane_program()
339 if (lane->pad->ops->iddq_disable) in tegra_xusb_lane_program()
340 lane->pad->ops->iddq_disable(lane); in tegra_xusb_lane_program()
348 struct tegra_xusb_lane *lane; in tegra_xusb_pad_program() local
351 lane = phy_get_drvdata(pad->lanes[i]); in tegra_xusb_pad_program()
352 tegra_xusb_lane_program(lane); in tegra_xusb_pad_program()
391 bool tegra_xusb_lane_check(struct tegra_xusb_lane *lane, in tegra_xusb_lane_check() argument
394 const char *func = lane->soc->funcs[lane->function]; in tegra_xusb_lane_check()
403 struct tegra_xusb_lane *lane, *hit = ERR_PTR(-ENODEV); in tegra_xusb_find_lane() local
410 list_for_each_entry(lane, &padctl->lanes, list) { in tegra_xusb_find_lane()
411 if (strcmp(lane->soc->name, name) == 0) { in tegra_xusb_find_lane()
412 hit = lane; in tegra_xusb_find_lane()
426 struct tegra_xusb_lane *lane, *match = ERR_PTR(-ENODEV); in tegra_xusb_port_find_lane() local
432 lane = tegra_xusb_find_lane(port->padctl, map->type, in tegra_xusb_port_find_lane()
434 if (IS_ERR(lane)) in tegra_xusb_port_find_lane()
437 if (!tegra_xusb_lane_check(lane, function)) in tegra_xusb_port_find_lane()
444 match = lane; in tegra_xusb_port_find_lane()
662 struct tegra_xusb_lane *lane; in tegra_xusb_setup_usb_role_switch() local
701 lane = tegra_xusb_find_lane(port->padctl, "usb2", port->index); in tegra_xusb_setup_usb_role_switch()
707 port->usb_phy.dev = &lane->pad->lanes[port->index]->dev; in tegra_xusb_setup_usb_role_switch()
809 usb2->base.lane = usb2->base.ops->map(&usb2->base); in tegra_xusb_add_usb2_port()
810 if (IS_ERR(usb2->base.lane)) { in tegra_xusb_add_usb2_port()
811 err = PTR_ERR(usb2->base.lane); in tegra_xusb_add_usb2_port()
876 ulpi->base.lane = ulpi->base.ops->map(&ulpi->base); in tegra_xusb_add_ulpi_port()
877 if (IS_ERR(ulpi->base.lane)) { in tegra_xusb_add_ulpi_port()
878 err = PTR_ERR(ulpi->base.lane); in tegra_xusb_add_ulpi_port()
932 hsic->base.lane = hsic->base.ops->map(&hsic->base); in tegra_xusb_add_hsic_port()
933 if (IS_ERR(hsic->base.lane)) { in tegra_xusb_add_hsic_port()
934 err = PTR_ERR(hsic->base.lane); in tegra_xusb_add_hsic_port()
1017 usb3->base.lane = usb3->base.ops->map(&usb3->base); in tegra_xusb_add_usb3_port()
1018 if (IS_ERR(usb3->base.lane)) { in tegra_xusb_add_usb3_port()
1019 err = PTR_ERR(usb3->base.lane); in tegra_xusb_add_usb3_port()
1395 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra_xusb_padctl_enable_phy_sleepwalk() local
1397 if (lane->pad->ops->enable_phy_sleepwalk) in tegra_xusb_padctl_enable_phy_sleepwalk()
1398 return lane->pad->ops->enable_phy_sleepwalk(lane, speed); in tegra_xusb_padctl_enable_phy_sleepwalk()
1406 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra_xusb_padctl_disable_phy_sleepwalk() local
1408 if (lane->pad->ops->disable_phy_sleepwalk) in tegra_xusb_padctl_disable_phy_sleepwalk()
1409 return lane->pad->ops->disable_phy_sleepwalk(lane); in tegra_xusb_padctl_disable_phy_sleepwalk()
1417 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra_xusb_padctl_enable_phy_wake() local
1419 if (lane->pad->ops->enable_phy_wake) in tegra_xusb_padctl_enable_phy_wake()
1420 return lane->pad->ops->enable_phy_wake(lane); in tegra_xusb_padctl_enable_phy_wake()
1428 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra_xusb_padctl_disable_phy_wake() local
1430 if (lane->pad->ops->disable_phy_wake) in tegra_xusb_padctl_disable_phy_wake()
1431 return lane->pad->ops->disable_phy_wake(lane); in tegra_xusb_padctl_disable_phy_wake()
1439 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra_xusb_padctl_remote_wake_detected() local
1441 if (lane->pad->ops->remote_wake_detected) in tegra_xusb_padctl_remote_wake_detected()
1442 return lane->pad->ops->remote_wake_detected(lane); in tegra_xusb_padctl_remote_wake_detected()
1471 struct tegra_xusb_lane *lane = phy_get_drvdata(phy); in tegra_phy_xusb_utmi_port_reset() local
1472 struct tegra_xusb_padctl *padctl = lane->pad->padctl; in tegra_phy_xusb_utmi_port_reset()
1483 struct tegra_xusb_lane *lane; in tegra_phy_xusb_utmi_pad_power_on() local
1489 lane = phy_get_drvdata(phy); in tegra_phy_xusb_utmi_pad_power_on()
1490 padctl = lane->pad->padctl; in tegra_phy_xusb_utmi_pad_power_on()
1499 struct tegra_xusb_lane *lane; in tegra_phy_xusb_utmi_pad_power_down() local
1505 lane = phy_get_drvdata(phy); in tegra_phy_xusb_utmi_pad_power_down()
1506 padctl = lane->pad->padctl; in tegra_phy_xusb_utmi_pad_power_down()
1536 struct tegra_xusb_lane *lane; in tegra_xusb_padctl_get_port_number() local
1541 lane = phy_get_drvdata(phy); in tegra_xusb_padctl_get_port_number()
1543 return lane->index; in tegra_xusb_padctl_get_port_number()