linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: rockchip: Add a few aliases to the PineTab2 dtsi
@ 2024-09-05 11:32 Dragan Simic
  2024-09-05 11:39 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 7+ messages in thread
From: Dragan Simic @ 2024-09-05 11:32 UTC (permalink / raw)
  To: linux-rockchip
  Cc: heiko, linux-arm-kernel, devicetree, robh, krzk+dt, conor+dt,
	linux-kernel, Diederik de Haas

Sprinkle a few commonly used aliases onto the PineTab2 dtsi file, to improve
its readability a bit, to make it easier to refer to the actual nodes later,
if needed, and to add a bit more detail to some of the labels.

No functional changes are introduced, which was validated by decompiling and
comparing all affected board dtb files before and after these changes.  When
compared with the decompiled original dtb files, some of the phandles in the
updated dtb files have different values, and the updated dtb files contain
some additional phandles and additional symbols that come from the introduced
aliases, but they still effectively remain the same as the originals.

Suggested-by: Diederik de Haas <didi.debian@cknow.org>
Signed-off-by: Dragan Simic <dsimic@manjaro.org>
---

Notes:
    This patch wasn't tested on a PineTab2 before it was submitted to the
    mailing list, because I don't have that device, but Diederik has already
    agreed to test this patch on his PineTab2 and provide feedback.

 arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi
index db40281eafbe..04d98715ae6e 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3566-pinetab2.dtsi
@@ -41,7 +41,7 @@ button-vol-down {
 		};
 	};
 
