aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2014-09-25 11:49:59 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-09-25 16:13:42 -0400
commit263c589bae9eb404df2c1e8d49ec775bb7b288d4 (patch)
tree80599030fc4a041a2cf8495f688c0367f2c20d9d
parentd79b6fe17aa279c7015a9c4ee88809dad4be9959 (diff)
PM / Domains: Remove legacy API for adding devices through DT
There are no active clients of the legacy API and we now also have a better way to handle genpd DT support. So let's remove the legacy API. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/base/power/domain.c33
-rw-r--r--include/linux/pm_domain.h17
2 files changed, 0 insertions, 50 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 2a9f4c5025e3..18cc68d058d6 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -1457,39 +1457,6 @@ int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev,
1457} 1457}
1458 1458
1459/** 1459/**
1460 * __pm_genpd_of_add_device - Add a device to an I/O PM domain.
1461 * @genpd_node: Device tree node pointer representing a PM domain to which the
1462 * the device is added to.
1463 * @dev: Device to be added.
1464 * @td: Set of PM QoS timing parameters to attach to the device.
1465 */
1466int __pm_genpd_of_add_device(struct device_node *genpd_node, struct device *dev,
1467 struct gpd_timing_data *td)
1468{
1469 struct generic_pm_domain *genpd = NULL, *gpd;
1470
1471 dev_dbg(dev, "%s()\n", __func__);
1472
1473 if (IS_ERR_OR_NULL(genpd_node) || IS_ERR_OR_NULL(dev))
1474 return -EINVAL;
1475
1476 mutex_lock(&gpd_list_lock);
1477 list_for_each_entry(gpd, &gpd_list, gpd_list_node) {
1478 if (gpd->of_node == genpd_node) {
1479 genpd = gpd;
1480 break;
1481 }
1482 }
1483 mutex_unlock(&gpd_list_lock);
1484
1485 if (!genpd)
1486 return -EINVAL;
1487
1488 return __pm_genpd_add_device(genpd, dev, td);
1489}
1490
1491
1492/**
1493 * __pm_genpd_name_add_device - Find I/O PM domain and add a device to it. 1460 * __pm_genpd_name_add_device - Find I/O PM domain and add a device to it.
1494 * @domain_name: Name of the PM domain to add the device to. 1461 * @domain_name: Name of the PM domain to add the device to.
1495 * @dev: Device to be added. 1462 * @dev: Device to be added.
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
index 9a93e622bdea..ed4f4a79c528 100644
--- a/include/linux/pm_domain.h
+++ b/include/linux/pm_domain.h
@@ -71,7 +71,6 @@ struct generic_pm_domain {
71 s64 max_off_time_ns; /* Maximum allowed "suspended" time. */ 71 s64 max_off_time_ns; /* Maximum allowed "suspended" time. */
72 bool max_off_time_changed; 72 bool max_off_time_changed;
73 bool cached_power_down_ok; 73 bool cached_power_down_ok;
74 struct device_node *of_node; /* Node in device tree */
75 struct gpd_cpu_data *cpu_data; 74 struct gpd_cpu_data *cpu_data;
76 void (*attach_dev)(struct device *dev); 75 void (*attach_dev)(struct device *dev);
77 void (*detach_dev)(struct device *dev); 76 void (*detach_dev)(struct device *dev);
@@ -124,10 +123,6 @@ extern int __pm_genpd_add_device(struct generic_pm_domain *genpd,
124 struct device *dev, 123 struct device *dev,
125 struct gpd_timing_data *td); 124 struct gpd_timing_data *td);
126 125
127extern int __pm_genpd_of_add_device(struct device_node *genpd_node,
128 struct device *dev,
129 struct gpd_timing_data *td);
130
131extern int __pm_genpd_name_add_device(const char *domain_name, 126extern int __pm_genpd_name_add_device(const char *domain_name,
132 struct device *dev, 127 struct device *dev,
133 struct gpd_timing_data *td); 128 struct gpd_timing_data *td);
@@ -169,12 +164,6 @@ static inline int __pm_genpd_add_device(struct generic_pm_domain *genpd,
169{ 164{
170 return -ENOSYS; 165 return -ENOSYS;
171} 166}
172static inline int __pm_genpd_of_add_device(struct device_node *genpd_node,
173 struct device *dev,
174 struct gpd_timing_data *td)
175{
176 return -ENOSYS;
177}
178static inline int __pm_genpd_name_add_device(const char *domain_name, 167static inline int __pm_genpd_name_add_device(const char *domain_name,
179 struct device *dev, 168 struct device *dev,
180 struct gpd_timing_data *td) 169 struct gpd_timing_data *td)
@@ -240,12 +229,6 @@ static inline int pm_genpd_add_device(struct generic_pm_domain *genpd,
240 return __pm_genpd_add_device(genpd, dev, NULL); 229 return __pm_genpd_add_device(genpd, dev, NULL);
241} 230}
242 231
243static inline int pm_genpd_of_add_device(struct device_node *genpd_node,
244 struct device *dev)
245{
246 return __pm_genpd_of_add_device(genpd_node, dev, NULL);
247}
248
249static inline int pm_genpd_name_add_device(const char *domain_name, 232static inline int pm_genpd_name_add_device(const char *domain_name,
250 struct device *dev) 233 struct device *dev)
251{ 234{