Re: [PATCH 2/3] clk: let of_clk_get_parent_name() fail for invalid clock-indices

2015-11-30 Thread Stephen Boyd
On 11/30, Masahiro Yamada wrote: > Hi Stephen, > > > > >> > >> Of course we can, although we have to mention "clock-indices" twice. > >> > >> A good thing for of_get_property() is that we can get both the value > >> and the length > >> at the same time. > >> > > > > Ok. Well if we don't want to

Re: [PATCH 2/3] clk: let of_clk_get_parent_name() fail for invalid clock-indices

2015-11-30 Thread Masahiro Yamada
Hi Stephen, >> >> Of course we can, although we have to mention "clock-indices" twice. >> >> A good thing for of_get_property() is that we can get both the value >> and the length >> at the same time. >> > > Ok. Well if we don't want to count them again, perhaps a goto > jump over an

Re: [PATCH 2/3] clk: let of_clk_get_parent_name() fail for invalid clock-indices

2015-11-30 Thread Stephen Boyd
On 11/30, Masahiro Yamada wrote: > Hi Stephen, > > > > >> > >> Of course we can, although we have to mention "clock-indices" twice. > >> > >> A good thing for of_get_property() is that we can get both the value > >> and the length > >> at the same time. > >> > > > > Ok. Well if we don't want to

Re: [PATCH 2/3] clk: let of_clk_get_parent_name() fail for invalid clock-indices

2015-11-30 Thread Masahiro Yamada
Hi Stephen, >> >> Of course we can, although we have to mention "clock-indices" twice. >> >> A good thing for of_get_property() is that we can get both the value >> and the length >> at the same time. >> > > Ok. Well if we don't want to count them again, perhaps a goto > jump over an

Re: [PATCH 2/3] clk: let of_clk_get_parent_name() fail for invalid clock-indices

2015-11-23 Thread Stephen Boyd
On 11/22, Masahiro Yamada wrote: > 2015-11-21 2:45 GMT+09:00 Stephen Boyd : > > > > What is np pointing at? Something like: > > > > consumer { > > clocks = < 0>; > > }; > > > > Which would be invalid DT because oscillator doesn't have an > > output for index 0? > >

Re: [PATCH 2/3] clk: let of_clk_get_parent_name() fail for invalid clock-indices

2015-11-23 Thread Stephen Boyd
On 11/22, Masahiro Yamada wrote: > 2015-11-21 2:45 GMT+09:00 Stephen Boyd : > > > > What is np pointing at? Something like: > > > > consumer { > > clocks = < 0>; > > }; > > > > Which would be invalid DT because oscillator doesn't have an > >

Re: [PATCH 2/3] clk: let of_clk_get_parent_name() fail for invalid clock-indices

2015-11-21 Thread Masahiro Yamada
Hi Stephen, 2015-11-21 2:45 GMT+09:00 Stephen Boyd : > On 11/20, Masahiro Yamada wrote: >> Currently, of_clk_get_parent_name() returns a wrong parent clock name >> when "clock-indices" property exists and the given index is not found >> in the property. In this case, NULL should be returned. >>

Re: [PATCH 2/3] clk: let of_clk_get_parent_name() fail for invalid clock-indices

2015-11-21 Thread Masahiro Yamada
Hi Stephen, 2015-11-21 2:45 GMT+09:00 Stephen Boyd : > On 11/20, Masahiro Yamada wrote: >> Currently, of_clk_get_parent_name() returns a wrong parent clock name >> when "clock-indices" property exists and the given index is not found >> in the property. In this case, NULL

Re: [PATCH 2/3] clk: let of_clk_get_parent_name() fail for invalid clock-indices

2015-11-20 Thread Stephen Boyd
On 11/20, Masahiro Yamada wrote: > Currently, of_clk_get_parent_name() returns a wrong parent clock name > when "clock-indices" property exists and the given index is not found > in the property. In this case, NULL should be returned. > > For example, > > oscillator { >

Re: [PATCH 2/3] clk: let of_clk_get_parent_name() fail for invalid clock-indices

2015-11-20 Thread Stephen Boyd
On 11/20, Masahiro Yamada wrote: > Currently, of_clk_get_parent_name() returns a wrong parent clock name > when "clock-indices" property exists and the given index is not found > in the property. In this case, NULL should be returned. > > For example, > > oscillator { >

[PATCH 2/3] clk: let of_clk_get_parent_name() fail for invalid clock-indices

2015-11-19 Thread Masahiro Yamada
Currently, of_clk_get_parent_name() returns a wrong parent clock name when "clock-indices" property exists and the given index is not found in the property. In this case, NULL should be returned. For example, oscillator { compatible = "myclocktype";

[PATCH 2/3] clk: let of_clk_get_parent_name() fail for invalid clock-indices

2015-11-19 Thread Masahiro Yamada
Currently, of_clk_get_parent_name() returns a wrong parent clock name when "clock-indices" property exists and the given index is not found in the property. In this case, NULL should be returned. For example, oscillator { compatible = "myclocktype";