[RFC PATCH] power-management elements for 603e/fsl

Johannes Berg johannes at sipsolutions.net
Thu Mar 22 07:59:35 EST 2007


On Sun, 2007-03-18 at 22:40 +0100, Guennadi Liakhovetski wrote:

> +static int ls_pm_valid(suspend_state_t state)
> +{
> +	switch (state) {
> +	case PM_SUSPEND_STANDBY:
> +	case PM_SUSPEND_MEM:
> +		return 1;

Better just implement only one of them. Having two that do exactly the
same thing is confusing. Since you don't turn off the CPU feel free to
call it standby, but it doesn't really matter to me, there doesn't seem
to be a good set of rules to apply as to which name to use.

I just posted a patchset that exports a pm_valid_only_mem function in
pm.h, you should use that as the .valid callback if you decided to call
your sleep state 'mem'.

> +/*
> + * Set to PM_DISK_FIRMWARE so we can quickly veto suspend-to-disk.
> + */

> +//	.pm_disk_mode	= PM_DISK_FIRMWARE,

Both the comment and .pm_disk_mode are bogus, I just removed all such
comments from all other users. It's just wrong, the pm_disk_mode is
something that most likely ACPI will only ever use (though I could
probably implement it for PMU as well)
 
> +# contains only the suspend handler for time
> +obj-$(CONFIG_PM)		+= timer.o
> +

That seems to have slipped into this patch :)

johannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20070321/e0189953/attachment.pgp>


More information about the Linuxppc-dev mailing list