diff mbox series

documentation: dts documentation for touchscreen-buttons

Message ID 20201029180918.4f0d8a256ce4fc2890def5ac@uvos.xyz
State New
Headers show
Series documentation: dts documentation for touchscreen-buttons | expand

Commit Message

Carl Philipp Klemm Oct. 29, 2020, 5:09 p.m. UTC
Dts documentation for touchscreen-buttons

Signed-off-by: Carl Philipp Klemm <carl@uvos.xyz>

---
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/input/misc/touchscreen-buttons.txt b/Documentation/devicetree/bindings/input/misc/touchscreen-buttons.txt
new file mode 100644
index 000000000000..5ca2fdb73ebc
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/misc/touchscreen-buttons.txt
@@ -0,0 +1,50 @@ 
+Phyiscal buttons on touchscreen surfaces
+
+This module provides a driver for buttons with phyiscal labels on touchscreen surfaces.
+
+Required properties:
+- compatible: should be one of the following
+   - "touchscreen-buttons"
+- touchscreen_phandle: a handle to the touschreen device where the buttons are located
+- an arbitrary number of child_nodes containing:
+   - x-position: position of the button on the x-axis in touchscreen coordinates
+   - y-position: position of the button on the y-axis in touchscreen coordinates
+   - x-size: size of the button in x-axis direction in touchscreen coordinates
+   - y-size: size of the button in y-axis direction in touchscreen coordinates
+   - keycode: the keycode to be activated when the button is pressed
+
+
+Example:
+
+mapphone_touchscreen {
+		compatible = "touchscreen-buttons";
+		touchscreen_phandle = <&touchscreen>;
+		menu {
+			x-position = <0>;
+			y-position = <959>;
+			x-size = <256>;
+			y-size = <65>;
+			keycode = <KEY_F9>;
+		};
+		home {
+			x-position = <256>;
+			y-position = <959>;
+			x-size = <256>;
+			y-size = <65>;
+			keycode = <KEY_F10>;
+		};
+		back {
+			x-position = <512>;
+			y-position = <959>;
+			x-size = <256>;
+			y-size = <65>;
+			keycode = <KEY_F11>;
+		};
+		search {
+			x-position = <768>;
+			y-position = <959>;
+			x-size = <256>;
+			y-size = <65>;
+			keycode = <KEY_SEARCH>;
+		};
+};