Change since v1: optimize the export connect type patch and adjust the DeviceRemovalbe flag in the rh_call_control() after GetHubDescriptor request being processed. move all debounce operation to usb port's runtime resume callback(). Add did_runtime_put in the struct usb_port to call pm_runtime_get/put(portdev) paired. using pm_runtime_get/put(portdev) to allow or prohibit device to be power off inside of pm qos request in the kernel side. This patchset is to add usb port power off mechanism and merge with patchset "usb: expose DeviceRemovable to user space via sysfs attribute". Patchset "usb: expose DeviceRemovable to user space via sysfs attribute". http://marc.info/?l=linux-usb&m=135279430410171&w=2 with some link break corrects The main discussion about usb port power off mechanism is in the following link: http://marc.info/?l=linux-usb&m=134818340017208&w=2 usb: Add driver/usb/core/(port.c,hub.h) files USB: Set usb port's DeviceRemovable according acpi information usb: Add "portX/connect_type" attribute to expose usb port's connect type usb: Create link files between child device and usb port device. usb: Register usb port's acpi power resources usb: add runtime pm support for usb port device usb: add usb port auto power off mechanism usb: expose usb port's pm qos flags to user space usb: add usb_device_allow_power_off() function git diff --stat drivers/usb/core/Makefile | 1 + drivers/usb/core/hcd.c | 4 +++ drivers/usb/core/hub.c | 288 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------- drivers/usb/core/hub.h | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ drivers/usb/core/port.c | 189 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ drivers/usb/core/usb-acpi.c | 20 ++++++++++++ drivers/usb/core/usb.h | 9 +++++ 7 files changed, 507 insertions(+), 114 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html