Lines Matching +full:usb +full:- +full:hub

1 /* SPDX-License-Identifier: GPL-2.0 */
3 * usb hub driver head file
14 #include <linux/usb.h>
15 #include <linux/usb/ch11.h>
16 #include <linux/usb/hcd.h>
17 #include "usb.h"
28 struct usb_hub_status hub; member
48 #if USB_MAXCHILDREN > 31 /* 8*sizeof(unsigned long) - 1 */
80 * struct usb port - kernel's representation of a usb port
81 * @child: usb device attached to the port
90 * @is_superspeed cache super-speed status
114 extern int usb_hub_create_port_device(struct usb_hub *hub,
116 extern void usb_hub_remove_port_device(struct usb_hub *hub,
118 extern int usb_hub_set_port_power(struct usb_device *hdev, struct usb_hub *hub,
121 extern int hub_port_debounce(struct usb_hub *hub, int port1,
125 extern int usb_hub_port_status(struct usb_hub *hub, int port1,
127 extern int usb_port_is_power_on(struct usb_hub *hub, unsigned int portstatus);
129 static inline bool hub_is_port_power_switchable(struct usb_hub *hub) in hub_is_port_power_switchable() argument
133 if (!hub) in hub_is_port_power_switchable()
135 hcs = hub->descriptor->wHubCharacteristics; in hub_is_port_power_switchable()
141 return hdev->descriptor.bDeviceProtocol == USB_HUB_PR_SS; in hub_is_superspeed()
146 return (hdev->descriptor.bDeviceProtocol == USB_HUB_PR_SS && in hub_is_superspeedplus()
147 le16_to_cpu(hdev->descriptor.bcdUSB) >= 0x0310 && in hub_is_superspeedplus()
148 hdev->bos->ssp_cap); in hub_is_superspeedplus()
151 static inline unsigned hub_power_on_good_delay(struct usb_hub *hub) in hub_power_on_good_delay() argument
153 unsigned delay = hub->descriptor->bPwrOn2PwrGood * 2; in hub_power_on_good_delay()
155 if (!hub->hdev->parent) /* root hub */ in hub_power_on_good_delay()
161 static inline int hub_port_debounce_be_connected(struct usb_hub *hub, in hub_port_debounce_be_connected() argument
164 return hub_port_debounce(hub, port1, true); in hub_port_debounce_be_connected()
167 static inline int hub_port_debounce_be_stable(struct usb_hub *hub, in hub_port_debounce_be_stable() argument
170 return hub_port_debounce(hub, port1, false); in hub_port_debounce_be_stable()