Lines Matching full:hub

16 #include "hub.h"
53 struct usb_hub *hub = usb_hub_to_struct_hub(hdev); in disable_show() local
61 if (!hub) in disable_show()
63 hub_get(hub); in disable_show()
78 if (hub->disconnected) { in disable_show()
83 usb_hub_port_status(hub, port1, &portstatus, &unused); in disable_show()
84 disabled = !usb_port_is_power_on(hub, portstatus); in disable_show()
92 hub_put(hub); in disable_show()
105 struct usb_hub *hub = usb_hub_to_struct_hub(hdev); in disable_store() local
112 if (!hub) in disable_store()
118 hub_get(hub); in disable_store()
133 if (hub->disconnected) { in disable_store()
141 rc = usb_hub_set_port_power(hdev, hub, port1, !disabled); in disable_store()
158 hub_put(hub); in disable_store()
354 struct usb_hub *hub = usb_hub_to_struct_hub(hdev); in usb_port_runtime_resume() local
360 if (!hub) in usb_port_runtime_resume()
362 if (hub->in_reset) { in usb_port_runtime_resume()
363 set_bit(port1, hub->power_bits); in usb_port_runtime_resume()
378 retval = usb_hub_set_port_power(hdev, hub, port1, true); in usb_port_runtime_resume()
379 msleep(hub_power_on_good_delay(hub)); in usb_port_runtime_resume()
390 if (hub_port_debounce_be_connected(hub, port1) < 0) { in usb_port_runtime_resume()
393 set_bit(port1, hub->warm_reset_bits); in usb_port_runtime_resume()
397 if (!test_and_set_bit(port1, hub->child_usage_bits)) { in usb_port_runtime_resume()
413 struct usb_hub *hub = usb_hub_to_struct_hub(hdev); in usb_port_runtime_suspend() local
418 if (!hub) in usb_port_runtime_suspend()
420 if (hub->in_reset) in usb_port_runtime_suspend()
434 retval = usb_hub_set_port_power(hdev, hub, port1, false); in usb_port_runtime_suspend()
601 * For each usb hub device in the system check to see if it is in the
639 static void find_and_link_peer(struct usb_hub *hub, int port1) in find_and_link_peer() argument
641 struct usb_port *port_dev = hub->ports[port1 - 1], *peer; in find_and_link_peer()
642 struct usb_device *hdev = hub->hdev; in find_and_link_peer()
733 int usb_hub_create_port_device(struct usb_hub *hub, int port1) in usb_hub_create_port_device() argument
736 struct usb_device *hdev = hub->hdev; in usb_hub_create_port_device()
750 hub->ports[port1 - 1] = port_dev; in usb_hub_create_port_device()
752 set_bit(port1, hub->power_bits); in usb_hub_create_port_device()
753 port_dev->dev.parent = hub->intfdev; in usb_hub_create_port_device()
763 dev_set_name(&port_dev->dev, "%s-port%d", dev_name(&hub->hdev->dev), in usb_hub_create_port_device()
792 find_and_link_peer(hub, port1); in usb_hub_create_port_device()
797 * and the hub has been fully registered (hdev->maxchild set). in usb_hub_create_port_device()
805 * Keep hidden the ability to enable port-poweroff if the hub in usb_hub_create_port_device()
808 if (!hub_is_port_power_switchable(hub)) in usb_hub_create_port_device()
835 void usb_hub_remove_port_device(struct usb_hub *hub, int port1) in usb_hub_remove_port_device() argument
837 struct usb_port *port_dev = hub->ports[port1 - 1]; in usb_hub_remove_port_device()