[PATCH] ASoC: fsl_esai: Add pm runtime function
Nicolin Chen
nicoleotsuka at gmail.com
Thu Apr 18 19:00:12 AEST 2019
On Thu, Apr 18, 2019 at 03:29:09AM +0000, S.j. Wang wrote:
> In imx8 when systerm enter suspend state, the power of subsystem will
> be off, the clock enable state will be lost and register configuration
Just for curiosity, we had similar situation on imx6sx, so we
added suspend/resume with regcache. Why will the clock enable
state be lost too? Does CCM on imx8 (might not be called CCM
though) have any difference? What about clock rate settings?
> will be lost. So the driver need to enter runtime suspend state in
> suspend.
> With this implementation the suspend function almost same as runtime
> suspend function, so remove the suspend function, just use
> pm_runtime_force_suspend instead, and same for the resume function.
>
> And also need to move clock enablement to runtime resume and clock
> disablement to runtime suspend.
> -static int fsl_esai_suspend(struct device *dev)
> - regcache_cache_only(esai->regmap, true);
> - regcache_mark_dirty(esai->regmap);
> +static int fsl_esai_runtime_resume(struct device *dev)
> regcache_cache_only(esai->regmap, false);
> + regcache_mark_dirty(esai->regmap);
Why move the regcache_mark_dirty from suspend to resume?
(I am not saying it's wrong but wondering if this is the
preferable way.)
More information about the Linuxppc-dev
mailing list