as we always want to take critical_section, and it is not long time job,
take mutex is not necessary, use spinlock_irq_save as a replace is
better, dont't have to take global critial_section in pm.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
After change, when CONFIG_PM_NDOMAINS > 1,
the pm_register will not able to get notificaion
from not PM_IDLE_DOMAIN.
Should use pm_domain_register as a replacement.
Isolate domains from global callbacks can decrease
not necessary execution, and reduce the
lock instruction requirements.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
only when first time change state can hold WFI for enough time thresh,
allow second time goto target state,
suitable for the case when wakeup from sleep too slow, etc.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>