Lines Matching +full:interface +full:- +full:node

1 // SPDX-License-Identifier: GPL-2.0
15 * usb_of_get_device_node() - get a USB device node
17 * @port1: one-based index of port
19 * Look up the node of a USB device given its parent hub device and one-based
22 * Return: A pointer to the node with incremented refcount if found, or
27 struct device_node *node; in usb_of_get_device_node() local
30 for_each_child_of_node(hub->dev.of_node, node) { in usb_of_get_device_node()
31 if (of_property_read_u32(node, "reg", &reg)) in usb_of_get_device_node()
35 return node; in usb_of_get_device_node()
43 * usb_of_has_combined_node() - determine whether a device has a combined node
46 * Determine whether a USB device has a so called combined node which is
47 * shared with its sole interface. This is the case if and only if the device
48 * has a node and its descriptors report the following:
54 * Return: True iff the device has a device node and its descriptors match the
55 * criteria for a combined node.
59 struct usb_device_descriptor *ddesc = &udev->descriptor; in usb_of_has_combined_node()
62 if (!udev->dev.of_node) in usb_of_has_combined_node()
65 switch (ddesc->bDeviceClass) { in usb_of_has_combined_node()
68 if (ddesc->bNumConfigurations == 1) { in usb_of_has_combined_node()
69 cdesc = &udev->config->desc; in usb_of_has_combined_node()
70 if (cdesc->bNumInterfaces == 1) in usb_of_has_combined_node()
80 * usb_of_get_interface_node() - get a USB interface node
81 * @udev: USB device of interface
83 * @ifnum: interface number
85 * Look up the node of a USB interface given its USB device, configuration
86 * value and interface number.
88 * Return: A pointer to the node with incremented refcount if found, or
94 struct device_node *node; in usb_of_get_interface_node() local
97 for_each_child_of_node(udev->dev.of_node, node) { in usb_of_get_interface_node()
98 if (of_property_read_u32_array(node, "reg", reg, 2)) in usb_of_get_interface_node()
102 return node; in usb_of_get_interface_node()