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. Change since v3: Set did_runtime_put to false in usb_disconnect() when its value is true Add comment about "not enable port runtime pm if fail to expose port's pm qos." and call pm_runtime_set_active(portdev) unconditionally. rename "usb_device_allow_prevent_power_off" with "usb_device_control_power_off" Modify "be power off" to "be powered off" Expose dev_pm_qos_flags() symbol in order to ensure usb core can compile as module. Resend v4: make patch "PM/Qos: Expose dev_pm_qos_flags symbol" as first patch to avoid compilation error during "git bisect" correct some comments. This Patchset is based on usb-next tree commit 102ee001912 "Merge tag 'for-usb-next-2013-01-03'" 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 PM/Qos: Expose dev_pm_qos_flags symbol 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