Re: Runtime power management during system resume

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

 



On Wed, 25 Aug 2010, Raj Kumar wrote:

> But since during system suspend power_usage counter is incremented by 1 But if the device is active
> 
> means its state is RPM_ACTIVE, its power_usage counter is 1 in run time power management core.
> 
>  
> 
> when the system suspend happens, it will also increment the power_usage_counter by 1 during dpm_prepare
> 
>  
> 
> Now   the power_usage_counter is 2.
> 
>  
> 
> So when dpm_complete is invoked, it will decrement the power_usage_counter by 1 during dpm_complete.
> 
>  
> 
> So now when the drivers gets system suspend, its power_usage counter is still 1.
> 
>  
> 
> So what in this scenario, does the device decrements the power_usage counter itself?

Firstly, the _device_ can't change the power_usage counter.  Only the
_driver_ can.  You seem to keep forgetting this point; you need to keep
it straight:

		Driver != Device

Secondly, after the system suspend the power_usage counter has the same
value as it did before.  In your case the usage_counter was 1 before
the system suspend and it is 1 after the system suspend.  Whatever
routine was responsible for setting the counter to 1 originally will
also be responsible for decrementing the counter to 0 some time later.

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