[linux-pm] Some thoughts on suspend/resume development

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

 



On Wed, 2005-03-09 at 10:40 +0100, Pavel Machek wrote:
Hi!
> 
> > Finally, I'm not sure if I like the current "*probe", "*remove",
"*suspend",
> > and "*resume" for runtime power management.  I think it may be
better to do
> > something like the following:
> > 
> > *attach - allocates data structures, creates sysfs entries, prepares
driver
> > 	  to handle the hardware.
> > 
> > *start -  Sets up device resources and configures the hardware.
> > (mostly physical)
> > 
> > *open -   engages the hardware, and allows the class to use it.
> > (logical and physical)
> > 
> > *close -  disengages the hardware, and stops access
> > (logical and physical)
> > 
> > *stop -   disables the hardware at a physical level
> > (mostly physical)
> > 
> > *detach - tears down the driver and releases it from the "struct
device"
> > 
> > *power -  A function that saves and restores states and transitions
power
> >        -  It could take the current state and the new state as
arguments.
> 
> And rewrite whole kernel? (Its mostly drivers, right?) I don't think
so.
> 

I don't think it would break drivers that badly.  Most of the reworking
would be at the class level and with the driver core.  The drivers
themselves would just require a lot of trivial reorganization.  Also, it
would be easy to maintain compatibility during the transition because
the bus level code hides the "struct device_driver" anyway.  However,
something like this might be a good reason to open 2.7.X...

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