Benoit Cousson <b-cousson@xxxxxx> writes: > From: Rajendra Nayak <rnayak@xxxxxx> > > For pwrdm's which support lowperstatechange, do not try waking > up the domain to put it back to deeper sleep state. > > Signed-off-by: Rajendra Nayak <rnayak@xxxxxx> > Signed-off-by: Santosh Shilimkar <santosh.shilimkar@xxxxxx> > Acked-by: Benoit Cousson <b-cousson@xxxxxx> Re: $SUBJECT, the rather than using the cryptic lowpwrstchange name from the pwrdm API, just use the more readable "low-power state change" Also, readability/flow, I have some questions/comments... > --- > arch/arm/mach-omap2/pm.c | 8 ++++++++ > 1 files changed, 8 insertions(+), 0 deletions(-) > > diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c > index cf1c4c9..dc68044 100644 > --- a/arch/arm/mach-omap2/pm.c > +++ b/arch/arm/mach-omap2/pm.c > @@ -114,6 +114,14 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) > return ret; > > if (pwrdm_read_pwrst(pwrdm) < PWRDM_POWER_ON) { > + if ((pwrdm_read_pwrst(pwrdm) > state) && > + (pwrdm->flags & PWRDM_HAS_LOWPOWERSTATECHANGE)) { > + ret = pwrdm_set_next_pwrst(pwrdm, state); > + pwrdm_set_lowpwrstchange(pwrdm); > + pwrdm_wait_transition(pwrdm); > + pwrdm_state_switch(pwrdm); > + return ret; Personally, I'd prefer if this function flowed through better instead of the early return in order to emphasize the common code. Rather than the return here, can you just set the low-power state change bit here (and put the clkdm_wakeup + sleep_switch = 1 into the else clause? Or, does the next state have to be set before the low-power state change bit? Basically, what I'm getting at is this should be a single function with common flow. The conditional code based on low-power state change should be isolated instead of having a special path. Kevin > + } > omap2_clkdm_wakeup(pwrdm->pwrdm_clkdms[0]); > sleep_switch = 1; > pwrdm_wait_transition(pwrdm); -- 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