Re: Questions about run time power management

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

 



On Sat, 24 Jul 2010, Raj Kumar wrote:

> Hi Alan,
> 
>  
> 
> Please see my following points:
> 
>  
> 
>  Suppose when device is idle, it says to run time power management framework i am idle
> 
> and run time power management asks the device's bus (if bus is being used), and 
> 
> probably the case is if the device does not want to get suspended because of the starting
> 
> of the activities immediately , it will return the error to platform bus and platform bus returns this error
> 
> to run time power management framework and run time power management will make
> 
> the device status active. In the code of 
> 
>  
> 
> int  __pm_runtime_suspend(arguments...)
> 
> {
> 
> 
>  
> 
>   if (retval) {
>                 dev->power.runtime_status = RPM_ACTIVE;
>                 pm_runtime_cancel_pending(dev);
> 
>                 if (retval == -EAGAIN || retval == -EBUSY) {
>                         notify = true;
>                         dev->power.runtime_error = 0;
>                 }
>         } else {
> 
> 
>  
> 
> }
> 
>  
> 
> So if the retval is -EAGAIN and -EBUSY,  so it means it will again try to make it idle but if the device is
> 
> already doing activities , since it is started doing activities then in that case is this error code
> 
> ECANCELED is appropriate?

No.  -EBUSY is more appropriate, since the device is busy.

Alan Stern

_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux