Lines Matching refs:np
46 if (pad->lanes[i]->dev.of_node == args->np) { in tegra_xusb_pad_of_xlate()
81 struct device_node *np = of_node_get(padctl->dev->of_node); in tegra_xusb_find_pad_node() local
83 np = of_find_node_by_name(np, "pads"); in tegra_xusb_find_pad_node()
84 if (np) in tegra_xusb_find_pad_node()
85 np = of_find_node_by_name(np, name); in tegra_xusb_find_pad_node()
87 return np; in tegra_xusb_find_pad_node()
96 struct device_node *np = of_node_get(pad->dev.of_node); in tegra_xusb_pad_find_phy_node() local
98 np = of_find_node_by_name(np, "lanes"); in tegra_xusb_pad_find_phy_node()
99 if (!np) in tegra_xusb_pad_find_phy_node()
102 return of_find_node_by_name(np, pad->soc->lanes[index].name); in tegra_xusb_pad_find_phy_node()
119 struct device_node *np) in tegra_xusb_lane_parse_dt() argument
125 err = of_property_read_string(np, "nvidia,function", &function); in tegra_xusb_lane_parse_dt()
132 function, np->name); in tegra_xusb_lane_parse_dt()
164 struct device_node *np) in tegra_xusb_pad_init() argument
172 pad->dev.of_node = np; in tegra_xusb_pad_init()
210 struct device_node *np = tegra_xusb_pad_find_phy_node(pad, i); in tegra_xusb_pad_register() local
214 if (!np || !of_device_is_available(np)) { in tegra_xusb_pad_register()
215 of_node_put(np); in tegra_xusb_pad_register()
219 pad->lanes[i] = phy_create(&pad->dev, np, ops); in tegra_xusb_pad_register()
222 of_node_put(np); in tegra_xusb_pad_register()
226 lane = pad->ops->probe(pad, np, i); in tegra_xusb_pad_register()
272 struct device_node *np; in tegra_xusb_pad_create() local
275 np = tegra_xusb_find_pad_node(padctl, soc->name); in tegra_xusb_pad_create()
276 if (!np || !of_device_is_available(np)) in tegra_xusb_pad_create()
279 pad = soc->ops->probe(padctl, soc, np); in tegra_xusb_pad_create()
450 struct device_node *np = of_node_get(padctl->dev->of_node); in tegra_xusb_find_port_node() local
452 np = of_find_node_by_name(np, "ports"); in tegra_xusb_find_port_node()
453 if (np) { in tegra_xusb_find_port_node()
457 np = of_find_node_by_name(np, name); in tegra_xusb_find_port_node()
461 return np; in tegra_xusb_find_port_node()
469 struct device_node *np; in tegra_xusb_find_port() local
471 np = tegra_xusb_find_port_node(padctl, type, index); in tegra_xusb_find_port()
472 if (!np) in tegra_xusb_find_port()
476 if (np == port->dev.of_node) { in tegra_xusb_find_port()
477 of_node_put(np); in tegra_xusb_find_port()
482 of_node_put(np); in tegra_xusb_find_port()
521 struct device_node *np, in tegra_xusb_port_init() argument
533 port->dev.of_node = of_node_get(np); in tegra_xusb_port_init()
559 struct device_node *np = port->dev.of_node; in tegra_xusb_usb2_port_parse_dt() local
561 usb2->internal = of_property_read_bool(np, "nvidia,internal"); in tegra_xusb_usb2_port_parse_dt()
574 struct device_node *np; in tegra_xusb_add_usb2_port() local
581 np = tegra_xusb_find_port_node(padctl, "usb2", index); in tegra_xusb_add_usb2_port()
582 if (!np || !of_device_is_available(np)) in tegra_xusb_add_usb2_port()
591 err = tegra_xusb_port_init(&usb2->base, padctl, np, "usb2", index); in tegra_xusb_add_usb2_port()
612 of_node_put(np); in tegra_xusb_add_usb2_port()
619 struct device_node *np = port->dev.of_node; in tegra_xusb_ulpi_port_parse_dt() local
621 ulpi->internal = of_property_read_bool(np, "nvidia,internal"); in tegra_xusb_ulpi_port_parse_dt()
630 struct device_node *np; in tegra_xusb_add_ulpi_port() local
633 np = tegra_xusb_find_port_node(padctl, "ulpi", index); in tegra_xusb_add_ulpi_port()
634 if (!np || !of_device_is_available(np)) in tegra_xusb_add_ulpi_port()
643 err = tegra_xusb_port_init(&ulpi->base, padctl, np, "ulpi", index); in tegra_xusb_add_ulpi_port()
664 of_node_put(np); in tegra_xusb_add_ulpi_port()
678 struct device_node *np; in tegra_xusb_add_hsic_port() local
681 np = tegra_xusb_find_port_node(padctl, "hsic", index); in tegra_xusb_add_hsic_port()
682 if (!np || !of_device_is_available(np)) in tegra_xusb_add_hsic_port()
691 err = tegra_xusb_port_init(&hsic->base, padctl, np, "hsic", index); in tegra_xusb_add_hsic_port()
712 of_node_put(np); in tegra_xusb_add_hsic_port()
719 struct device_node *np = port->dev.of_node; in tegra_xusb_usb3_port_parse_dt() local
723 err = of_property_read_u32(np, "nvidia,usb2-companion", &value); in tegra_xusb_usb3_port_parse_dt()
731 usb3->internal = of_property_read_bool(np, "nvidia,internal"); in tegra_xusb_usb3_port_parse_dt()
744 struct device_node *np; in tegra_xusb_add_usb3_port() local
752 np = tegra_xusb_find_port_node(padctl, "usb3", index); in tegra_xusb_add_usb3_port()
753 if (!np || !of_device_is_available(np)) in tegra_xusb_add_usb3_port()
762 err = tegra_xusb_port_init(&usb3->base, padctl, np, "usb3", index); in tegra_xusb_add_usb3_port()
783 of_node_put(np); in tegra_xusb_add_usb3_port()
854 struct device_node *np = of_node_get(pdev->dev.of_node); in tegra_xusb_padctl_probe() local
862 np = of_find_node_by_name(np, "pads"); in tegra_xusb_padctl_probe()
863 if (!np) { in tegra_xusb_padctl_probe()
868 of_node_put(np); in tegra_xusb_padctl_probe()
954 struct device_node *np; in tegra_xusb_padctl_get() local
956 np = of_parse_phandle(dev->of_node, "nvidia,xusb-padctl", 0); in tegra_xusb_padctl_get()
957 if (!np) in tegra_xusb_padctl_get()
965 pdev = of_find_device_by_node(np); in tegra_xusb_padctl_get()
967 of_node_put(np); in tegra_xusb_padctl_get()
971 of_node_put(np); in tegra_xusb_padctl_get()