#include <linux/usb.h>
#include <linux/usb/ch11.h>
#include <linux/usb/hcd.h>
#include <linux/usb/typec.h>
#include "usb.h"
struct usb_hub { … };
struct usb_port { … };
#define to_usb_port(_dev) …
extern int usb_hub_create_port_device(struct usb_hub *hub,
int port1);
extern void usb_hub_remove_port_device(struct usb_hub *hub,
int port1);
extern int usb_hub_set_port_power(struct usb_device *hdev, struct usb_hub *hub,
int port1, bool set);
extern struct usb_hub *usb_hub_to_struct_hub(struct usb_device *hdev);
extern void hub_get(struct usb_hub *hub);
extern void hub_put(struct usb_hub *hub);
extern int hub_port_debounce(struct usb_hub *hub, int port1,
bool must_be_connected);
extern int usb_clear_port_feature(struct usb_device *hdev,
int port1, int feature);
extern int usb_hub_port_status(struct usb_hub *hub, int port1,
u16 *status, u16 *change);
extern int usb_port_is_power_on(struct usb_hub *hub, unsigned int portstatus);
static inline bool hub_is_port_power_switchable(struct usb_hub *hub)
{ … }
static inline int hub_is_superspeed(struct usb_device *hdev)
{ … }
static inline int hub_is_superspeedplus(struct usb_device *hdev)
{ … }
static inline unsigned hub_power_on_good_delay(struct usb_hub *hub)
{ … }
static inline int hub_port_debounce_be_connected(struct usb_hub *hub,
int port1)
{ … }
static inline int hub_port_debounce_be_stable(struct usb_hub *hub,
int port1)
{ … }