Re: [Resend][PATCH 0/3] ACPI / PM: Patches missing from linux-acpi-2.6/test

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

 



On Wednesday, December 15, 2010, ykzhao wrote:
> On Wed, 2010-12-15 at 04:24 +0800, Rafael J. Wysocki wrote:
> > On Tuesday, December 14, 2010, ykzhao wrote:
> > > On Tue, 2010-12-14 at 05:25 +0800, Rafael J. Wysocki wrote:
> > > > On Monday, December 13, 2010, ykzhao wrote:
> > > > > On Sun, 2010-12-12 at 06:39 +0800, Rafael J. Wysocki wrote:
...
> > 
> > The force_power_state was _only_ a workaround for the case when
> > acpi_bus_set_power() called acpi_bus_get_power() and apparently received
> > a wrong value from it on some systems (two of them had been identified, one was
> > blacklisted in the end).  However, after my changes acpi_bus_set_power()
> > doesn't call acpi_bus_get_power() (or any equivalent) any more, so this
> > workaround isn't necessary any more either.
> 
> The flag of force_power_state will force it to do the transition of
> power state even when the target state is already the same as the
> current power state. Without this flag, it will skip the power
> transition if the two states are consistent. This is useful under the
> following cases: (The FAN device is used as an example)
>     1. The initial state is reported as D0 state (But we don't know
> whether the FAN device is really turned on)
>     2. If we expect to turn on the corresponding FAN device for the
> first time(put it into D0 state),  it will skip the power transition as
> the check of "state == device->power.state". In such case it will be
> better that the power transition is forced in order to assure that the
> FAN device is turned on by calling the _PSC/_ON object. 

Before my changes the force_power_state device flag was used only by the fan
driver in two places: in acpi_fan_add() (ie. during fan initialization) and in
acpi_fan_resume().  In both cases it was used to make acpi_bus_set_power()
accept the state read by acpi_bus_get_power().  In both cases
acpi_bus_update_power() can be used to obtain _exactly_ the same result,
so the flag is not necessary any more.

Thanks,
Rafael
_______________________________________________
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