Re: [PATCH v2] clkdev: add devm_of_clk_get()

2016-11-28 Thread Kuninori Morimoto
Hi Russell > > Current Linux has of_clk_get(), but doesn't have devm_of_clk_get(). > > This patch adds it. This is based on devm_clk_get() > > > > Signed-off-by: Kuninori Morimoto > > Please put this in drivers/clk/clk-devres.c, where you'll find that > we have devm_clk_release() which is iden

Re: [PATCH v2] clkdev: add devm_of_clk_get()

2016-11-28 Thread Russell King - ARM Linux
On Mon, Nov 28, 2016 at 06:56:52AM +, Kuninori Morimoto wrote: > Current Linux has of_clk_get(), but doesn't have devm_of_clk_get(). > This patch adds it. This is based on devm_clk_get() > > Signed-off-by: Kuninori Morimoto Please put this in drivers/clk/clk-devres.c, where you'll find that

Re: [PATCH v2] clkdev: add devm_of_clk_get()

2016-07-07 Thread Kuninori Morimoto
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); > > > >

Re: [PATCH v2] clkdev: add devm_of_clk_get()

2016-07-07 Thread Michael Turquette
Quoting Kuninori Morimoto (2016-07-07 17:03:00) > > Hi Russell > > > > > > +struct clk *devm_of_clk_get(struct device *dev, > > > > > + struct device_node *np, int index) > > > > > > > > Any reason not to use devm_clk_get? Why do we need this helper? > > > > > > Becaus

Re: [PATCH v2] clkdev: add devm_of_clk_get()

2016-07-07 Thread Kuninori Morimoto
Hi Russell > > > > +struct clk *devm_of_clk_get(struct device *dev, > > > > + struct device_node *np, int index) > > > > > > Any reason not to use devm_clk_get? Why do we need this helper? > > > > Because of_clk_get() can parse "clocks", "#clock-cells" on DT. > > clk_

Re: [PATCH v2] clkdev: add devm_of_clk_get()

2016-07-07 Thread Russell King - ARM Linux
On Thu, Jul 07, 2016 at 09:54:03AM +, Kuninori Morimoto wrote: > > Hi Michael > > > > +struct clk *devm_of_clk_get(struct device *dev, > > > + struct device_node *np, int index) > > > > Any reason not to use devm_clk_get? Why do we need this helper? > > Because of_

Re: [PATCH v2] clkdev: add devm_of_clk_get()

2016-07-07 Thread Kuninori Morimoto
Hi Michael > > +struct clk *devm_of_clk_get(struct device *dev, > > + struct device_node *np, int index) > > Any reason not to use devm_clk_get? Why do we need this helper? Because of_clk_get() can parse "clocks", "#clock-cells" on DT. And it can manage of_clk_provider

Re: [PATCH v2] clkdev: add devm_of_clk_get()

2016-07-06 Thread Michael Turquette
Quoting Kuninori Morimoto (2016-07-03 18:36:50) > +struct clk *devm_of_clk_get(struct device *dev, > + struct device_node *np, int index) Any reason not to use devm_clk_get? Why do we need this helper? Thanks, Mike > +{ > + struct clk **ptr, *clk; > + > + pt