On Saturday 05 January 2013 13:58:27 Alan Stern wrote:
static int inline usb_device_prevent_power_off(struct usb_device *udev)
{
struct device *dev = usb_get_port_dev(udev);
if(!dev)
return -ENODEV;
return pm_runtime_get_sync(dev);
}
On Tuesday 08 January 2013 14:38:27 Lan Tianyu wrote:
On 2013年01月07日 15:43, Oliver Neukum wrote:
Please change the name. It looks like a contradiction in itself and would
thereby almost beg for misuse.
Hi Oliver:
how about usb_device_control_power_off(struct usb_device *udev, bool
Some usb devices can't be resumed correctly after power off. This
patch is to add usb_device_allow_power_off() for device's driver to allow or
prohibit device to be power off the device. Call pm_runtime_get_sync(portdev)
to increase port's usage count and then port will not be suspended. The
On Fri, 4 Jan 2013, Lan Tianyu wrote:
Some usb devices can't be resumed correctly after power off. This
patch is to add usb_device_allow_power_off() for device's driver to allow or
prohibit device to be power off the device. Call pm_runtime_get_sync(portdev)
to increase port's usage count and