All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] arm64: dts: qcom: msm8994: override nodes by label
@ 2022-04-02 19:28 Krzysztof Kozlowski
  2022-04-02 19:28 ` [PATCH 2/2] arm64: dts: qcom: msm8996: " Krzysztof Kozlowski
  2022-04-21 14:26 ` (subset) [PATCH 1/2] arm64: dts: qcom: msm8994: " Bjorn Andersson
  0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-02 19:28 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	linux-arm-msm, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Using node paths to extend or override a device tree node is error
prone.  If there was a typo error, a new node will be created instead of
extending the existing node.  This will lead to run-time errors that
could be hard to detect.

A mistyped label on the other hand, will cause a dtc compile error
(during build time).  This also reduces the indentation making the code
easier to read.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../dts/qcom/msm8994-huawei-angler-rev-101.dts     | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts b/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts
index 0e3dd48f0dbf..c1fb9a7d6fa4 100644
--- a/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts
+++ b/arch/arm64/boot/dts/qcom/msm8994-huawei-angler-rev-101.dts
@@ -27,15 +27,13 @@ aliases {
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
+};
 
-	soc {
-		serial@f991e000 {
-			status = "okay";
-			pinctrl-names = "default", "sleep";
-			pinctrl-0 = <&blsp1_uart2_default>;
-			pinctrl-1 = <&blsp1_uart2_sleep>;
-		};
-	};
+&blsp1_uart2 {
+	status = "okay";
+	pinctrl-names = "default", "sleep";
+	pinctrl-0 = <&blsp1_uart2_default>;
+	pinctrl-1 = <&blsp1_uart2_sleep>;
 };
 
 &tlmm {
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] arm64: dts: qcom: msm8996: override nodes by label
  2022-04-02 19:28 [PATCH 1/2] arm64: dts: qcom: msm8994: override nodes by label Krzysztof Kozlowski
@ 2022-04-02 19:28 ` Krzysztof Kozlowski
  2022-04-21 14:26   ` (subset) " Bjorn Andersson
  2022-04-21 14:26 ` (subset) [PATCH 1/2] arm64: dts: qcom: msm8994: " Bjorn Andersson
  1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-02 19:28 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
	linux-arm-msm, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Using node paths to extend or override a device tree node is error
prone.  If there was a typo error, a new node will be created instead of
extending the existing node.  This will lead to run-time errors that
could be hard to detect.

A mistyped label on the other hand, will cause a dtc compile error
(during build time).  This also reduces the indentation making the code
easier to read.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 arch/arm64/boot/dts/qcom/msm8996-mtp.dts | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8996-mtp.dts b/arch/arm64/boot/dts/qcom/msm8996-mtp.dts
index 6a1699a96c99..596ad4c896f5 100644
--- a/arch/arm64/boot/dts/qcom/msm8996-mtp.dts
+++ b/arch/arm64/boot/dts/qcom/msm8996-mtp.dts
@@ -18,12 +18,10 @@ aliases {
 	chosen {
 		stdout-path = "serial0";
 	};
+};
 
-	soc {
-		serial@75b0000 {
-			status = "okay";
-		};
-	};
+&blsp2_uart2 {
+	status = "okay";
 };
 
 &hdmi {
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: (subset) [PATCH 1/2] arm64: dts: qcom: msm8994: override nodes by label
  2022-04-02 19:28 [PATCH 1/2] arm64: dts: qcom: msm8994: override nodes by label Krzysztof Kozlowski
  2022-04-02 19:28 ` [PATCH 2/2] arm64: dts: qcom: msm8996: " Krzysztof Kozlowski
@ 2022-04-21 14:26 ` Bjorn Andersson
  1 sibling, 0 replies; 4+ messages in thread
From: Bjorn Andersson @ 2022-04-21 14:26 UTC (permalink / raw)
  To: Andy Gross, devicetree, Rob Herring, linux-kernel, linux-arm-msm,
	Krzysztof Kozlowski, Krzysztof Kozlowski

On Sat, 2 Apr 2022 21:28:58 +0200, Krzysztof Kozlowski wrote:
> Using node paths to extend or override a device tree node is error
> prone.  If there was a typo error, a new node will be created instead of
> extending the existing node.  This will lead to run-time errors that
> could be hard to detect.
> 
> A mistyped label on the other hand, will cause a dtc compile error
> (during build time).  This also reduces the indentation making the code
> easier to read.
> 
> [...]

Applied, thanks!

[1/2] arm64: dts: qcom: msm8994: override nodes by label
      commit: c46e3c4bdfaca1595b898bb58b112fd683fe0c11

Best regards,
-- 
Bjorn Andersson <bjorn.andersson@linaro.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: (subset) [PATCH 2/2] arm64: dts: qcom: msm8996: override nodes by label
  2022-04-02 19:28 ` [PATCH 2/2] arm64: dts: qcom: msm8996: " Krzysztof Kozlowski
@ 2022-04-21 14:26   ` Bjorn Andersson
  0 siblings, 0 replies; 4+ messages in thread
From: Bjorn Andersson @ 2022-04-21 14:26 UTC (permalink / raw)
  To: Andy Gross, devicetree, Rob Herring, linux-kernel, linux-arm-msm,
	Krzysztof Kozlowski, Krzysztof Kozlowski

On Sat, 2 Apr 2022 21:28:59 +0200, Krzysztof Kozlowski wrote:
> Using node paths to extend or override a device tree node is error
> prone.  If there was a typo error, a new node will be created instead of
> extending the existing node.  This will lead to run-time errors that
> could be hard to detect.
> 
> A mistyped label on the other hand, will cause a dtc compile error
> (during build time).  This also reduces the indentation making the code
> easier to read.
> 
> [...]

Applied, thanks!

[2/2] arm64: dts: qcom: msm8996: override nodes by label
      commit: 2a80a66f68e37ce19dee7fdb3d3e946859712b53

Best regards,
-- 
Bjorn Andersson <bjorn.andersson@linaro.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-21 14:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-02 19:28 [PATCH 1/2] arm64: dts: qcom: msm8994: override nodes by label Krzysztof Kozlowski
2022-04-02 19:28 ` [PATCH 2/2] arm64: dts: qcom: msm8996: " Krzysztof Kozlowski
2022-04-21 14:26   ` (subset) " Bjorn Andersson
2022-04-21 14:26 ` (subset) [PATCH 1/2] arm64: dts: qcom: msm8994: " Bjorn Andersson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.