summaryrefslogtreecommitdiff
path: root/drivers/usb/core/usb.h
diff options
context:
space:
mode:
authorLan Tianyu <tianyu.lan@intel.com>2013-01-21 14:18:00 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-21 21:22:03 (GMT)
commitd2123fd9e1a56b8006986ed37e0aaf93ef0dd978 (patch)
tree2c48de8b3450bda69a6926e9e7e53b551a74a1b4 /drivers/usb/core/usb.h
parent5c6e9bf011bca072648017477b0fe36402be1415 (diff)
downloadlinux-fsl-qoriq-d2123fd9e1a56b8006986ed37e0aaf93ef0dd978.tar.xz
USB: Set usb port's DeviceRemovable according acpi information
ACPI provide "_PLD" and "_UPC" aml methods to describe usb port visibility and connectability. This patch is to add usb_hub_adjust_DeviceRemovable() to adjust usb hub port's DeviceRemovable according ACPI information and invoke it in the rh_call_control(). When hub descriptor request is issued at first time, usb port device isn't created and usb port is not bound with acpi. So first hub descriptor request is not changed based on ACPI information. After usb port devices being created, call usb_hub_adjust_DeviceRemovable in the hub_configure() and then set hub port's DeviceRemovable according ACPI information and this also works for non-root hub. Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/usb.h')
-rw-r--r--drivers/usb/core/usb.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h
index fb7d8fc..a7f20bd 100644
--- a/drivers/usb/core/usb.h
+++ b/drivers/usb/core/usb.h
@@ -1,6 +1,7 @@
#include <linux/pm.h>
#include <linux/acpi.h>
+struct usb_hub_descriptor;
struct dev_state;
/* Functions local to drivers/usb/core/ */
@@ -182,6 +183,8 @@ extern enum usb_port_connect_type
usb_get_hub_port_connect_type(struct usb_device *hdev, int port1);
extern void usb_set_hub_port_connect_type(struct usb_device *hdev, int port1,
enum usb_port_connect_type type);
+extern void usb_hub_adjust_deviceremovable(struct usb_device *hdev,
+ struct usb_hub_descriptor *desc);
#ifdef CONFIG_ACPI
extern int usb_acpi_register(void);