On Tue, Oct 13, 2020 at 2:23 PM Ulf Hansson <ulf.hans...@linaro.org> wrote: > > A device may have specific HW constraints that must be obeyed to, before > its corresponding PM domain (genpd) can be powered off - and vice verse at > power on. These constraints can't be managed through the regular runtime PM > based deployment for a device, because the access pattern for it, isn't > always request based. In other words, using the runtime PM callbacks to > deal with the constraints doesn't work for these cases. > > For these reasons, let's instead add a PM domain power on/off notification > mechanism to genpd. To add/remove a notifier for a device, the device must > already have been attached to the genpd, which also means that it needs to > be a part of the PM domain topology. > > To add/remove a notifier, let's introduce two genpd specific functions: > - dev_pm_genpd_add|remove_notifier() > > Note that, to further clarify when genpd power on/off notifiers may be > used, one can compare with the existing CPU_CLUSTER_PM_ENTER|EXIT > notifiers. In the long run, the genpd power on/off notifiers should be able > to replace them, but that requires additional genpd based platform support > for the current users. > > Signed-off-by: Ulf Hansson <ulf.hans...@linaro.org> > --- > > Changes in v3: > - Adopted suggestions from Peng Fan to allow more fine grained levels > of > notifications, which is needed on some NXP platforms. > - Move the code that fires the notifications into > _genpd_power_on|off(), > as it simply fits better in there. > > Note that, I understand that some of us may be occupied with dealing with the > merge window, but I still wanted to get this submitted to allow those that > have > some time to review and test.
Appreciated. :-) Anyway, applied as 5.10-rc material, thanks!