Thread (14 messages) 14 messages, 2 authors, 2016-11-24

Re: [RFC 3/4] PM / devfreq: exynos-bus: add support for suspend OPP

From: Chanwoo Choi <cw00.choi@samsung.com>
Date: 2016-11-24 01:38:32
Also in: linux-samsung-soc

Hi Tobias,

On 2016년 11월 23일 22:51, Tobias Jakobi wrote:
quoted hunk ↗ jump to hunk
TODO: write desc
Signed-off-by: Tobias Jakobi <redacted>
---
 drivers/devfreq/exynos-bus.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c
index 29866f7..8a91970 100644
--- a/drivers/devfreq/exynos-bus.c
+++ b/drivers/devfreq/exynos-bus.c
@@ -335,6 +335,7 @@ static int exynos_bus_parse_of(struct device_node *np,
 			      struct exynos_bus *bus)
 {
 	struct device *dev = bus->dev;
+	struct dev_pm_opp *suspend_opp;
 	unsigned long rate;
 	int ret;
 
@@ -368,6 +369,13 @@ static int exynos_bus_parse_of(struct device_node *np,
 		ret = PTR_ERR(bus->curr_opp);
 		goto err_opp;
 	}
+
+	suspend_opp = dev_pm_opp_get_suspend_opp(dev);
+	if (suspend_opp) {
+		bus->devfreq->suspend_freq = dev_pm_opp_get_freq(suspend_opp);
+		printk("DEBUG: suspend opp found!\n");
+	}
Looks good to me. But, you have to move this code
in the exynos_bus_parent_parse_of() because the passive devfreq
don't need to get the suspend_opp. The suspend_opp is necessary
only for parent devfreq device.

If parent devfreq device change the frequency/voltage,
the passive devfreq device will change the their frequency/voltage
according to parent devfreq.
+
 	rcu_read_unlock();
 
 	return 0;
-- 
Best Regards,
Chanwoo Choi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help