Thread (28 messages) read the whole thread 28 messages, 5 authors, 2015-10-29

[PATCH 09/13] clk: versatile-icst: add device tree support

From: Stephen Boyd <hidden>
Date: 2015-10-15 19:26:26
Also in: linux-clk

On 10/15, Linus Walleij wrote:
+
+	if (of_device_is_compatible(np, "arm,syscon-icst525"))
+		icst_desc.params = &icst525_params;
+	else if (of_device_is_compatible(np, "arm,syscon-icst307"))
+		icst_desc.params = &icst307_params;
I guess if we add anymore here we should use an of_device_id
array instead.
+	else {
+		pr_info("unknown ICST clock %s\n", name);
pr_warn? pr_err?
+		return;
+	}
+
+	/* Parent clock name is not the same as node parent */
+	parent_name = of_clk_get_parent_name(np, 0);
+
+	regclk = icst_clk_setup(NULL, &icst_desc, name, parent_name, map);
+	if (IS_ERR(regclk)) {
+		pr_err("error setting up syscon ICST clock %s\n", name);
+		return;
+	}
+	of_clk_add_provider(np, of_clk_src_simple_get, regclk);
+	pr_info("registered syscon ICST clock %s\n", name);
debug print? Please remove debug noise.

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