Lines Matching refs:hub

52 	struct usb_hub *hub = usb_hub_to_struct_hub(hdev);  in disable_show()  local
53 struct usb_interface *intf = to_usb_interface(hub->intfdev); in disable_show()
64 if (hub->disconnected) { in disable_show()
69 usb_hub_port_status(hub, port1, &portstatus, &unused); in disable_show()
70 disabled = !usb_port_is_power_on(hub, portstatus); in disable_show()
87 struct usb_hub *hub = usb_hub_to_struct_hub(hdev); in disable_store() local
88 struct usb_interface *intf = to_usb_interface(hub->intfdev); in disable_store()
102 if (hub->disconnected) { in disable_store()
110 rc = usb_hub_set_port_power(hdev, hub, port1, !disabled); in disable_store()
319 struct usb_hub *hub = usb_hub_to_struct_hub(hdev); in usb_port_runtime_resume() local
325 if (!hub) in usb_port_runtime_resume()
327 if (hub->in_reset) { in usb_port_runtime_resume()
328 set_bit(port1, hub->power_bits); in usb_port_runtime_resume()
343 retval = usb_hub_set_port_power(hdev, hub, port1, true); in usb_port_runtime_resume()
344 msleep(hub_power_on_good_delay(hub)); in usb_port_runtime_resume()
355 if (hub_port_debounce_be_connected(hub, port1) < 0) { in usb_port_runtime_resume()
358 set_bit(port1, hub->warm_reset_bits); in usb_port_runtime_resume()
362 if (!test_and_set_bit(port1, hub->child_usage_bits)) { in usb_port_runtime_resume()
378 struct usb_hub *hub = usb_hub_to_struct_hub(hdev); in usb_port_runtime_suspend() local
383 if (!hub) in usb_port_runtime_suspend()
385 if (hub->in_reset) in usb_port_runtime_suspend()
399 retval = usb_hub_set_port_power(hdev, hub, port1, false); in usb_port_runtime_suspend()
601 static void find_and_link_peer(struct usb_hub *hub, int port1) in find_and_link_peer() argument
603 struct usb_port *port_dev = hub->ports[port1 - 1], *peer; in find_and_link_peer()
604 struct usb_device *hdev = hub->hdev; in find_and_link_peer()
680 int usb_hub_create_port_device(struct usb_hub *hub, int port1) in usb_hub_create_port_device() argument
683 struct usb_device *hdev = hub->hdev; in usb_hub_create_port_device()
696 hub->ports[port1 - 1] = port_dev; in usb_hub_create_port_device()
698 set_bit(port1, hub->power_bits); in usb_hub_create_port_device()
699 port_dev->dev.parent = hub->intfdev; in usb_hub_create_port_device()
708 if (hub_is_superspeed(hub->hdev)) in usb_hub_create_port_device()
710 dev_set_name(&port_dev->dev, "%s-port%d", dev_name(&hub->hdev->dev), in usb_hub_create_port_device()
739 find_and_link_peer(hub, port1); in usb_hub_create_port_device()
755 if (!hub_is_port_power_switchable(hub)) in usb_hub_create_port_device()
782 void usb_hub_remove_port_device(struct usb_hub *hub, int port1) in usb_hub_remove_port_device() argument
784 struct usb_port *port_dev = hub->ports[port1 - 1]; in usb_hub_remove_port_device()