lkml.org 
[lkml]   [2016]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] clkdev: add devm_of_clk_get()
Date

Hi Michael

Thank you for your feedback

> > 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>;
};
};

\
 
 \ /
  Last update: 2016-07-08 06:01    [W:1.130 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site