]> git.karo-electronics.de Git - karo-tx-linux.git/commit
PM / Domains: Add "wait for parent" status for generic PM domains
authorRafael J. Wysocki <rjw@sisk.pl>
Mon, 8 Aug 2011 21:43:29 +0000 (23:43 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Sun, 14 Aug 2011 11:35:03 +0000 (13:35 +0200)
commit68747a4c7adf0d35c275a5524713abe9c8f56a78
tree7d6782fe535be59a85c0edb9797a04629dd2e08d
parentdc99b5784f3f313f9b284d46f27b96fce4af05dc
PM / Domains: Add "wait for parent" status for generic PM domains

The next patch will make it possible for a generic PM domain to have
multiple parents (i.e. multiple PM domains it depends on).  To
prepare for that change it is necessary to change pm_genpd_poweron()
so that it doesn't jump to the start label after running itself
recursively for the parent domain.  For this purpose, introduce a new
PM domain status value GPD_STATE_WAIT_PARENT that will be set by
pm_genpd_poweron() before calling itself recursively for the parent
domain and modify the code in drivers/base/power/domain.c so that
the GPD_STATE_WAIT_PARENT status is guaranteed to be preserved during
the execution of pm_genpd_poweron() for the parent.

This change also causes pm_genpd_add_subdomain() and
pm_genpd_remove_subdomain() to wait for started pm_genpd_poweron() to
complete and allows pm_genpd_runtime_resume() to avoid dropping the
lock after powering on the PM domain.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
drivers/base/power/domain.c
include/linux/pm_domain.h