mbox series

[RFC,v5,0/4] PM: domain: Support skiping disabling unused domains until sync state

Message ID 20230621144019.3219858-1-abel.vesa@linaro.org
Headers show
Series PM: domain: Support skiping disabling unused domains until sync state | expand

Message

Abel Vesa June 21, 2023, 2:40 p.m. UTC
This new approach drops the is_off change that was part of v4. That was
kind of beyond the scope of this patchset. This new approach changes the
boot_keep_on in such a way that we won't need any kind of new locking
for a PD. This involves using the patch [1] for adding dev_set_drv_sync_state
from Saravana for allowing the genpd core to set a default sync state
callback for a provider that doesn't register one by itself. While at it,
we can add another such API but this time to query a device's sync state.
Then, we filter out each power off request in such a way that if a boot
powered on power domain is not attached to its consumer device and
the provider has not state synced yet, the power off request is skipped.

[1] https://lore.kernel.org/all/20210407034456.516204-2-saravanak@google.com/

No worth mentioning what changed since v4 as this version is almost
entirely reworked.

Abel Vesa (3):
  driver core: Add dev_is_drv_state_synced()
  PM: domains: Ignore power off request for enabled unused domains
  PM: domains: Add and set generic sync state callback

Saravana Kannan (1):
  driver core: Add dev_set_drv_sync_state()

 drivers/base/power/domain.c | 72 +++++++++++++++++++++++++++++++++++++
 include/linux/device.h      | 26 ++++++++++++++
 include/linux/pm_domain.h   |  4 +++
 3 files changed, 102 insertions(+)