aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2015-09-10 10:00:50 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-09-25 20:02:27 -0400
commitc6f7b48e7e21989f4cfc996837d55c595d5dbf87 (patch)
tree3b662fd799a29dbd84aef8e2932e5ad43e356a41 /drivers/base
parent1f93e4a96c9109378204c147b3eec0d0e8100fde (diff)
PM / Domains: Remove name based API for genpd
As all users of the named based APIs now have converted to the non-named based APIs, the time has come to remove them. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Kevin Hilman <khilman@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/domain.c90
1 files changed, 0 insertions, 90 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 16550c63d611..a46427e72034 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -53,24 +53,6 @@
53static LIST_HEAD(gpd_list); 53static LIST_HEAD(gpd_list);
54static DEFINE_MUTEX(gpd_list_lock); 54static DEFINE_MUTEX(gpd_list_lock);
55 55
56static struct generic_pm_domain *pm_genpd_lookup_name(const char *domain_name)
57{
58 struct generic_pm_domain *genpd = NULL, *gpd;
59
60 if (IS_ERR_OR_NULL(domain_name))
61 return NULL;
62
63 mutex_lock(&gpd_list_lock);
64 list_for_each_entry(gpd, &gpd_list, gpd_list_node) {
65 if (!strcmp(gpd->name, domain_name)) {
66 genpd = gpd;
67 break;
68 }
69 }
70 mutex_unlock(&gpd_list_lock);
71 return genpd;
72}
73
74/* 56/*
75 * Get the generic PM domain for a particular struct device. 57 * Get the generic PM domain for a particular struct device.
76 * This validates the struct device pointer, the PM domain pointer, 58 * This validates the struct device pointer, the PM domain pointer,
@@ -295,18 +277,6 @@ int pm_genpd_poweron(struct generic_pm_domain *genpd)
295 return ret; 277 return ret;
296} 278}
297 279
298/**
299 * pm_genpd_name_poweron - Restore power to a given PM domain and its masters.
300 * @domain_name: Name of the PM domain to power up.
301 */
302int pm_genpd_name_poweron(const char *domain_name)
303{
304 struct generic_pm_domain *genpd;
305
306 genpd = pm_genpd_lookup_name(domain_name);
307 return genpd ? pm_genpd_poweron(genpd) : -EINVAL;
308}
309
310static int genpd_save_dev(struct generic_pm_domain *genpd, struct device *dev) 280static int genpd_save_dev(struct generic_pm_domain *genpd, struct device *dev)
311{ 281{
312 return GENPD_DEV_TIMED_CALLBACK(genpd, int, save_state, dev, 282 return GENPD_DEV_TIMED_CALLBACK(genpd, int, save_state, dev,
@@ -1317,18 +1287,6 @@ int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev,
1317} 1287}
1318 1288
1319/** 1289/**
1320 * __pm_genpd_name_add_device - Find I/O PM domain and add a device to it.
1321 * @domain_name: Name of the PM domain to add the device to.
1322 * @dev: Device to be added.
1323 * @td: Set of PM QoS timing parameters to attach to the device.
1324 */
1325int __pm_genpd_name_add_device(const char *domain_name, struct device *dev,
1326 struct gpd_timing_data *td)
1327{
1328 return __pm_genpd_add_device(pm_genpd_lookup_name(domain_name), dev, td);
1329}
1330
1331/**
1332 * pm_genpd_remove_device - Remove a device from an I/O PM domain. 1290 * pm_genpd_remove_device - Remove a device from an I/O PM domain.
1333 * @genpd: PM domain to remove the device from. 1291 * @genpd: PM domain to remove the device from.
1334 * @dev: Device to be removed. 1292 * @dev: Device to be removed.
@@ -1429,35 +1387,6 @@ int pm_genpd_add_subdomain(struct generic_pm_domain *genpd,
1429} 1387}
1430 1388
1431/** 1389/**
1432 * pm_genpd_add_subdomain_names - Add a subdomain to an I/O PM domain.
1433 * @master_name: Name of the master PM domain to add the subdomain to.
1434 * @subdomain_name: Name of the subdomain to be added.
1435 */
1436int pm_genpd_add_subdomain_names(const char *master_name,
1437 const char *subdomain_name)
1438{
1439 struct generic_pm_domain *master = NULL, *subdomain = NULL, *gpd;
1440
1441 if (IS_ERR_OR_NULL(master_name) || IS_ERR_OR_NULL(subdomain_name))
1442 return -EINVAL;
1443
1444 mutex_lock(&gpd_list_lock);
1445 list_for_each_entry(gpd, &gpd_list, gpd_list_node) {
1446 if (!master && !strcmp(gpd->name, master_name))
1447 master = gpd;
1448
1449 if (!subdomain && !strcmp(gpd->name, subdomain_name))
1450 subdomain = gpd;
1451
1452 if (master && subdomain)
1453 break;
1454 }
1455 mutex_unlock(&gpd_list_lock);
1456
1457 return pm_genpd_add_subdomain(master, subdomain);
1458}
1459
1460/**
1461 * pm_genpd_remove_subdomain - Remove a subdomain from an I/O PM domain. 1390 * pm_genpd_remove_subdomain - Remove a subdomain from an I/O PM domain.
1462 * @genpd: Master PM domain to remove the subdomain from. 1391 * @genpd: Master PM domain to remove the subdomain from.
1463 * @subdomain: Subdomain to be removed. 1392 * @subdomain: Subdomain to be removed.
@@ -1566,16 +1495,6 @@ int pm_genpd_attach_cpuidle(struct generic_pm_domain *genpd, int state)
1566} 1495}
1567 1496
1568/** 1497/**
1569 * pm_genpd_name_attach_cpuidle - Find PM domain and connect cpuidle to it.
1570 * @name: Name of the domain to connect to cpuidle.
1571 * @state: cpuidle state this domain can manipulate.
1572 */
1573int pm_genpd_name_attach_cpuidle(const char *name, int state)
1574{
1575 return pm_genpd_attach_cpuidle(pm_genpd_lookup_name(name), state);
1576}
1577
1578/**
1579 * pm_genpd_detach_cpuidle - Remove the cpuidle connection from a PM domain. 1498 * pm_genpd_detach_cpuidle - Remove the cpuidle connection from a PM domain.
1580 * @genpd: PM domain to remove the cpuidle connection from. 1499 * @genpd: PM domain to remove the cpuidle connection from.
1581 * 1500 *
@@ -1613,15 +1532,6 @@ int pm_genpd_detach_cpuidle(struct generic_pm_domain *genpd)
1613 return ret; 1532 return ret;
1614} 1533}
1615 1534
1616/**
1617 * pm_genpd_name_detach_cpuidle - Find PM domain and disconnect cpuidle from it.
1618 * @name: Name of the domain to disconnect cpuidle from.
1619 */
1620int pm_genpd_name_detach_cpuidle(const char *name)
1621{
1622 return pm_genpd_detach_cpuidle(pm_genpd_lookup_name(name));
1623}
1624
1625/* Default device callbacks for generic PM domains. */ 1535/* Default device callbacks for generic PM domains. */
1626 1536
1627/** 1537/**