Lines Matching refs:hub
186 struct usb_hub *hub = usb_hub_to_struct_hub(hdev); in usb_port_runtime_resume() local
192 if (!hub) in usb_port_runtime_resume()
194 if (hub->in_reset) { in usb_port_runtime_resume()
195 set_bit(port1, hub->power_bits); in usb_port_runtime_resume()
207 retval = usb_hub_set_port_power(hdev, hub, port1, true); in usb_port_runtime_resume()
208 msleep(hub_power_on_good_delay(hub)); in usb_port_runtime_resume()
219 if (hub_port_debounce_be_connected(hub, port1) < 0) { in usb_port_runtime_resume()
222 set_bit(port1, hub->warm_reset_bits); in usb_port_runtime_resume()
226 if (!test_and_set_bit(port1, hub->child_usage_bits)) { in usb_port_runtime_resume()
242 struct usb_hub *hub = usb_hub_to_struct_hub(hdev); in usb_port_runtime_suspend() local
247 if (!hub) in usb_port_runtime_suspend()
249 if (hub->in_reset) in usb_port_runtime_suspend()
260 retval = usb_hub_set_port_power(hdev, hub, port1, false); in usb_port_runtime_suspend()
453 static void find_and_link_peer(struct usb_hub *hub, int port1) in find_and_link_peer() argument
455 struct usb_port *port_dev = hub->ports[port1 - 1], *peer; in find_and_link_peer()
456 struct usb_device *hdev = hub->hdev; in find_and_link_peer()
506 int usb_hub_create_port_device(struct usb_hub *hub, int port1) in usb_hub_create_port_device() argument
509 struct usb_device *hdev = hub->hdev; in usb_hub_create_port_device()
522 hub->ports[port1 - 1] = port_dev; in usb_hub_create_port_device()
524 set_bit(port1, hub->power_bits); in usb_hub_create_port_device()
525 port_dev->dev.parent = hub->intfdev; in usb_hub_create_port_device()
534 if (hub_is_superspeed(hub->hdev)) in usb_hub_create_port_device()
536 dev_set_name(&port_dev->dev, "%s-port%d", dev_name(&hub->hdev->dev), in usb_hub_create_port_device()
553 find_and_link_peer(hub, port1); in usb_hub_create_port_device()
569 if (!hub_is_port_power_switchable(hub)) in usb_hub_create_port_device()
589 void usb_hub_remove_port_device(struct usb_hub *hub, int port1) in usb_hub_remove_port_device() argument
591 struct usb_port *port_dev = hub->ports[port1 - 1]; in usb_hub_remove_port_device()