Subject: Re: ACPI suspend support.
To: Kentaro A. Kurahone <kurahone@sigusr1.org>
From: Lennart Augustsson <lennart@augustsson.net>
List: tech-kern
Date: 01/26/2005 00:35:28
We should redo the powerhook stuff.

I think we should extend struct cfdriver with a powerstate
function.  If it is left as NULL nothing will get called,
otherwise it will get called when the power state changes.

Like the addition of the detach&activate methods this would
be upwards compatible.  You don't need to do anything to
drivers that don't have a powerstate function.

	-- Lennart

Kentaro A. Kurahone wrote:
> On Tue, Jan 25, 2005 at 09:02:27AM -0800, Jason Thorpe wrote:
> 
>>...and I think something a lot more than the current powerhook stuff is 
>>really needed.  We need to be able to express a richer set of power 
>>states.  It might make sense to adopt the S* nomenclature of ACPI, 
>>since PCI also uses the same nomenclature.
> 
> 
> Sounds good.  The ACPI S* states are a lot more flexible than the APM
> equivalents, so this should ease some of the pain when trying to deal with
> this on hpc/macppc targets.
> 
> On the changing powerhook note, I'm wondering if passing POWER_STATE_S[0-5],
> via why is sufficient.  Device drivers can use this to transition between
> power states/save or restore context as needed.  The current strongpoint of
> the powerhook stuff is that devices that don't/can't do powermanagement
> don't need the code for it.  The downside being that it's a bit on the
> minimalistic side, and there's no easy way to have a default behavior
> apart from "do nothing".
>