Message ID | 1523505239-16229-12-git-send-email-j-keerthy@ti.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
* Keerthy <j-keerthy@ti.com> [180412 03:56]: > From: Dave Gerlach <d-gerlach@ti.com> > > Commit 2dc983c565e0 ("gpio/omap: cleanup prepare_for_idle and > resume_after_idle") introduces omap2_gpio_prepare_for_idle and > omap2_gpio_resume_after_idle to properly configure gpios that are used > as wake sources. When entering off mode, omap2_gpio_prepare_for_idle > can set a flag indicating off-mode entry is desired, however once this > flag is set it is never cleared, so any additional calls to this > function, regardless of the mode, have this flag set. > > This patch restores the pwr_mode flag to 0 in > omap2_gpio_resume_after_idle to ensure the flag is not misconfigured > during non off-mode operation. Seems like this should be applied as a fix, can you please add a proper Fixes tag? Regards, Tony -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 04/12/2018 09:39 AM, Tony Lindgren wrote: > * Keerthy <j-keerthy@ti.com> [180412 03:56]: >> From: Dave Gerlach <d-gerlach@ti.com> >> >> Commit 2dc983c565e0 ("gpio/omap: cleanup prepare_for_idle and >> resume_after_idle") introduces omap2_gpio_prepare_for_idle and >> omap2_gpio_resume_after_idle to properly configure gpios that are used >> as wake sources. When entering off mode, omap2_gpio_prepare_for_idle >> can set a flag indicating off-mode entry is desired, however once this >> flag is set it is never cleared, so any additional calls to this >> function, regardless of the mode, have this flag set. >> >> This patch restores the pwr_mode flag to 0 in >> omap2_gpio_resume_after_idle to ensure the flag is not misconfigured >> during non off-mode operation. > > Seems like this should be applied as a fix, can you please add > a proper Fixes tag? Correct. And please send it separate. But not sure about fixes (to many changes) - it has to manually checked for the lowest kernel version to apply.
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 34fde30..84d664b 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -1476,6 +1476,8 @@ void omap2_gpio_resume_after_idle(void) continue; pm_runtime_get_sync(bank->chip.parent); + + bank->power_mode = 0; } } #endif