11 #include <linux/module.h>
13 #include <linux/device.h>
14 #include <linux/errno.h>
15 #include <linux/kernel.h>
17 #include <linux/pci.h>
33 int port1 = index + 1;
35 port_handle = usb_get_hub_port_acpi_handle(hdev,
60 int port1 = index + 1;
63 port_handle = (
acpi_handle)usb_get_hub_port_acpi_handle(hdev,
75 dev_dbg(&hdev->dev,
"The power of hub port %d was set to %d\n",
78 dev_dbg(&hdev->dev,
"The power of hub port failed to be set\n");
84 static int usb_acpi_check_port_connect_type(
struct usb_device *hdev,
113 if (upc->
package.elements[0].integer.value)
116 USB_PORT_CONNECT_TYPE_HOT_PLUG);
119 USB_PORT_CONNECT_TYPE_HARD_WIRED);
131 struct usb_device *
udev;
148 if (is_usb_device(dev)) {
149 udev = to_usb_device(dev);
151 enum usb_port_connect_type
type;
160 case USB_PORT_CONNECT_TYPE_HOT_PLUG:
161 udev->removable = USB_DEVICE_REMOVABLE;
163 case USB_PORT_CONNECT_TYPE_HARD_WIRED:
164 udev->removable = USB_DEVICE_FIXED;
167 udev->removable = USB_DEVICE_REMOVABLE_UNKNOWN;
175 parent_handle = DEVICE_ACPI_HANDLE(dev->
parent);
180 }
else if (is_usb_port(dev)) {
181 sscanf(dev_name(dev),
"port%d", &port_num);
183 udev = to_usb_device(dev->
parent->parent);
197 usb_get_hub_port_acpi_handle(udev->parent,
206 usb_acpi_check_port_connect_type(udev, *handle, port_num);
215 .find_bridge = usb_acpi_find_device,
216 .find_device = usb_acpi_find_device,