Commit a10b760b authored by Stephen Boyd's avatar Stephen Boyd Committed by Bjorn Andersson
Browse files

arm64: dts: qcom: sc7180-trogdor: Split out keyboard node and describe detachables



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: default avatarStephen Boyd <swboyd@chromium.org>
Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220627212802.3593012-1-swboyd@chromium.org
parent b3996165
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -81,6 +81,10 @@ &camcc {
};

&cros_ec {
	keyboard-controller {
		compatible = "google,cros-ec-keyb-switches";
	};

	cros_ec_proximity: proximity {
		compatible = "google,cros-ec-mkbp-proximity";
		label = "proximity-wifi";
+6 −0
Original line number Diff line number Diff line
@@ -114,6 +114,12 @@ &camcc {
	status = "okay";
};

&cros_ec {
	keyboard-controller {
		compatible = "google,cros-ec-keyb-switches";
	};
};

&panel {
	compatible = "samsung,atna33xc20";
	enable-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
+1 −1
Original line number Diff line number Diff line
@@ -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 {
+1 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
 */

#include "sc7180-trogdor.dtsi"
#include <arm/cros-ec-keyboard.dtsi>

&ap_sar_sensor {
	semtech,cs0-ground;
+6 −0
Original line number Diff line number Diff line
@@ -58,6 +58,12 @@ &camcc {
	status = "okay";
};

&cros_ec {
	keyboard-controller {
		compatible = "google,cros-ec-keyb-switches";
	};
};

&dsi0 {

	panel: panel@0 {
Loading