From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 9 Sep 2015 14:39:10 -0700 From: Stephen Boyd To: Laurent Pinchart Cc: Magnus Damm , linux-clk , Kuninori Morimoto , Gaku Inami , Michael Turquette , SH-Linux , "Simon Horman [Horms]" , Geert Uytterhoeven Subject: Re: [PATCH][RFC] clk: Use node name and index for clock name Message-ID: <20150909213910.GU15099@codeaurora.org> References: <20150909050554.27129.68718.sendpatchset@little-apple> <13888179.tcIA8DJW1S@avalon> <1981230.p8F5aT0ffl@avalon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <1981230.p8F5aT0ffl@avalon> List-ID: On 09/09, Laurent Pinchart wrote: > On Wednesday 09 September 2015 14:27:58 Magnus Damm wrote: > > On Wed, Sep 9, 2015 at 2:14 PM, Laurent Pinchart wrote: > > > Another issue is that this won't guarantee that the names are unique as > > > multiple DT nodes can have the same name. Instead of trying to generate > > > unique names, would it be possible to handle clock registration and > > > lookup without relying on names for DT-based platforms ? > > > > It would of course make sense to do that for the long run, but at the > > same time that sounds like major internal API rework since most > > functions operate on string clock names today. So for short term is > > the correct approach to use clock-output-names? > > I think Stephen and Mike should comment on that. > We've been murmuring about moving away from string based parent child relationship descriptions for some time now. Nothing very concrete has come out though and I haven't thought about it in too much detail. Why can't we call clk_get() for the clocks that we need to find the name of, and then call __clk_get_name() on them? Doing clk_get() has the nice side-effect of ordering probe for different clock controller drivers so that things like suspend/resume are done in the correct order. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Boyd Date: Wed, 09 Sep 2015 21:39:10 +0000 Subject: Re: [PATCH][RFC] clk: Use node name and index for clock name Message-Id: <20150909213910.GU15099@codeaurora.org> List-Id: References: <20150909050554.27129.68718.sendpatchset@little-apple> <13888179.tcIA8DJW1S@avalon> <1981230.p8F5aT0ffl@avalon> In-Reply-To: <1981230.p8F5aT0ffl@avalon> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Laurent Pinchart Cc: Magnus Damm , linux-clk , Kuninori Morimoto , Gaku Inami , Michael Turquette , SH-Linux , "Simon Horman [Horms]" , Geert Uytterhoeven On 09/09, Laurent Pinchart wrote: > On Wednesday 09 September 2015 14:27:58 Magnus Damm wrote: > > On Wed, Sep 9, 2015 at 2:14 PM, Laurent Pinchart wrote: > > > Another issue is that this won't guarantee that the names are unique as > > > multiple DT nodes can have the same name. Instead of trying to generate > > > unique names, would it be possible to handle clock registration and > > > lookup without relying on names for DT-based platforms ? > > > > It would of course make sense to do that for the long run, but at the > > same time that sounds like major internal API rework since most > > functions operate on string clock names today. So for short term is > > the correct approach to use clock-output-names? > > I think Stephen and Mike should comment on that. > We've been murmuring about moving away from string based parent child relationship descriptions for some time now. Nothing very concrete has come out though and I haven't thought about it in too much detail. Why can't we call clk_get() for the clocks that we need to find the name of, and then call __clk_get_name() on them? Doing clk_get() has the nice side-effect of ordering probe for different clock controller drivers so that things like suspend/resume are done in the correct order. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project