[linux-pm] [patch] pm: fix runtime powermanagement's /sys interface

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

 



On Sat, 7 Jan 2006, Pavel Machek wrote:

> > This trend is extremely alarming!!
> 
> It scares me a bit, too. 

> I think we should start with string-based interface, with just two
> states ("on" and "off"). That is easily extensible into future, and
> suits current PCMCIA nicely. It also allows us to experiment with PCI
> power management... I can cook up a patch, but it will be simple
> reintroduction of .../power file under different name.

That sounds good to me, provided you add to dev_pm_info a pointer to an
array of string pointers, the names of the available states.  For now all
devices can share a single array with just two entries ("on" and "off",
or even "0" and "2").  In the future, bus drivers will be able to
substitute a pointer to a private array with device-specific state names.

Of course, this change will require you to add something like

	const char *name;

to the pm_message_t struct.  PM-aware drivers will be able to use it to
see which state was requested, and other drivers can ignore it.

In fact, for PM-aware drivers the name field makes the event field 
unnecessary.  But until all drivers are PM-aware we can't get rid of it.

Alan Stern


[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