-	backlight: backlight {
+	backlight: backlight-dsi {
 		compatible = "pwm-backlight";
 		pwms = <&pwm4 0 25000 0>;
 		brightness-levels = <20 220>;
@@ -551,20 +551,20 @@ regulator-state-mem {
 			};
 		};
 
-		charger {
+		rk817_charger: charger {
 			monitored-battery = <&battery>;
 			rockchip,resistor-sense-micro-ohms = <10000>;
 			rockchip,sleep-enter-current-microamp = <300000>;
 			rockchip,sleep-filter-current-microamp = <100000>;
 		};
 	};
 };
 
 &i2c1 {
 	clock-frequency = <400000>;
 	status = "okay";
 
-	touchscreen@5d {
+	touchscreen: touchscreen@5d {
 		compatible = "goodix,gt911";
 		reg = <0x5d>;
 		interrupt-parent = <&gpio0>;
@@ -583,13 +583,13 @@ &i2c2 {
 	pinctrl-0 = <&i2c2m1_xfer>;
 	status = "okay";
 
-	vcm@c {
+	vcm: vcm@c {
 		compatible = "dongwoon,dw9714";
 		reg = <0x0c>;
 		vcc-supply = <&vcc1v8_dvp>;
 	};
 
-	camera@36 {
+	camerab: camera@36 {
 		compatible = "ovti,ov5648";
 		reg = <0x36>;
 		pinctrl-names = "default";
@@ -619,7 +619,7 @@ &i2c5 {
 	clock-frequency = <400000>;
 	status = "okay";
 
-	accelerometer@18 {
+	accelerometer: accelerometer@18 {
 		compatible = "silan,sc7a20";
 		reg = <0x18>;
 		interrupt-parent = <&gpio3>;


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

* Re: [PATCH] arm64: dts: rockchip: Add a few aliases to the PineTab2 dtsi
  2024-09-05 11:32 [PATCH] arm64: dts: rockchip: Add a few aliases to the PineTab2 dtsi Dragan Simic
@ 2024-09-05 11:39 ` Krzysztof Kozlowski
  2024-09-05 11:43   ` Dragan Simic
  2024-09-05 12:21   ` Diederik de Haas
  0 siblings, 2 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-09-05 11:39 UTC (permalink / raw)
  To: Dragan Simic, linux-rockchip
  Cc: heiko, linux-arm-kernel, devicetree, robh, krzk+dt, conor+dt,
	linux-kernel, Diederik de Haas

On 05/09/2024 13:32, Dragan Simic wrote:
> Sprinkle a few commonly used aliases onto the PineTab2 dtsi file, to improve
> its readability a bit, to make it easier to refer to the actual nodes later,
> if needed, and to add a bit more detail to some of the labels.
> 
> No functional changes are introduced, which was validated by decompiling and
> comparing all affected board dtb files before and after these changes.  When
> compared with the decompiled original dtb files, some of the phandles in the
> updated dtb files have different values, and the updated dtb files contain
> some additional phandles and additional symbols that come from the introduced
> aliases, but they still effectively remain the same as the originals.
> 
> Suggested-by: Diederik de Haas <didi.debian@cknow.org>
> Signed-off-by: Dragan Simic <dsimic@manjaro.org>
> ---

Unused aliases do not improve readability, so for me this change is
making code worse without valid reason.

Best regards,
Krzysztof



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

* Re: [PATCH] arm64: dts: rockchip: Add a few aliases to the PineTab2 dtsi
  2024-09-05 11:39 ` Krzysztof Kozlowski
@ 2024-09-05 11:43   ` Dragan Simic
  2024-09-05 11:48     ` Krzysztof Kozlowski
  2024-09-05 12:21   ` Diederik de Haas
  1 sibling, 1 reply; 7+ messages in thread
From: Dragan Simic @ 2024-09-05 11:43 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-rockchip, heiko, linux-arm-kernel, devicetree, robh,
	krzk+dt, conor+dt, linux-kernel, Diederik de Haas

Hello Krzysztof,

On 2024-09-05 13:39, Krzysztof Kozlowski wrote:
> On 05/09/2024 13:32, Dragan Simic wrote:
>> Sprinkle a few commonly used aliases onto the PineTab2 dtsi file, to 
>> improve
>> its readability a bit, to make it easier to refer to the actual nodes 
>> later,
>> if needed, and to add a bit more detail to some of the labels.
>> 
>> No functional changes are introduced, which was validated by 
>> decompiling and
>> comparing all affected board dtb files before and after these changes. 
>>  When
>> compared with the decompiled original dtb files, some of the phandles 
>> in the
>> updated dtb files have different values, and the updated dtb files 
>> contain
>> some additional phandles and additional symbols that come from the 
>> introduced
>> aliases, but they still effectively remain the same as the originals.
>> 
>> Suggested-by: Diederik de Haas <didi.debian@cknow.org>
>> Signed-off-by: Dragan Simic <dsimic@manjaro.org>
>> ---
> 
> Unused aliases do not improve readability, so for me this change is
> making code worse without valid reason.

Then why do we already have, for example, unused "rk817_charger: 
charger"
aliases in quite a few board dts(i) files?  If those are actually seen 
as
redundant, we should remove all of them.


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

* Re: [PATCH] arm64: dts: rockchip: Add a few aliases to the PineTab2 dtsi
  2024-09-05 11:43   ` Dragan Simic
@ 2024-09-05 11:48     ` Krzysztof Kozlowski
  2024-09-05 11:55       ` Dragan Simic
  0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-09-05 11:48 UTC (permalink / raw)
  To: Dragan Simic
  Cc: linux-rockchip, heiko, linux-arm-kernel, devicetree, robh,
	krzk+dt, conor+dt, linux-kernel, Diederik de Haas

On 05/09/2024 13:43, Dragan Simic wrote:
> Hello Krzysztof,
> 
> On 2024-09-05 13:39, Krzysztof Kozlowski wrote:
>> On 05/09/2024 13:32, Dragan Simic wrote:
>>> Sprinkle a few commonly used aliases onto the PineTab2 dtsi file, to 
>>> improve
>>> its readability a bit, to make it easier to refer to the actual nodes 
>>> later,
>>> if needed, and to add a bit more detail to some of the labels.
>>>
>>> No functional changes are introduced, which was validated by 
>>> decompiling and
>>> comparing all affected board dtb files before and after these changes. 
>>>  When
>>> compared with the decompiled original dtb files, some of the phandles 
>>> in the
>>> updated dtb files have different values, and the updated dtb files 
>>> contain
>>> some additional phandles and additional symbols that come from the 
>>> introduced
>>> aliases, but they still effectively remain the same as the originals.
>>>
>>> Suggested-by: Diederik de Haas <didi.debian@cknow.org>
>>> Signed-off-by: Dragan Simic <dsimic@manjaro.org>
>>> ---
>>
>> Unused aliases do not improve readability, so for me this change is
>> making code worse without valid reason.
> 
> Then why do we already have, for example, unused "rk817_charger: 
> charger"
> aliases in quite a few board dts(i) files?  If those are actually seen 

Ask contributors...

> as
> redundant, we should remove all of them.

They are already there, so dropping them is close to unnecessary churn.
And quite a lot of work to investigate the reason behind EACH label.

Best regards,
Krzysztof



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

* Re: [PATCH] arm64: dts: rockchip: Add a few aliases to the PineTab2 dtsi
  2024-09-05 11:48     ` Krzysztof Kozlowski
@ 2024-09-05 11:55       ` Dragan Simic
  0 siblings, 0 replies; 7+ messages in thread
From: Dragan Simic @ 2024-09-05 11:55 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: linux-rockchip, heiko, linux-arm-kernel, devicetree, robh,
	krzk+dt, conor+dt, linux-kernel, Diederik de Haas

On 2024-09-05 13:48, Krzysztof Kozlowski wrote:
> On 05/09/2024 13:43, Dragan Simic wrote:
>> Hello Krzysztof,
>> 
>> On 2024-09-05 13:39, Krzysztof Kozlowski wrote:
>>> On 05/09/2024 13:32, Dragan Simic wrote:
>>>> Sprinkle a few commonly used aliases onto the PineTab2 dtsi file, to
>>>> improve
>>>> its readability a bit, to make it easier to refer to the actual 
>>>> nodes
>>>> later,
>>>> if needed, and to add a bit more detail to some of the labels.
>>>> 
>>>> No functional changes are introduced, which was validated by
>>>> decompiling and
>>>> comparing all affected board dtb files before and after these 
>>>> changes.
>>>>  When
>>>> compared with the decompiled original dtb files, some of the 
>>>> phandles
>>>> in the
>>>> updated dtb files have different values, and the updated dtb files
>>>> contain
>>>> some additional phandles and additional symbols that come from the
>>>> introduced
>>>> aliases, but they still effectively remain the same as the 
>>>> originals.
>>>> 
>>>> Suggested-by: Diederik de Haas <didi.debian@cknow.org>
>>>> Signed-off-by: Dragan Simic <dsimic@manjaro.org>
>>>> ---
>>> 
>>> Unused aliases do not improve readability, so for me this change is
>>> making code worse without valid reason.
>> 
>> Then why do we already have, for example, unused "rk817_charger:
>> charger"
>> aliases in quite a few board dts(i) files?  If those are actually seen
> 
> Ask contributors...

That would be a lot of work for next to nothing.  Actually, I believe
those aliases were simply copied and pasted, at least when it comes to
the "rk817_*" aliases that are unused without doubt.

>> as
>> redundant, we should remove all of them.
> 
> They are already there, so dropping them is close to unnecessary churn.
> And quite a lot of work to investigate the reason behind EACH label.

Hmm, it's true that a lot of work would be needed.  On the other hand,
how about adding these aliases to the PineTab2 dtsi for the sake of
consistency with the other similar board dts(i) files?  For example,
grepping for "rk817_charger", which is used as an alias in all other
dts(i) files for boards that use RK817, currently omits the PineTab2
dtsi.  I see that as a downside that this patch attempts to improve.


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

* Re: [PATCH] arm64: dts: rockchip: Add a few aliases to the PineTab2 dtsi
  2024-09-05 11:39 ` Krzysztof Kozlowski
  2024-09-05 11:43   ` Dragan Simic
@ 2024-09-05 12:21   ` Diederik de Haas
  2024-09-05 14:08     ` Heiko Stübner
  1 sibling, 1 reply; 7+ messages in thread
From: Diederik de Haas @ 2024-09-05 12:21 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Dragan Simic, linux-rockchip
  Cc: heiko, linux-arm-kernel, devicetree, robh, krzk+dt, conor+dt,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1169 bytes --]

On Thu Sep 5, 2024 at 1:39 PM CEST, Krzysztof Kozlowski wrote:
> On 05/09/2024 13:32, Dragan Simic wrote:
> > Sprinkle a few commonly used aliases onto the PineTab2 dtsi file, to improve
> > its readability a bit, to make it easier to refer to the actual nodes later,
> > if needed, and to add a bit more detail to some of the labels.
> > 
> > Suggested-by: Diederik de Haas <didi.debian@cknow.org>
> > Signed-off-by: Dragan Simic <dsimic@manjaro.org>
>
> Unused aliases do not improve readability, so for me this change is
> making code worse without valid reason.

This came forth by a question from me to Dragan about a patch for
another board which doesn't have a charger defined at all (yet).
I actually have that patch (but not the HW) for a while (~1.5 year)
now and I had used `rk817_charger: charger` for that, probably because
I saw that being used everywhere else.

Then I compared it to the PineTab2 and noticed it had only `charger`, so
I asked "What should I use? With or without the alias?"
In this case the inconsistency is causing confusion (with me).

So: What should be used for that other/new board(s)?

Cheers,
  Diederik

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH] arm64: dts: rockchip: Add a few aliases to the PineTab2 dtsi
  2024-09-05 12:21   ` Diederik de Haas
@ 2024-09-05 14:08     ` Heiko Stübner
  0 siblings, 0 replies; 7+ messages in thread
From: Heiko Stübner @ 2024-09-05 14:08 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Dragan Simic, linux-rockchip,
	Diederik de Haas
  Cc: linux-arm-kernel, devicetree, robh, krzk+dt, conor+dt,
	linux-kernel

Am Donnerstag, 5. September 2024, 14:21:12 CEST schrieb Diederik de Haas:
> On Thu Sep 5, 2024 at 1:39 PM CEST, Krzysztof Kozlowski wrote:
> > On 05/09/2024 13:32, Dragan Simic wrote:
> > > Sprinkle a few commonly used aliases onto the PineTab2 dtsi file, to improve
> > > its readability a bit, to make it easier to refer to the actual nodes later,
> > > if needed, and to add a bit more detail to some of the labels.
> > > 
> > > Suggested-by: Diederik de Haas <didi.debian@cknow.org>
> > > Signed-off-by: Dragan Simic <dsimic@manjaro.org>
> >
> > Unused aliases do not improve readability, so for me this change is
> > making code worse without valid reason.
> 
> This came forth by a question from me to Dragan about a patch for
> another board which doesn't have a charger defined at all (yet).
> I actually have that patch (but not the HW) for a while (~1.5 year)
> now and I had used `rk817_charger: charger` for that, probably because
> I saw that being used everywhere else.
> 
> Then I compared it to the PineTab2 and noticed it had only `charger`, so
> I asked "What should I use? With or without the alias?"
> In this case the inconsistency is causing confusion (with me).
> 
> So: What should be used for that other/new board(s)?

As Krzysztof said, having a phandle that is never going to be used is
somewhat pointless.

Having a phandle defined for a node does not hurt anything, so having
some in a board dts is not catastrophically bad, but there is no reason
to add or remove unused ones for no reason - especially as it affects
git blame .

So in short, if you see an unused phandle in a dts _patch_, just point it
out in review.


Heiko




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

end of thread, other threads:[~2024-09-05 14:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-05 11:32 [PATCH] arm64: dts: rockchip: Add a few aliases to the PineTab2 dtsi Dragan Simic
2024-09-05 11:39 ` Krzysztof Kozlowski
2024-09-05 11:43   ` Dragan Simic
2024-09-05 11:48     ` Krzysztof Kozlowski
2024-09-05 11:55       ` Dragan Simic
2024-09-05 12:21   ` Diederik de Haas
2024-09-05 14:08     ` Heiko Stübner

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).