Re: [PATCHv2 1/2] OMAP3: PM: Add cpuidle C-state description information

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 02, 2010 at 01:09:55AM +0100, ext Kevin Hilman wrote:
> Eduardo Valentin <eduardo.valentin@xxxxxxxxx> writes:
> 
> > From: Eduardo Valentin <eduardo.valentin@xxxxxxxxx>
> >
> > Add a basic description information for each cpuidle C-state.
> > The info contains only which state the MPU, NEON and CORE
> > power domains should reach when the C-state is selected.
> >
> > Signed-off-by: Eduardo Valentin <eduardo.valentin@xxxxxxxxx>
> 
> I like this series.  Some minor comments...
> 
> > ---
> >  arch/arm/mach-omap2/cpuidle34xx.c |    4 ++++
> >  1 files changed, 4 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
> > index 1cfa5a6..50fe9ab 100644
> > --- a/arch/arm/mach-omap2/cpuidle34xx.c
> > +++ b/arch/arm/mach-omap2/cpuidle34xx.c
> > @@ -339,6 +339,7 @@ struct cpuidle_driver omap3_idle_driver = {
> >   */
> >  int __init omap3_idle_init(void)
> >  {
> > +	const char *pd_states[4] = {"OFF", "RET", "INA", "ON "};
> 
> I'd rather see something like this for this array, just in case
> those values change for any reason.
> 
> static const char *pd_states[] = {
> 	[PWRDM_POWER_OFF]      = "OFF",
> 	[PWRDM_POWER_RET]      = "RET",
> 	[PWRDM_POWER_INACTIVE] = "INA",
> 	[PWRDM_POWER_ON]       = "ON",

Nice! I'll resend with your proposal.

> };
> 
> >  	int i, count = 0;
> >  	struct omap3_processor_cx *cx;
> >  	struct cpuidle_state *state;
> > @@ -367,6 +368,9 @@ int __init omap3_idle_init(void)
> >  		if (cx->type == OMAP3_STATE_C1)
> >  			dev->safe_state = state;
> >  		sprintf(state->name, "C%d", count+1);
> > +		sprintf(state->desc, "MPU=%s NEON=%s CORE=%s",
> > +			pd_states[cx->mpu_state], pd_states[cx->mpu_state],
> > +			pd_states[cx->core_state]);
> >  		count++;
> >  	}
> >  
> > -- 
> > 1.6.5.7.g9ecb2

-- 
Eduardo Valentin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux