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

2016-11-30 Thread Kuninori Morimoto
Hi Stephen, again Can I confirm ?? Was I misunderstanding ?? > I understand your point, but I think devm_get_clk_from_child() > needs new DT setings, and it can't keep compatibility, or > it makes driver complex. > I think it is nice to have. but, I want to keep current style. > Thus, I will

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

2016-11-30 Thread Kuninori Morimoto
Hi Stephen, again Can I confirm ?? Was I misunderstanding ?? > I understand your point, but I think devm_get_clk_from_child() > needs new DT setings, and it can't keep compatibility, or > it makes driver complex. > I think it is nice to have. but, I want to keep current style. > Thus, I will

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

2016-11-29 Thread Kuninori Morimoto
Hi Stephen Thank you for your feedback. > > > > sound_soc { > > > > clocks = <>, <>; > > > > clock-names = "cpu", "codec"; > > > > ... > > > > cpu { > > > > ... > > > > }; > > > >

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

2016-11-29 Thread Kuninori Morimoto
Hi Stephen Thank you for your feedback. > > > > sound_soc { > > > > clocks = <>, <>; > > > > clock-names = "cpu", "codec"; > > > > ... > > > > cpu { > > > > ... > > > > }; > > > >

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

2016-11-29 Thread Stephen Boyd
On 11/24, Kuninori Morimoto wrote: > > Hi Stephen, again > > > > I've seen bindings that have the 'clocks' property at the top > > > level and the appropriate 'clock-names' property to relate the > > > clocks to a subnode. > > > > > > sound_soc { > > > clocks = <>, <>; > > >

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

2016-11-29 Thread Stephen Boyd
On 11/24, Kuninori Morimoto wrote: > > Hi Stephen, again > > > > I've seen bindings that have the 'clocks' property at the top > > > level and the appropriate 'clock-names' property to relate the > > > clocks to a subnode. > > > > > > sound_soc { > > > clocks = <>, <>; > > >

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

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

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

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

[PATCH v2] clkdev: add devm_of_clk_get()

2016-11-27 Thread Kuninori Morimoto
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 --- v1 -> v2 - update git log drivers/clk/clkdev.c | 26 ++ include/linux/clk.h

[PATCH v2] clkdev: add devm_of_clk_get()

2016-11-27 Thread Kuninori Morimoto
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 --- v1 -> v2 - update git log drivers/clk/clkdev.c | 26 ++ include/linux/clk.h | 7 +++ 2 files changed, 33

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

2016-11-23 Thread Kuninori Morimoto
Hi Stephen, again > > I've seen bindings that have the 'clocks' property at the top > > level and the appropriate 'clock-names' property to relate the > > clocks to a subnode. > > > > sound_soc { > > clocks = <>, <>; > > clock-names = "cpu", "codec"; > >

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

2016-11-23 Thread Kuninori Morimoto
Hi Stephen, again > > I've seen bindings that have the 'clocks' property at the top > > level and the appropriate 'clock-names' property to relate the > > clocks to a subnode. > > > > sound_soc { > > clocks = <>, <>; > > clock-names = "cpu", "codec"; > >

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

2016-11-23 Thread Kuninori Morimoto
Hi Stephen Thank you for your feedback > I've seen bindings that have the 'clocks' property at the top > level and the appropriate 'clock-names' property to relate the > clocks to a subnode. > > sound_soc { > clocks = <>, <>; > clock-names = "cpu", "codec"; >

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

2016-11-23 Thread Kuninori Morimoto
Hi Stephen Thank you for your feedback > I've seen bindings that have the 'clocks' property at the top > level and the appropriate 'clock-names' property to relate the > clocks to a subnode. > > sound_soc { > clocks = <>, <>; > clock-names = "cpu", "codec"; >

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

2016-11-23 Thread Stephen Boyd
On 11/16, Kuninori Morimoto wrote: > > 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 > >

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

2016-11-23 Thread Stephen Boyd
On 11/16, Kuninori Morimoto wrote: > > 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 > >

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

2016-11-15 Thread Kuninori Morimoto
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 {

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

2016-11-15 Thread Kuninori Morimoto
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 {

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

2016-07-26 Thread Kuninori Morimoto
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 > > > > struct clk *clk_get(struct device *dev, const char *con_id) > > > { > > > ... > > > if (dev) { > > >

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

2016-07-26 Thread Kuninori Morimoto
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 > > > > struct clk *clk_get(struct device *dev, const char *con_id) > > > { > > > ... > > > if (dev) { > > >

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

2016-07-26 Thread Kuninori Morimoto
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 > > > > struct clk *clk_get(struct device *dev, const char *con_id) > > > { > > > ... > > > if (dev) { > > >

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

2016-07-26 Thread Kuninori Morimoto
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 > > > > struct clk *clk_get(struct device *dev, const char *con_id) > > > { > > > ... > > > if (dev) { > > >

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 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? > > > > > >

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? > > > > > >

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. > >

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. > >

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

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

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

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

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

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

[PATCH v2] clkdev: add devm_of_clk_get()

2016-07-03 Thread Kuninori Morimoto
This is based on devm_clk_get() Signed-off-by: Kuninori Morimoto --- v1 -> v2 - added "static" and "inline" on header drivers/clk/clkdev.c | 26 ++ include/linux/clk.h | 7 +++ 2 files changed, 33 insertions(+) diff --git

[PATCH v2] clkdev: add devm_of_clk_get()

2016-07-03 Thread Kuninori Morimoto
This is based on devm_clk_get() Signed-off-by: Kuninori Morimoto --- v1 -> v2 - added "static" and "inline" on header drivers/clk/clkdev.c | 26 ++ include/linux/clk.h | 7 +++ 2 files changed, 33 insertions(+) diff --git a/drivers/clk/clkdev.c