Thread (34 messages) 34 messages, 3 authors, 2015-07-30

[PATCH v6 04/13] clk: qcom: gdsc: Manage clocks with !CONFIG_PM

From: Rajendra Nayak <hidden>
Date: 2015-07-29 04:37:12
Also in: linux-arm-msm, linux-pm

On 07/29/2015 06:34 AM, Stephen Boyd wrote:
On 07/23/2015 01:35 AM, Rajendra Nayak wrote:
quoted
[]..
quoted
quoted
+
+#ifndef CONFIG_PM
+static void enable_clock(struct device *dev, const char *con_id)
+{
+    struct clk *clk;
+
+    clk = clk_get(dev, con_id);
+    if (!IS_ERR(clk)) {
+        clk_prepare_enable(clk);
+        clk_put(clk);
+    }
+}
+
+static void disable_clock(struct device *dev, const char *con_id)
+{
+    struct clk *clk;
+
+    clk = clk_get(dev, con_id);
+    if (!IS_ERR(clk)) {
+        clk_disable_unprepare(clk);
+        clk_put(clk);
+    }
+}
Is there a reason why this whole patch isn't generic code? I recall some
discussion but I forgot now and there isn't any mention of why this
isn't generic code in the commit text.
If by generic code, you mean using PM clocks, then this thread should
give some context..
http://www.spinics.net/lists/arm-kernel/msg414072.html
Sorry, I read the thread and I tried to understand what was going on but
I'm still lost. Can you clarify further in the commit text somehow?
So I can add this in the commit text, if it seems fine

"The use of pm_clk_add_notifier() isn't appropriate here since we need
to only manage clocks with valid power domain associations done via
DT, instead of what pm_clk_add_notifier() does, which is manage clocks
for all on SoC/off SoC devices associating all of them to a dummy power 
domain instead"

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help