# \[PATCH\] documentation: dts documentation for touchscreen-buttons

- From: Carl Philipp Klemm \<hidden\>
- Date: 2020-10-29 17:24:56 
- List: linux-input
- Page: https://ratatoskr.run/linux-input/2020/10/8932107
- Thread: https://ratatoskr.run/linux-omap/2020/10/8932107/t.md

```text
Dts documentation for touchscreen-buttons

Signed-off-by: Carl Philipp Klemm <redacted>

---

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>;
+		};
+};


-- 
Carl Philipp Klemm <philipp@uvos.xyz> <carl@uvos.xyz>
```
