Subject: Re: pmf(9): shutdown & D1/D2 states
To: None <email@example.com>
From: Greg Troxel <firstname.lastname@example.org>
Date: 12/24/2007 00:58:00
I would like to get some feedback on changes that I would like to make
to the power management (PM) framework, pmf(9), to support D1 and D2
power-saving states and wake-up events, and also to distinguish device
shutdown from device suspension.
We will really need definitions in the man page.
Are the states D defined in some standard? I've seen them
(e.g. in PXA mauals), and get the impression that they're reasonably
uniform (from ACPI?). It would be good to reference the standard in the
If we do use D0-D3, the callback names should use them. Having a
"human-friendly" name will just cause confusion.
Let's add an optional callback for D2 state, too, called sleep_lightly:
pmf_device_register(device_t dev, bool (*shutdown)(device_t dev),
bool (*suspend)(device_t dev),
bool (*sleep_lightly)(device_t dev),
bool (*save_power)(device_t dev),
bool (*resume)(device_t dev));
We have 4 states, and thus a key qusetion is if arbitrary transitions
(12 of them!) are allowed, or only D0<>Dn for n!=0, which is 6. Perhaps
the resume callback takes it from any of D to D0.