[linux-pm] Re: [RFC] Linux Power Management

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

 



On Tue, May 03, 2005 at 11:40:09PM +0200, Pavel Machek wrote:
> Hi!
> 
> > Device Drivers
> > ==============
> > 
> > Linux device drivers must often save and restore state during power
> > transitions.  The following API is proposed:
> > 
> > ->prepare_state(struct device * dev, pm_state_t state,
> >                 unsigned int reason);
> > ->complete_state(struct device * dev, pm_state_t state,
> >                 unsigned int reason);
> > 
> > The following would be an example of a typical transition:
> > 
> > 1.) the policy manager decides to put a PCI ethernet card into D3 from
> > D0.
> > 2.) ->prepare_state is called, the ethernet driver saves its state
> > information and disables the hardware
> > 3.) the power driver's ->set_state function is called, and power is
> > actually removed.
> > 4.) ->complete_state is called to cleanup and make any final
> > adjustments.
> > 
> > * In the case of D3->D0 ->complete_state would restore state.
> > 
> > Possible "reasons" might include DYNAMIC_PM, HALT, REBOOT, SUSPEND,
> > RESUME, etc.
> > 
> > This API is different from the current ->suspend and ->resume because it
> > applies to situations outside of system suspend (e.g. runtime power
> > management) and has an emphasis on specific device power states. 
> 
> No. It took 2+ years to add at at least system power states. You want
> to build on that, not scratch it and start over.
> 
> 								Pavel

Hi Pavel,

After giving it some serious thought, I've decided that I agree.  I'm
reworking my plans to reflect this.

I was wondering, however, what do you have in mind for adding to pm_message_t?
Also, are you going to use "PMSG_HALT" and/or "PMSG_REBOOT"?

Thanks,
Adam

[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