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

Guennadi Liakhovetski g.liakhovetski at gmx.de
Fri Mar 23 07:28:42 EST 2007


On Wed, 21 Mar 2007, Johannes Berg wrote:

> 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 :)

Thanks for the comments, Johannes. I'll address them all and the rest that 
you gave me on IRC in the next version of this patch. Meanwhile, I'll have 
to wait to some timer suspend / resume code in the mainline to base upon. 
As linkstation uses generic rtc, it would be logical to use the patch from 
David Brownell, which is currently in -mm. So, will have to either wait a 
bit, or base my patch on that.

Thanks
Guennadi
---
Guennadi Liakhovetski



More information about the Linuxppc-dev mailing list