Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Konrad Dybcio <konrad.dybcio@somainline.org>
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Andy Gross <agross@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Manivannan Sadhasivam <mani@kernel.org>,
	Jassi Brar <jassisinghbrar@gmail.com>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/6] arm64: dts: qcom: sc8280xp: Add reference device
Date: Wed, 22 Jun 2022 17:26:54 +0200	[thread overview]
Message-ID: <YrM0vhXpY3uWgprs@hovoldconsulting.com> (raw)
In-Reply-To: <51965fa3-d146-70f1-2ad8-db6197989348@somainline.org>

On Wed, Jun 22, 2022 at 05:10:50PM +0200, Konrad Dybcio wrote:
> 
> 
> On 22.06.2022 16:48, Krzysztof Kozlowski wrote:
> > On 22/06/2022 16:36, Konrad Dybcio wrote:
> >>
> >>
> >> On 22.06.2022 15:43, Johan Hovold wrote:
> >>> On Wed, Jun 22, 2022 at 02:33:02PM +0200, Konrad Dybcio wrote:
> >>>> On 22.06.2022 06:12, Bjorn Andersson wrote:
> >>>
> >>>>> +&qup2_i2c5 {
> >>>>> +	clock-frequency = <400000>;
> >>>>> +
> >>>>> +	pinctrl-names = "default";
> >>>>> +	pinctrl-0 = <&qup2_i2c5_default>, <&kybd_default>, <&tpad_default>;
> >>>>> +
> >>>>> +	status = "okay";
> >>>>> +
> >>>> I think all device DTs generally have 'status = "okay"' at the beginning. Should we change that?
> >>>>
> >>>
> >>> No, quite the opposite, status go at the end.
> >> Then all other device DTs should be updated, as in dts/qcom/
> >> everybody keeps it first in non-SoC/PMIC files.
> > 
> > The word "should" is a bit too much here, but I agree, we can update all
> > of them to match one, chosen approach.
> > 
> > However the location for "status" property is more important for the
> > definition of nodes in DTSI, because it's the least important piece
> > there and also kind of expected - here go properties + I disable it. For
> > me this is more important.

Right, and this is the argument for keeping status last, something which
is well defined.

If you look at some of the qcom dtsi it's hard to determine whether a
node is disabled or not because the status property does not actually go
"first" but is rather typically mixed up somewhere in the middle (or
upper part) of nodes.

> > For node redefinition in DTS, I see benefits in two approaches:
> > 1. Let me first enable the node and then configure it.
> > 2. Let me configure the node and enable it.

So for consistency, just put status last everywhere (dtsi and dts) and
be done with it.

> I looked around non-qcom device trees and it looks like the common
> consensus is 2. Although I personally visually prefer 1. and it's
> been used in all qcom arm64 DTs to date, I don't think there are any
> blockers for us to switch to 1. going forward to keep it consistent.

You mean inconsistent with the majority of dts? ;)

> That's if we want to clean up the existing ones, as changing the rules
> and not applying that to the older files will make for a huge mess as
> time goes on and will unnecessarily prolong the review process (as
> existing DTs are commonly a source of reference and people make
> certain choices based on those).

That's a fair point. Consistency is good, and dt snipped tends to be
copied, but it's not the end of the world to not update old dts either.

> I don't think the DTS specification or the Linux docs explicitly which
> one to choose though.

No, but a praxis has been developed over time (e.g. compatible first,
reg second, status last).

Johan

  reply	other threads:[~2022-06-22 15:27 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-22  4:12 [PATCH v2 0/6] arm64: dts: qcom: Introduce SC8280XP Bjorn Andersson
2022-06-22  4:12 ` [PATCH v2 1/6] dt-bindings: arm: qcom: Document additional sc8280xp devices Bjorn Andersson
2022-06-22  8:47   ` Johan Hovold
2022-06-22 21:06     ` Bjorn Andersson
2022-06-22 14:05   ` Krzysztof Kozlowski
2022-06-22  4:12 ` [PATCH v2 2/6] dt-bindings: mailbox: qcom-ipcc: Add NSP1 client Bjorn Andersson
2022-06-22  4:12 ` [PATCH v2 3/6] arm64: dts: qcom: add SC8280XP platform Bjorn Andersson
2022-06-22  8:53   ` Johan Hovold
2022-06-22 12:27   ` Konrad Dybcio
2022-06-22 14:07   ` Krzysztof Kozlowski
2022-06-22 18:56   ` Stephan Gerhold
2022-06-22 19:41     ` Bjorn Andersson
2022-06-22  4:12 ` [PATCH v2 4/6] arm64: dts: qcom: sc8280xp: Add reference device Bjorn Andersson
2022-06-22  9:06   ` Johan Hovold
2022-06-22 12:33   ` Konrad Dybcio
2022-06-22 13:43     ` Johan Hovold
2022-06-22 14:36       ` Konrad Dybcio
2022-06-22 14:44         ` Johan Hovold
2022-06-22 14:48         ` Krzysztof Kozlowski
2022-06-22 15:10           ` Konrad Dybcio
2022-06-22 15:26             ` Johan Hovold [this message]
2022-06-22 15:30               ` Konrad Dybcio
2022-06-22 15:37                 ` Johan Hovold
2022-06-22 15:39                   ` Konrad Dybcio
2022-06-22 21:00     ` Bjorn Andersson
2022-06-22 13:09   ` Johan Hovold
2022-06-22  4:12 ` [PATCH v2 5/6] arm64: dts: qcom: add SA8540P and ADP Bjorn Andersson
2022-06-22  9:24   ` Johan Hovold
2022-06-22 12:37   ` Konrad Dybcio
2022-06-22 13:44     ` Johan Hovold
2022-06-22 14:11       ` Krzysztof Kozlowski
2022-06-22 14:15         ` Johan Hovold
2022-06-22 13:11   ` Johan Hovold
2022-06-22  4:12 ` [PATCH v2 6/6] arm64: dts: qcom: sc8280xp: add Lenovo Thinkpad X13s devicetree Bjorn Andersson
2022-06-22 12:39   ` Konrad Dybcio
2022-06-22 13:49     ` Johan Hovold
2022-06-22 13:14   ` Johan Hovold
2022-06-22 13:26     ` [PATCH v3] " Johan Hovold
2022-06-22 14:18       ` Krzysztof Kozlowski
2022-06-27 11:38       ` Konrad Dybcio
2022-06-28  8:00         ` Johan Hovold
2022-06-28  8:09           ` Konrad Dybcio
2022-06-28  8:14             ` Johan Hovold
2022-06-28  8:19               ` Krzysztof Kozlowski
2022-07-03  3:56       ` Bjorn Andersson

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=YrM0vhXpY3uWgprs@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=konrad.dybcio@somainline.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=robh+dt@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