Skip to content

Commit 263c589

Browse files
Ulf Hanssonrafaeljw
authored andcommitted
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>
1 parent d79b6fe commit 263c589

2 files changed

Lines changed: 0 additions & 50 deletions

File tree

‎drivers/base/power/domain.c‎

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,39 +1456,6 @@ int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev,
14561456
return ret;
14571457
}
14581458

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-
*/
1466-
int __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-
14921459
/**
14931460
* __pm_genpd_name_add_device - Find I/O PM domain and add a device to it.
14941461
* @domain_name: Name of the PM domain to add the device to.

‎include/linux/pm_domain.h‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ struct generic_pm_domain {
7171
s64 max_off_time_ns; /* Maximum allowed "suspended" time. */
7272
bool max_off_time_changed;
7373
bool cached_power_down_ok;
74-
struct device_node *of_node; /* Node in device tree */
7574
struct gpd_cpu_data *cpu_data;
7675
void (*attach_dev)(struct device *dev);
7776
void (*detach_dev)(struct device *dev);
@@ -124,10 +123,6 @@ extern int __pm_genpd_add_device(struct generic_pm_domain *genpd,
124123
struct device *dev,
125124
struct gpd_timing_data *td);
126125

127-
extern int __pm_genpd_of_add_device(struct device_node *genpd_node,
128-
struct device *dev,
129-
struct gpd_timing_data *td);
130-
131126
extern int __pm_genpd_name_add_device(const char *domain_name,
132127
struct device *dev,
133128
struct gpd_timing_data *td);
@@ -169,12 +164,6 @@ static inline int __pm_genpd_add_device(struct generic_pm_domain *genpd,
169164
{
170165
return -ENOSYS;
171166
}
172-
static 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-
}
178167
static inline int __pm_genpd_name_add_device(const char *domain_name,
179168
struct device *dev,
180169
struct gpd_timing_data *td)
@@ -240,12 +229,6 @@ static inline int pm_genpd_add_device(struct generic_pm_domain *genpd,
240229
return __pm_genpd_add_device(genpd, dev, NULL);
241230
}
242231

243-
static 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-
249232
static inline int pm_genpd_name_add_device(const char *domain_name,
250233
struct device *dev)
251234
{

0 commit comments

Comments
 (0)