linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PM / Domains: Remove legacy API for adding devices through DT
@ 2014-09-25 15:49 Ulf Hansson
  2014-09-25 16:35 ` Geert Uytterhoeven
  2014-09-25 22:10 ` Kevin Hilman
  0 siblings, 2 replies; 4+ messages in thread
From: Ulf Hansson @ 2014-09-25 15:49 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Pavel Machek, linux-pm
  Cc: Geert Uytterhoeven, Kevin Hilman, Tomasz Figa, Philipp Zabel,
	Ulf Hansson

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>
---
 drivers/base/power/domain.c | 33 ---------------------------------
 include/linux/pm_domain.h   | 17 -----------------
 2 files changed, 50 deletions(-)

diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index cd40057..8ba04cd 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -1454,39 +1454,6 @@ int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev,
 }
 
 /**
- * __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.
  * @dev: Device to be added.
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h
index 292079d..c3763a3 100644
--- a/include/linux/pm_domain.h
+++ b/include/linux/pm_domain.h
@@ -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;
 };
 
@@ -122,10 +121,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);
@@ -167,12 +162,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)
@@ -238,12 +227,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)
 {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] PM / Domains: Remove legacy API for adding devices through DT
  2014-09-25 15:49 [PATCH] PM / Domains: Remove legacy API for adding devices through DT Ulf Hansson
@ 2014-09-25 16:35 ` Geert Uytterhoeven
  2014-09-25 22:10 ` Kevin Hilman
  1 sibling, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2014-09-25 16:35 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Rafael J. Wysocki, Len Brown, Pavel Machek, Linux PM list,
	Geert Uytterhoeven, Kevin Hilman, Tomasz Figa, Philipp Zabel

On Thu, Sep 25, 2014 at 5:49 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> 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>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] PM / Domains: Remove legacy API for adding devices through DT
  2014-09-25 15:49 [PATCH] PM / Domains: Remove legacy API for adding devices through DT Ulf Hansson
  2014-09-25 16:35 ` Geert Uytterhoeven
@ 2014-09-25 22:10 ` Kevin Hilman
  2014-09-25 23:38   ` Rafael J. Wysocki
  1 sibling, 1 reply; 4+ messages in thread
From: Kevin Hilman @ 2014-09-25 22:10 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Rafael J. Wysocki, Len Brown, Pavel Machek, linux-pm,
	Geert Uytterhoeven, Tomasz Figa, Philipp Zabel

Ulf Hansson <ulf.hansson@linaro.org> writes:

> 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: Kevin Hilman <khilman@linaro.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] PM / Domains: Remove legacy API for adding devices through DT
  2014-09-25 22:10 ` Kevin Hilman
@ 2014-09-25 23:38   ` Rafael J. Wysocki
  0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2014-09-25 23:38 UTC (permalink / raw)
  To: Kevin Hilman, Ulf Hansson
  Cc: Len Brown, Pavel Machek, linux-pm, Geert Uytterhoeven,
	Tomasz Figa, Philipp Zabel

On Thursday, September 25, 2014 03:10:21 PM Kevin Hilman wrote:
> Ulf Hansson <ulf.hansson@linaro.org> writes:
> 
> > 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: Kevin Hilman <khilman@linaro.org>

I'vew queued this up for 3.18, but the ACK didn't make it.

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-25 23:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-25 15:49 [PATCH] PM / Domains: Remove legacy API for adding devices through DT Ulf Hansson
2014-09-25 16:35 ` Geert Uytterhoeven
2014-09-25 22:10 ` Kevin Hilman
2014-09-25 23:38   ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).