Thread (3 messages) 3 messages, 2 authors, 2025-03-31

Re: [PATCH] arm64: dts: qcom: align gpio-keys label format

From: Caleb Connolly <hidden>
Date: 2025-03-31 12:26:59
Also in: linux-arm-msm


On 3/31/25 14:20, Luca Weiss wrote:
On Mon Mar 31, 2025 at 2:10 PM CEST, Caleb Connolly wrote:
quoted
Most devices follow the practise of capitilising all words in a label,
this seems to be the standard elsewhere too (e.g. run "evtest" on an x86
ThinkPad).

Adjust the stragglers to follow suite, and standardise on "Volume
Buttons" over "Volume keys" as the label for the entire device where
applicable.
In theory some weird user space could find the correct input node based
on that label, which would 'break' if we change that label?
heh well part of the motivation for this fix is that we do exactly that 
in U-Boot, so having consistent names helps (though, so will changing 
the strcmp to a strcasecmp in U-Boot).
Not that anyone should really do this I believe, checking the supported
keys on a device is a much better solution.
Definitely agreed, I feel like this is better as a "revert if someone 
complains" patch.
But good to keep in mind.
quoted
Signed-off-by: Caleb Connolly <redacted>
---

This is really a drop in the ocean, a good next step would be to fix the
pm8941-pwrkey driver so your power button doesn't show up as
"pm8941_pwrkey".
"Power Button" would be good there, that's what my Intel Dell XPS 15 reports.
quoted
---
  arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi | 4 ++--
  arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts    | 6 +++---
  arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts   | 2 +-
  arch/arm64/boot/dts/qcom/qcm6490-shift-otter.dts     | 2 +-
  arch/arm64/boot/dts/qcom/sdm845-lg-common.dtsi       | 2 +-
  arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi  | 6 +++---
  arch/arm64/boot/dts/qcom/sm7325-nothing-spacewar.dts | 2 +-
  7 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi
index e6a69d942a4a..452c455294d0 100644
--- a/arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8998-oneplus-common.dtsi
@@ -90,17 +90,17 @@ gpio-keys {
  		pinctrl-names = "default";
  		pinctrl-0 = <&vol_keys_default>;
  
  		button-vol-down {
-			label = "Volume down";
+			label = "Volume Down";
  			gpios = <&pm8998_gpios 5 GPIO_ACTIVE_LOW>;
  			linux,code = <KEY_VOLUMEDOWN>;
  			debounce-interval = <15>;
  			wakeup-source;
  		};
  
  		button-vol-up {
-			label = "Volume up";
+			label = "Volume Up";
  			gpios = <&pm8998_gpios 6 GPIO_ACTIVE_LOW>;
  			linux,code = <KEY_VOLUMEUP>;
  			debounce-interval = <15>;
  			wakeup-source;
diff --git a/arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts b/arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts
index 0cac06f25a77..2a62d58195fd 100644
--- a/arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts
+++ b/arch/arm64/boot/dts/qcom/msm8998-xiaomi-sagit.dts
@@ -124,16 +124,16 @@ zap_shader_region: memory@f7900000 {
  	};
  
  	gpio-keys {
  		compatible = "gpio-keys";
-		label = "Volume buttons";
+		label = "Volume Up";
Not sure where the label from this wrapping node would show up, but you
maybe want to keep this one as "Volume Buttons", like in some of the
other files?
I was a bit unsure here, but this doesn't contain "volume buttons" it 
contains a single key, volume up. So labelling it as "volume buttons" is 
wrong, right?

I don't suppose it matters much.
Regards
Luca
-- 
Caleb (they/them)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help