devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>, Vinod Koul <vkoul@kernel.org>,
	linux-arm-msm@vger.kernel.org, Andy Gross <agross@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Vamsi Krishna Lanka <quic_vamslank@quicinc.com>,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] clk: qcom: Add clock driver for SM8450
Date: Tue, 14 Dec 2021 23:36:26 -0800	[thread overview]
Message-ID: <20211215073627.800E9C34600@smtp.kernel.org> (raw)
In-Reply-To: <YbTqPfs7026l6LFE@builder.lan>

Quoting Bjorn Andersson (2021-12-11 10:13:17)
> On Thu 09 Dec 02:25 CST 2021, Stephen Boyd wrote:
> 
> > Maybe you want to drop these strings and use the dt index directly? That
> > may actually be faster because we don't do as many string comparisons
> > and the code may be smaller if we don't have to store bi_tcxo. I suppose
> > to make it more readable we could have #defines for each DT index like
> > 
> >  #define DT_BI_TCXO   0
> >  #define DT_SLEEP_CLK 1
> > 
> > Blaze a new trail!
> > 
> 
> I like the idea, and iiuc it's just a matter of replacing .fw_name with
> .index?

Yes.

> 
> I am however worried that people will get the order wrong as they are
> hacking on their dts/drivers, because (at least in my view) the order of
> clocks & clock-names has been seen as "a dt binding requirement" up
> until such change. But if we replace the names with indices such enum
> would have to be kept in sync with the DT binding and there's no way to
> validate it.

That's lame, but I see your point. The order is definitely part of the
binding but I'm not sure what we can do about folks deciding to reorder
the clocks property. The checker has a blind spot here.

> 
> If we do this we should force the driver and dts-writers to rely on the
> binding document by omitting clock-names from the binding (and hence
> dts). Otherwise people will (I will) assume that the clock-names are
> still what matters...
> 

I guess so. It still leaves everything exposed to the clocks property
getting jumbled and then everything falling apart. Sigh.

I'm not sure how much worse this is than today where the clock-names
property could be wrong and doesn't match the order of the clocks
property. We don't catch that either with the checker, so it's about the
same risk from my perspective. Why not take the risk and save on image
size?

  reply	other threads:[~2021-12-15  7:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07 11:40 [PATCH v2 0/2] clk: qcom: Add clocks for SM8450 SoC Vinod Koul
2021-12-07 11:40 ` [PATCH v2 1/2] dt-bindings: clock: Add SM8450 GCC clock bindings Vinod Koul
2021-12-09  8:21   ` Stephen Boyd
2021-12-15 15:55   ` Rob Herring
2021-12-15 22:27   ` (subset) " Bjorn Andersson
2021-12-07 11:40 ` [PATCH v2 2/2] clk: qcom: Add clock driver for SM8450 Vinod Koul
2021-12-08 14:31   ` kernel test robot
2021-12-09  8:25   ` Stephen Boyd
2021-12-11 18:13     ` Bjorn Andersson
2021-12-15  7:36       ` Stephen Boyd [this message]
2021-12-09  8:26   ` Stephen Boyd
2021-12-14  5:34     ` Vinod Koul
2021-12-15  7:36       ` Stephen Boyd
2021-12-15 22:27   ` (subset) " Bjorn Andersson
2021-12-09  8:19 ` [PATCH v2 0/2] clk: qcom: Add clocks for SM8450 SoC Stephen Boyd
2021-12-09 12:04   ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211215073627.800E9C34600@smtp.kernel.org \
    --to=sboyd@kernel.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=quic_vamslank@quicinc.com \
    --cc=robh+dt@kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).