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

1 // SPDX-License-Identifier: GPL-2.0
14 * usb_of_get_device_node() - get a USB device node
16 * @port1: one-based index of port
18 * Look up the node of a USB device given its parent hub device and one-based
21 * Return: A pointer to the node with incremented refcount if found, or
26 struct device_node *node; in usb_of_get_device_node() local
29 for_each_child_of_node(hub->dev.of_node, node) { in usb_of_get_device_node()
30 if (of_property_read_u32(node, "reg", &reg)) in usb_of_get_device_node()
34 return node; in usb_of_get_device_node()
42 * usb_of_has_combined_node() - determine whether a device has a combined node
45 * Determine whether a USB device has a so called combined node which is
46 * shared with its sole interface. This is the case if and only if the device
47 * has a node and its descriptors report the following:
53 * Return: True iff the device has a device node and its descriptors match the
54 * criteria for a combined node.
58 struct usb_device_descriptor *ddesc = &udev->descriptor; in usb_of_has_combined_node()
61 if (!udev->dev.of_node) in usb_of_has_combined_node()
64 switch (ddesc->bDeviceClass) { in usb_of_has_combined_node()
67 if (ddesc->bNumConfigurations == 1) { in usb_of_has_combined_node()
68 cdesc = &udev->config->desc; in usb_of_has_combined_node()
69 if (cdesc->bNumInterfaces == 1) in usb_of_has_combined_node()
79 * usb_of_get_interface_node() - get a USB interface node
80 * @udev: USB device of interface
82 * @ifnum: interface number
84 * Look up the node of a USB interface given its USB device, configuration
85 * value and interface number.
87 * Return: A pointer to the node with incremented refcount if found, or
93 struct device_node *node; in usb_of_get_interface_node() local
96 for_each_child_of_node(udev->dev.of_node, node) { in usb_of_get_interface_node()
97 if (of_property_read_u32_array(node, "reg", reg, 2)) in usb_of_get_interface_node()
101 return node; in usb_of_get_interface_node()