Skip to content

Commit

Permalink
PM / Domains: Remove legacy API for adding devices through DT
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ulf Hansson authored and Rafael J. Wysocki committed Sep 25, 2014
1 parent d79b6fe commit 263c589
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 50 deletions.
33 changes: 0 additions & 33 deletions drivers/base/power/domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -1456,39 +1456,6 @@ int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev,
return ret;
}

/**
* __pm_genpd_of_add_device - Add a device to an I/O PM domain.
* @genpd_node: Device tree node pointer representing a PM domain to which the
* the device is added to.
* @dev: Device to be added.
* @td: Set of PM QoS timing parameters to attach to the device.
*/
int __pm_genpd_of_add_device(struct device_node *genpd_node, struct device *dev,
struct gpd_timing_data *td)
{
struct generic_pm_domain *genpd = NULL, *gpd;

dev_dbg(dev, "%s()\n", __func__);

if (IS_ERR_OR_NULL(genpd_node) || IS_ERR_OR_NULL(dev))
return -EINVAL;

mutex_lock(&gpd_list_lock);
list_for_each_entry(gpd, &gpd_list, gpd_list_node) {
if (gpd->of_node == genpd_node) {
genpd = gpd;
break;
}
}
mutex_unlock(&gpd_list_lock);

if (!genpd)
return -EINVAL;

return __pm_genpd_add_device(genpd, dev, td);
}


/**
* __pm_genpd_name_add_device - Find I/O PM domain and add a device to it.
* @domain_name: Name of the PM domain to add the device to.
Expand Down
17 changes: 0 additions & 17 deletions include/linux/pm_domain.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ struct generic_pm_domain {
s64 max_off_time_ns; /* Maximum allowed "suspended" time. */
bool max_off_time_changed;
bool cached_power_down_ok;
struct device_node *of_node; /* Node in device tree */
struct gpd_cpu_data *cpu_data;
void (*attach_dev)(struct device *dev);
void (*detach_dev)(struct device *dev);
Expand Down Expand Up @@ -124,10 +123,6 @@ extern int __pm_genpd_add_device(struct generic_pm_domain *genpd,
struct device *dev,
struct gpd_timing_data *td);

extern int __pm_genpd_of_add_device(struct device_node *genpd_node,
struct device *dev,
struct gpd_timing_data *td);

extern int __pm_genpd_name_add_device(const char *domain_name,
struct device *dev,
struct gpd_timing_data *td);
Expand Down Expand Up @@ -169,12 +164,6 @@ static inline int __pm_genpd_add_device(struct generic_pm_domain *genpd,
{
return -ENOSYS;
}
static inline int __pm_genpd_of_add_device(struct device_node *genpd_node,
struct device *dev,
struct gpd_timing_data *td)
{
return -ENOSYS;
}
static inline int __pm_genpd_name_add_device(const char *domain_name,
struct device *dev,
struct gpd_timing_data *td)
Expand Down Expand Up @@ -240,12 +229,6 @@ static inline int pm_genpd_add_device(struct generic_pm_domain *genpd,
return __pm_genpd_add_device(genpd, dev, NULL);
}

static inline int pm_genpd_of_add_device(struct device_node *genpd_node,
struct device *dev)
{
return __pm_genpd_of_add_device(genpd_node, dev, NULL);
}

static inline int pm_genpd_name_add_device(const char *domain_name,
struct device *dev)
{
Expand Down

0 comments on commit 263c589

Please sign in to comment.