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. Change since v2: Correct some link breaks. Add did_runtime_put in the usb_disconnect() before calling pm_runtime_put(portdev). Provide two seperate functions usb_device_allow_power_off() and usb_device_prevent_power_off() instead of just one. 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() and usb_device_prevent_power_off() function -- 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