Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1276054
| From | Masahiro Yamada <yamada.masahiro@socionext.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 3/3] clk: split of_clk_get_parent_name() into two functions |
| Date | 2015-11-24 05:30 +0100 |
| Message-ID | <qydoR-3c2-7@gated-at.bofh.it> (permalink) |
| References | <qwOsx-4aA-3@gated-at.bofh.it> <qwOsy-4aA-15@gated-at.bofh.it> <qx4nD-6ez-7@gated-at.bofh.it> <qxvHb-7O7-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Stephen,
2015-11-22 14:44 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> Hi Stephen,
>
>
> 2015-11-21 9:37 GMT+09:00 Stephen Boyd <sboyd@codeaurora.org>:
>> On 11/20, Masahiro Yamada wrote:
>>> Currently, there is no function to get the clock name of the given
>>> node. Create a new helper function, of_clk_get_name(). This is
>>> useful to get the clock name where "clock-indices" property is used.
>>>
>>> of_clk_get_name(): get the clock name in the given node
>>> of_clk_get_parent_name(): get the name of the parent clock
>>>
>>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>>> ---
>>>
>>> I want to use of_clk_get_name() for my clk drivers for my SoCs,
>>> which I will submit later.
>>>
>>> I found this helper function is useful.
>>
>> I don't see how this is useful. Is the new driver so generic it
>> doesn't know what clocks it's outputting? We've been trying to
>> move people away from using clock-output-names, so most likely
>> this sort of information should be conveyed from DT via the
>> compatible string and a table in the driver that matches up the
>> compatible string with the list of clock names.
>
>
> What I implemented in my driver was:
>
> [1] Use the clock names built in the driver, if "clock-output-names"
> is missing in the DT.
>
> [2] If "clock-output-names" is specified, the driver overrides
> the clock names, respecting the "clock-output-names".
>
>
> The following is a snippet from my driver code.
>
>
> /*
> * update the clock name with the one provided by
> * clock-output-names property, if exists
> */
> new_name = of_clk_get_name(np, index);
> if (new_name)
> init_data[i].name = new_name;
> else
> pr_info("DT does not specify output name for %s[%d]\n",
> np->name, index);
>
>
> I read the Documentation/devicetree/bindings/clock-bindings.txt
> before I stared my driver development.
>
> I did not know we are deprecating the "clock-output-names".
> (Should it be mentioned in the clock-bindings.txt?)
Please let me clarify the driver implementation guideline.
[1] Do not add "clock-output-names" in new device trees.
[2] New clock drivers should not rely on "clock-output-names" at all.
Is this correct?
--
Best Regards
Masahiro Yamada
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 3/3] clk: split of_clk_get_parent_name() into two functions Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-11-20 08:40 +0100
Re: [PATCH 3/3] clk: split of_clk_get_parent_name() into two functions Stephen Boyd <sboyd@codeaurora.org> - 2015-11-21 01:40 +0100
Re: [PATCH 3/3] clk: split of_clk_get_parent_name() into two functions Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-11-22 06:50 +0100
Re: [PATCH 3/3] clk: split of_clk_get_parent_name() into two functions Masahiro Yamada <yamada.masahiro@socionext.com> - 2015-11-24 05:30 +0100
csiph-web