Re: [PATCH] implement pm_ops.valid for everybody

tony
2007-03-23T13:15:17Z

* David Brownell <david-b@pacbell.net> [070322 17:29]:
> On Thursday 22 March 2007 12:26 pm, Tony Lindgren wrote:
> >
> > In addition to offering wakeup events for individual devices,
> > the device suspend states should be something like retention
> > and suspend, where:
>
> Maybe ... worth discussing. Most PCI drivers don't make
> that distinction, although they could (see below).
>
> What they do instead is assume the lowest device power state
> ("suspend"), and re-initialize in resume(). If Linux starts to
> support standby and STR modes properly ... then it'd make sense
> to teach more PCI drivers to try using "retention" states. But
> those drivers would still need to be prepared to re-init.

I agree, in general we should start taking advantage of the
device power states.

> > Retention is where clocks are off for a device, but power is on.
> > In this case the device registers are maintained in hardware.
>
> Analagous to PCI D1 or D2.

Hmmm, I think with PCI it's just numbering where the power
consumption decreases as the nuber increases except for D3hot
and D3cold.

> > Suspend is where clocks and power are off. In this state the
> > device registers are maintained in software.
>
> Analagous to PCI D3, especially D3cold ... although PCI D3
> certainly allows the Vaux "power well" to power some parts
> of the device, so that not all register values get reset.

Maybe actually D3hot = retention and D3cold = suspend?

PCI SOCs CLOCKS POWER
D3hot retention off on
D3cold suspend off off

> > Laptops mostly have suspend, while socs allow both retention
> > and suspend in many cases.
>
> Not quite true, as noted above. There are differences in how
> things are factored, but those mechanisms exist in both x86
> and SOC worlds. One key difference from a Linux perspective
> is probably that without ACPI in the way, a SOC design can
> make much better use of the hardware PM capabilities.
>
> Very few non-USB drivers address "retention" modes on laptops;
> USB host controller drivers need it to handle "remote wakeup",
> which one expects to work from "standby" and suspend-to-RAM.
> (Plus potentialy suspend-to-disk, but that's uncommon.)

Yeah, OK.

Tony