N00b Asks: Supporting Linux Power Management HOWTO?

From: Leo L. Schwab
Date: Fri Mar 11 2005 - 19:04:24 EST

I'm currently working on driver development for an embedded/handheld
system. We're currently using kernel 2.6.11 on an ARM-based platform, and
I've already got a handful of drivers running (anyone need an I2C bus driver
for a Freescale MX21?). Earlier this week, I was asked to begin work on
power management -- shutting off unused devices, placing the system in
suspend/standby/sleep, etc.

So I started Googling around for info on Linux power management and,
near as I can tell, there doesn't appear to be a cohesive approach to the
issue. What I've managed to turn up so far is:

An older power management system, supplanted by ACPI. It seems to
enjoy the most mature support in Linux, if for no other reason
than it's been around so much longer. It lacks flexibility,
The current "standard" for power management. Support even on x86-
platforms seems highly uneven, however, and the ACPI support code
still seems to be undergoing major revisions. It also appears to
be widely regarded as an unholy mess of a spec. I've also gleaned
hints from LKML discussons that ACPI contains enough x86-specific
material to make it a questionable choice on other platforms.
- DPM (Dynamic Power Management, http://dynamicpower.sf.net/ )
A proposal put forward by MontaVista and IBM, primarily for
embedded systems (although an Intel Speedstep implementation is
available). While the reference implementation is being kept
current, it doesn't seem to have a lot of activity surrounding it,
despite being two years old.

The functionality in each of these facilities seems to overlap
the others. DPM in particular seems to heavily overlap services provided by
ACPI and exposed by 'cpufreq'. This suggests to me that one ends up
redundantly implementing power support across three APIs, or that one is
supposed to select a single API and stick with that. How one makes this
selection is not at all clear.

Ideally, what I'd like is "the" approach that integrates most
cleanly into existing frameworks. That is, I'd like to be able to write the
power management support into the drivers and platform-specific kernel
files, then essentially drop a stock distro on top of it and have the
largest number of scripts and tools Just Work. I would prefer, if possible,
to write support for one interface rather than three (APM, ACPI, DPM)
especially when two of them are still moving targets.

So, I guess what I'm asking for at the moment is:
- A brief overview of the current state and maturity of power
management support in the 2.6.x kernel series,
- the currently available facilities for implementing and supporting
power management,
- pointers to documents describing the facilities in detail and how
to write driver and platform support for them.

I realize I well may be asking for too much -- the following LKML
thread suggests that Linux power management remains a problem under active
discussion with fragmented solutions:


Nevertheless, any and all guidance would be greatly appreciated.
Please Cc: list responses to this address. My sincerest thanks in advance.

Leo L. Schwab -- Digital Spellweaver ewhac@xxxxxxxx ..or..
\_ -_ http://ewhac.best.vwh.net/ ewhac@xxxxxxxx
O----^o Recumbent Bikes: The Only Way To Fly. (pronounced "EH-wack")
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/