Lines Matching +full:can +full:- +full:primary
1 // SPDX-License-Identifier: GPL-2.0-only
33 * onboard_dev_create_pdevs -- create platform devices for onboard USB devices
40 * hubs, it can optionally control whether the device remains powered during
46 * Some background about the logic in this function, which can be a bit hard
50 * HCD. The primary and secondary HCD are usually represented by a single DT
51 * node. That means the root hubs of the primary and secondary HCD share the
52 * same device tree node (the HCD node). As a result this function can be called
55 * loop is only executed for the root hub of the primary HCD. Since the function
62 * is called on behalf of the parent hub that is connected to the primary HCD
70 struct usb_hcd *hcd = bus_to_hcd(parent_hub->bus); in onboard_dev_create_pdevs()
75 if (!parent_hub->dev.of_node) in onboard_dev_create_pdevs()
78 if (!parent_hub->parent && !usb_hcd_is_primary_hcd(hcd)) in onboard_dev_create_pdevs()
81 for (i = 1; i <= parent_hub->maxchild; i++) { in onboard_dev_create_pdevs()
89 npc = of_parse_phandle(np, "peer-hub", 0); in onboard_dev_create_pdevs()
100 put_device(&pdev->dev); in onboard_dev_create_pdevs()
105 pdev = of_platform_device_create(np, NULL, &parent_hub->dev); in onboard_dev_create_pdevs()
107 dev_err(&parent_hub->dev, in onboard_dev_create_pdevs()
114 of_platform_device_destroy(&pdev->dev, NULL); in onboard_dev_create_pdevs()
118 pdle->pdev = pdev; in onboard_dev_create_pdevs()
119 list_add(&pdle->node, pdev_list); in onboard_dev_create_pdevs()
128 * onboard_dev_destroy_pdevs -- free resources of onboard platform devices
139 list_del(&pdle->node); in onboard_dev_destroy_pdevs()
140 of_platform_device_destroy(&pdle->pdev->dev, NULL); in onboard_dev_destroy_pdevs()