arm64: dts: qcom: sm6125-seine: Clean up gpio-keys (volume down)
authorMarijn Suijten <marijn.suijten@somainline.org>
Thu, 22 Dec 2022 19:24:43 +0000 (20:24 +0100)
committerBjorn Andersson <andersson@kernel.org>
Thu, 29 Dec 2022 17:09:17 +0000 (11:09 -0600)
- Remove autorepeat (leave key repetition to userspace);
- Remove unneeded status = "okay" (this is the default);
- Remove unneeded linux,input-type <EV_KEY> (this is the default for
  gpio-keys);
- Allow the interrupt line for this button to be disabled;
- Use a full, descriptive node name;
- Set proper bias on the GPIO via pinctrl;
- Sort properties;
- Replace deprecated gpio-key,wakeup property with wakeup-source.

Fixes: 82e1783890b7 ("arm64: dts: qcom: sm6125: Add support for Sony Xperia 10II")
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221222192443.119103-1-marijn.suijten@somainline.org
arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts

index 77a7d7f..637a5b2 100644 (file)
        };
 
        gpio-keys {
-               status = "okay";
                compatible = "gpio-keys";
-               autorepeat;
 
-               key-vol-dn {
+               pinctrl-0 = <&vol_down_n>;
+               pinctrl-names = "default";
+
+               key-volume-down {
                        label = "Volume Down";
                        gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
-                       linux,input-type = <1>;
                        linux,code = <KEY_VOLUMEDOWN>;
-                       gpio-key,wakeup;
                        debounce-interval = <15>;
+                       linux,can-disable;
+                       wakeup-source;
                };
        };
 
 
 &tlmm {
        gpio-reserved-ranges = <22 2>, <28 6>;
+
+       vol_down_n: vol-down-n-state {
+               pins = "gpio47";
+               function = "gpio";
+               drive-strength = <2>;
+               bias-disable;
+               input-enable;
+       };
 };
 
 &usb3 {