* Tero Kristo <t-kristo@xxxxxx> [180518 08:41]: > On 18/05/18 08:57, Keerthy wrote: > > > > > > On Friday 18 May 2018 03:13 AM, Tony Lindgren wrote: > > > * Keerthy <j-keerthy@xxxxxx> [180516 15:21]: > > > > Inroduce cpu_pm notifiers for context save/restore. This will be > > > > needed for am43xx family in case of rtc only mode with ddr in > > > > self-refresh. > > > ... > > > > +static int cpu_notifier(struct notifier_block *nb, unsigned long cmd, void *v) > > > > +{ > > > > + switch (cmd) { > > > > + case CPU_CLUSTER_PM_ENTER: > > > > + if (enable_off_mode) > > > > + clkdm_save_context(); > > > > + break; > > > > + case CPU_CLUSTER_PM_EXIT: > > > > + if (enable_off_mode) > > > > + clkdm_restore_context(); > > > > + break; > > > > + } > > > > + > > > > + return NOTIFY_OK; > > > > +} > > > > > > Can you do this too only on suspend instead of the cpu notifier? > > > If you need to call this eventually from cpuidle also then yeah > > > the notifier makes sense. > > > > Clockdomain under omap2 does not have suspend/resume calls as its still > > not a driver. The initial version of this patch had save/restore calls > > directly from pm33xx-core during suspend/resume platform ops are called. > > > > Are you suggesting that? > > I think using cpu notifiers would help in eventual transition of this under > drivers also, as this doesn't need any custom interfaces to be exported > around. And, as it seems now, this is only needed for AM43xx at the moment, > no other SoCs need this for any purpose, even if device off would be > implemented. Only exception would be if we want to implement RTC+DDR sort of > functionality on any other SoC. OK thanks makes sense. Applying all these into omap-for-v4.18/soc. Regards, Tony -- 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