aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2012-08-15 14:32:59 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2012-09-03 19:36:53 -0400
commit74a2799ab51acec9410f467fef8678ebb1125d7d (patch)
treed26ffff8d487e5412c5b18c00bfda61623f2c4df /drivers/base
parent40114447a7f89860b46a64e5504f313656cb5f27 (diff)
PM / Domains: Operations related to cpuidle using domain names
Make it possible to use domain names in operations connecting cpuidle to and disconnecting it from a PM domain. This is useful on platforms where PM domain objects are organized in such a way that the names of the domains are easier to use than the addresses of those objects. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/domain.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index e44e1a8e8376..12ad070c244f 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -1888,6 +1888,16 @@ int pm_genpd_attach_cpuidle(struct generic_pm_domain *genpd, int state)
1888} 1888}
1889 1889
1890/** 1890/**
1891 * pm_genpd_name_attach_cpuidle - Find PM domain and connect cpuidle to it.
1892 * @name: Name of the domain to connect to cpuidle.
1893 * @state: cpuidle state this domain can manipulate.
1894 */
1895int pm_genpd_name_attach_cpuidle(const char *name, int state)
1896{
1897 return pm_genpd_attach_cpuidle(pm_genpd_lookup_name(name), state);
1898}
1899
1900/**
1891 * pm_genpd_detach_cpuidle - Remove the cpuidle connection from a PM domain. 1901 * pm_genpd_detach_cpuidle - Remove the cpuidle connection from a PM domain.
1892 * @genpd: PM domain to remove the cpuidle connection from. 1902 * @genpd: PM domain to remove the cpuidle connection from.
1893 * 1903 *
@@ -1925,6 +1935,15 @@ int pm_genpd_detach_cpuidle(struct generic_pm_domain *genpd)
1925 return ret; 1935 return ret;
1926} 1936}
1927 1937
1938/**
1939 * pm_genpd_name_detach_cpuidle - Find PM domain and disconnect cpuidle from it.
1940 * @name: Name of the domain to disconnect cpuidle from.
1941 */
1942int pm_genpd_name_detach_cpuidle(const char *name)
1943{
1944 return pm_genpd_detach_cpuidle(pm_genpd_lookup_name(name));
1945}
1946
1928/* Default device callbacks for generic PM domains. */ 1947/* Default device callbacks for generic PM domains. */
1929 1948
1930/** 1949/**