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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi Rob, Michael, Russell


What is the conclusion of this patch ?
We shouldn't add devm_of_clk_get() ? or can I continue ?

The problem of current [devm_]clk_get() handles *dev only,
but I need to get clocks from DT node, not dev

	sound_soc {
		...
		cpu {
			...
=>			clocks = <&xxx>;
		};
		codec {
			...
=>			clocks = <&xxx>;
		};
	};

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


Best regards
---
Kuninori Morimoto
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux