All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soc: rockchip: power-domain: remove PM clocks
@ 2018-02-28 11:11 ` Jeffy Chen
  0 siblings, 0 replies; 32+ messages in thread
From: Jeffy Chen @ 2018-02-28 11:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: tfiga, dmitry.torokhov, robin.murphy, heiko, wxt, Jeffy Chen,
	Elaine Zhang, linux-rockchip, Geert Uytterhoeven,
	linux-arm-kernel, Ulf Hansson

Currently we are adding all of the attached devices' clocks as pm clocks
and enable them when powering on the power domain.

This seems unnecessary, because those clocks are already controlled in
the devices' drivers with better error handling.

Tested on my chromebook minnie(rk3288) and chromebook kevin(rk3399).

Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---

 drivers/soc/rockchip/pm_domains.c | 42 ---------------------------------------
 1 file changed, 42 deletions(-)

diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c
index 5c342167b9db..39723ef6f7dc 100644
--- a/drivers/soc/rockchip/pm_domains.c
+++ b/drivers/soc/rockchip/pm_domains.c
@@ -11,7 +11,6 @@
 #include <linux/io.h>
 #include <linux/iopoll.h>
 #include <linux/err.h>
-#include <linux/pm_clock.h>
 #include <linux/pm_domain.h>
 #include <linux/of_address.h>
 #include <linux/of_platform.h>
@@ -320,44 +319,6 @@ static int rockchip_pd_power_off(struct generic_pm_domain *domain)
 	return rockchip_pd_power(pd, false);
 }
 
-static int rockchip_pd_attach_dev(struct generic_pm_domain *genpd,
-				  struct device *dev)
-{
-	struct clk *clk;
-	int i;
-	int error;
-
-	dev_dbg(dev, "attaching to power domain '%s'\n", genpd->name);
-
-	error = pm_clk_create(dev);
-	if (error) {
-		dev_err(dev, "pm_clk_create failed %d\n", error);
-		return error;
-	}
-
-	i = 0;
-	while ((clk = of_clk_get(dev->of_node, i++)) && !IS_ERR(clk)) {
-		dev_dbg(dev, "adding clock '%pC' to list of PM clocks\n", clk);
-		error = pm_clk_add_clk(dev, clk);
-		if (error) {
-			dev_err(dev, "pm_clk_add_clk failed %d\n", error);
-			clk_put(clk);
-			pm_clk_destroy(dev);
-			return error;
-		}
-	}
-
-	return 0;
-}
-
-static void rockchip_pd_detach_dev(struct generic_pm_domain *genpd,
-				   struct device *dev)
-{
-	dev_dbg(dev, "detaching from power domain '%s'\n", genpd->name);
-
-	pm_clk_destroy(dev);
-}
-
 static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
 				      struct device_node *node)
 {
@@ -476,9 +437,6 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
 	pd->genpd.name = node->name;
 	pd->genpd.power_off = rockchip_pd_power_off;
 	pd->genpd.power_on = rockchip_pd_power_on;
-	pd->genpd.attach_dev = rockchip_pd_attach_dev;
-	pd->genpd.detach_dev = rockchip_pd_detach_dev;
-	pd->genpd.flags = GENPD_FLAG_PM_CLK;
 	if (pd_info->active_wakeup)
 		pd->genpd.flags |= GENPD_FLAG_ACTIVE_WAKEUP;
 	pm_genpd_init(&pd->genpd, NULL, false);
-- 
2.11.0

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

end of thread, other threads:[~2018-03-01 11:54 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-28 11:11 [PATCH] soc: rockchip: power-domain: remove PM clocks Jeffy Chen
2018-02-28 11:11 ` Jeffy Chen
2018-02-28 11:59 ` Heiko Stübner
2018-02-28 11:59   ` Heiko Stübner
2018-02-28 12:17 ` Geert Uytterhoeven
2018-02-28 12:17   ` Geert Uytterhoeven
2018-02-28 12:29   ` Tomasz Figa
2018-02-28 12:29     ` Tomasz Figa
2018-02-28 12:32     ` Geert Uytterhoeven
2018-02-28 12:32       ` Geert Uytterhoeven
2018-02-28 12:49       ` Tomasz Figa
2018-02-28 12:49         ` Tomasz Figa
2018-02-28 13:11         ` Geert Uytterhoeven
2018-02-28 13:11           ` Geert Uytterhoeven
2018-02-28 14:07           ` Tomasz Figa
2018-02-28 14:07             ` Tomasz Figa
2018-03-01  3:40             ` JeffyChen
2018-03-01  3:40               ` JeffyChen
2018-03-01  8:33               ` Geert Uytterhoeven
2018-03-01  8:33                 ` Geert Uytterhoeven
2018-03-01  9:09                 ` JeffyChen
2018-03-01  9:09                   ` JeffyChen
2018-03-01 10:18                 ` Ulf Hansson
2018-03-01 10:18                   ` Ulf Hansson
2018-03-01 10:37                   ` Geert Uytterhoeven
2018-03-01 10:37                     ` Geert Uytterhoeven
2018-03-01 11:22                     ` Ulf Hansson
2018-03-01 11:22                       ` Ulf Hansson
2018-03-01 11:54                       ` Geert Uytterhoeven
2018-03-01 11:54                         ` Geert Uytterhoeven
2018-02-28 12:36   ` JeffyChen
2018-02-28 12:36     ` JeffyChen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.