Re: A minimally power-aware driver treats all messages as SUSPEND?

From: David Brownell
Date: Tue Jul 01 2008 - 23:17:56 EST


On Tuesday 01 July 2008, Matthew Garrett wrote:
> On Tue, Jul 01, 2008 at 05:14:15PM +0200, Uwe Kleine-König wrote:
>
> > With that I might have to do less on SUSPEND because some state might be
> > preserved after the machine comes up again.
>
> The only hardware state guaranteed by ACPI is the contents of RAM. It's
> valid for the platform to cut the power rails to everything else, so
> from a driver point of view it's almost always equivalent to
> hibernation.

Right. And moreover ... the way many drivers support suspend-to-RAM
in that "minimally power-aware" sense is kind of brain-dead: they
resume by resetting and re-initializing everything!! Which trashes
any state that the hardware may have been preserving.

So, there's no no real difference between SUSPEND and HIBERNATE modes
unless drivers do more than that bare minimum.

The more intelligent drivers will leverage hardware low power states,
and be able to use one of potentially many "retention" modes. Those
are the drivers which may well support wakeup events; issuing wakeups
requiress the device to stay at least partially functional.

- Dave

--
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/