Re: [PATCH v6 4/8] usb: add runtime pm support for usb port device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2013年01月22日 05:24, Greg KH wrote:
> On Mon, Jan 21, 2013 at 10:18:03PM +0800, Lan Tianyu wrote:
>> This patch is to add runtime pm callback for usb port device.
>> Set/clear PORT_POWER feature in the resume/suspend callbak.
>> Add portnum for struct usb_port to record port number. Do
>> pm_rumtime_get_sync/put(portdev) when a device is plugged/unplugged
>> to prevent it from being powered off when it is active.
>>
>> Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
>> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>> Signed-off-by: Lan Tianyu <tianyu.lan@xxxxxxxxx>
>> ---
>>  drivers/usb/core/hub.c  |   18 ++++++++++++++++++
>>  drivers/usb/core/hub.h  |    4 ++++
>>  drivers/usb/core/port.c |   45 +++++++++++++++++++++++++++++++++++++++++++++
>>  3 files changed, 67 insertions(+)
>>
>> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
>> index 29ca6ed..8c1f9a5 100644
>> --- a/drivers/usb/core/hub.c
>> +++ b/drivers/usb/core/hub.c
>> @@ -714,6 +714,18 @@ static void hub_tt_work(struct work_struct *work)
>>  	spin_unlock_irqrestore (&hub->tt.lock, flags);
>>  }
>>  
>> +int usb_hub_set_port_power(struct usb_device *hdev, int port1,
>> +		bool set)
> 
> As this is a new global USB function, please provide the proper
> kerneldoc comments describing what it does.
> 
OK. I will add later and actually the function will be only used in the
driver/usb/core/hub.c and port.c.
> thanks,
> 
> greg k-h
> 


-- 
Best regards
Tianyu Lan
--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux