Thread (16 messages) 16 messages, 4 authors, 2016-12-01

[alsa-devel] [PATCH v2] clkdev: add devm_of_clk_get()

From: kuninori.morimoto.gx@renesas.com (Kuninori Morimoto)
Date: 2016-07-27 00:52:20
Also in: alsa-devel, linux-clk, linux-devicetree, lkml

Hi Rob, Michael, Russell
Cc Rob

What is the conclusion of this patch ?
We shouldn't add devm_of_clk_get() ? or I can continue ?
Thank you for your feedback
quoted
quoted
struct clk *clk_get(struct device *dev, const char *con_id)
{
        ...
        if (dev) {
                clk = __of_clk_get_by_name(dev->of_node, dev_id, con_id);
                                           ~~~~~~~~~~~~
                ...
        }
}

I would like to select specific device_node.
Do you have access to the struct device that you want to target? Can you
pass that device into either clk_get or devm_clk_get?
If my understanding was correct, I think I can't.
In below case, "sound_soc" has its *dev, but "cpu" and "codec" doesn't
have *dev, it has node only. Thus, we are using of_clk_get() for these now.

	clk = of_clk_get(cpu, xxx);
	clk = of_clk_get(codec, xxx);

	sound_soc {
		...
		cpu {
			...
=>			clocks = <&xxx>;
		};
		codec {
			...
=>			clocks = <&xxx>;
		};
	};
_______________________________________________
Alsa-devel mailing list
Alsa-devel at alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help