arm64: dts: qcom: sc7180-trogdor: Split out keyboard node and describe detachables
authorStephen Boyd <swboyd@chromium.org>
Mon, 27 Jun 2022 21:28:02 +0000 (14:28 -0700)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Sun, 3 Jul 2022 03:17:11 +0000 (22:17 -0500)
Trogdor devices that have a detachable keyboard still have a
non-detachable keyboard input device present because we include the
cros-ec-keyboard.dtsi snippet in the top-level sc7180-trogdor.dtsi file
that every variant board includes. We do this because the
keyboard-controller node also provides some buttons like the power
button and volume buttons. Unfortunately, this means we register a
keyboard input device that doesn't do anything on boards with a
detachable keyboard.

Change the node's compatible on detachables to the newly introduced
"google,cros-ec-keyb-switches" compatible to indicate that there are
only switches and no keyboard to register. Similarly, move the keyboard
include that defines the keyboard-controller node out of
sc7180-trogdor.dtsi to boards that actually have a keyboard so that the
matrix properties are not defined on boards with the switches
compatible. Future boards can either use the include approach or the
node definition approach to describe a keyboard with possible switches
or just some switches.

Cc: Benson Leung <bleung@chromium.org>
Cc: Guenter Roeck <groeck@chromium.org>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Hsin-Yi Wang <hsinyi@chromium.org>
Cc: "Joseph S. Barrera III" <joebar@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220627212802.3593012-1-swboyd@chromium.org
arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz.dtsi
arch/arm64/boot/dts/qcom/sc7180-trogdor-homestar.dtsi
arch/arm64/boot/dts/qcom/sc7180-trogdor-kingoftown.dtsi
arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor.dtsi
arch/arm64/boot/dts/qcom/sc7180-trogdor-mrbland.dtsi
arch/arm64/boot/dts/qcom/sc7180-trogdor-pazquel.dtsi
arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom.dtsi
arch/arm64/boot/dts/qcom/sc7180-trogdor-quackingstick.dtsi
arch/arm64/boot/dts/qcom/sc7180-trogdor-r1.dts
arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler.dtsi
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi

index 8ac1f1e..7ee407f 100644 (file)
 };
 
 &cros_ec {
+       keyboard-controller {
+               compatible = "google,cros-ec-keyb-switches";
+       };
+
        cros_ec_proximity: proximity {
                compatible = "google,cros-ec-mkbp-proximity";
                label = "proximity-wifi";
index 9b3e3d1..5074014 100644 (file)
@@ -114,6 +114,12 @@ ap_ts_pen_1v8: &i2c4 {
        status = "okay";
 };
 
+&cros_ec {
+       keyboard-controller {
+               compatible = "google,cros-ec-keyb-switches";
+       };
+};
+
 &panel {
        compatible = "samsung,atna33xc20";
        enable-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
index a19406c..74f0e07 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 /* This file must be included after sc7180-trogdor.dtsi */
-
+#include <arm/cros-ec-keyboard.dtsi>
 #include "sc7180-trogdor-lte-sku.dtsi"
 
 &alc5682 {
index fe2369c..5fc6873 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include "sc7180-trogdor.dtsi"
+#include <arm/cros-ec-keyboard.dtsi>
 
 &ap_sar_sensor {
        semtech,cs0-ground;
index 33d1d8a..97cba7f 100644 (file)
        status = "okay";
 };
 
+&cros_ec {
+       keyboard-controller {
+               compatible = "google,cros-ec-keyb-switches";
+       };
+};
+
 &dsi0 {
 
        panel: panel@0 {
index 2d13b94..56d7877 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 /* This file must be included after sc7180-trogdor.dtsi */
+#include <arm/cros-ec-keyboard.dtsi>
 
 &ap_sar_sensor {
        compatible = "semtech,sx9324";
index 3df4920..a7582fb 100644 (file)
@@ -6,6 +6,8 @@
  */
 
 #include "sc7180-trogdor.dtsi"
+/* Must come after sc7180-trogdor.dtsi to modify cros_ec */
+#include <arm/cros-ec-keyboard.dtsi>
 #include "sc7180-trogdor-ti-sn65dsi86.dtsi"
 
 / {
index 574b78e..695b04f 100644 (file)
        status = "okay";
 };
 
+&cros_ec {
+       keyboard-controller {
+               compatible = "google,cros-ec-keyb-switches";
+       };
+};
+
 &dsi0 {
        panel: panel@0 {
                /* Compatible will be filled in per-board */
index 352827e..59a23d0 100644 (file)
@@ -8,6 +8,8 @@
 /dts-v1/;
 
 #include "sc7180-trogdor.dtsi"
+/* Must come after sc7180-trogdor.dtsi to modify cros_ec */
+#include <arm/cros-ec-keyboard.dtsi>
 #include "sc7180-trogdor-ti-sn65dsi86.dtsi"
 
 / {
index 701dd11..6312108 100644 (file)
        base_detection: cbas {
                compatible = "google,cros-cbas";
        };
+
+       keyboard-controller {
+               compatible = "google,cros-ec-keyb-switches";
+       };
 };
 
 &dsi0 {
index 7b5cf3e..acdafd5 100644 (file)
@@ -906,7 +906,6 @@ ap_spi_fp: &spi10 {
        };
 };
 
-#include <arm/cros-ec-keyboard.dtsi>
 #include <arm/cros-ec-sbs.dtsi>
 
 &uart3 {