linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/1] dt-bindings: input: convert tca8418_keypad.txt to yaml format
@ 2025-09-16 17:13 Frank Li
  2025-09-17 15:51 ` Rob Herring
  2025-09-18  5:09 ` Dmitry Torokhov
  0 siblings, 2 replies; 3+ messages in thread
From: Frank Li @ 2025-09-16 17:13 UTC (permalink / raw)
  To: Dmitry Torokhov, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	open list:INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN)...,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list
  Cc: imx

Convert tca8418_keypad.txt to yaml format.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
change in v2
- add TCA8418 to title
---
 .../bindings/input/tca8418_keypad.txt         | 10 ---
 .../devicetree/bindings/input/ti,tca8418.yaml | 61 +++++++++++++++++++
 2 files changed, 61 insertions(+), 10 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/input/tca8418_keypad.txt
 create mode 100644 Documentation/devicetree/bindings/input/ti,tca8418.yaml

diff --git a/Documentation/devicetree/bindings/input/tca8418_keypad.txt b/Documentation/devicetree/bindings/input/tca8418_keypad.txt
deleted file mode 100644
index 2551850091678..0000000000000
--- a/Documentation/devicetree/bindings/input/tca8418_keypad.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-This binding is based on the matrix-keymap binding with the following
-changes:
-
-keypad,num-rows and keypad,num-columns are required.
-
-Required properties:
-- compatible: "ti,tca8418"
-- reg: the I2C address
-- interrupts: IRQ line number, should trigger on falling edge
-- linux,keymap: Keys definitions, see keypad-matrix.
diff --git a/Documentation/devicetree/bindings/input/ti,tca8418.yaml b/Documentation/devicetree/bindings/input/ti,tca8418.yaml
new file mode 100644
index 0000000000000..624a1830d0b0d
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/ti,tca8418.yaml
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/ti,tca8418.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI TCA8418 I2C/SMBus keypad scanner
+
+maintainers:
+  - Frank Li <Frank.Li@nxp.com>
+
+properties:
+  compatible:
+    enum:
+      - ti,tca8418
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+
+allOf:
+  - $ref: matrix-keymap.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/input/input.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+
+    i2c {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        keypad@34 {
+            compatible = "ti,tca8418";
+            reg = <0x34>;
+            interrupt-parent = <&gpio5>;
+            interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
+            keypad,num-rows = <4>;
+            keypad,num-columns = <4>;
+            linux,keymap = < MATRIX_KEY(0x00, 0x01, BTN_0)
+                             MATRIX_KEY(0x00, 0x00, BTN_1)
+                             MATRIX_KEY(0x01, 0x01, BTN_2)
+                             MATRIX_KEY(0x01, 0x00, BTN_3)
+                             MATRIX_KEY(0x02, 0x00, BTN_4)
+                             MATRIX_KEY(0x00, 0x03, BTN_5)
+                             MATRIX_KEY(0x00, 0x02, BTN_6)
+                             MATRIX_KEY(0x01, 0x03, BTN_7)
+                             MATRIX_KEY(0x01, 0x02, BTN_8)
+                             MATRIX_KEY(0x02, 0x02, BTN_9)
+            >;
+        };
+    };
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 1/1] dt-bindings: input: convert tca8418_keypad.txt to yaml format
  2025-09-16 17:13 [PATCH v2 1/1] dt-bindings: input: convert tca8418_keypad.txt to yaml format Frank Li
@ 2025-09-17 15:51 ` Rob Herring
  2025-09-18  5:09 ` Dmitry Torokhov
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2025-09-17 15:51 UTC (permalink / raw)
  To: Frank Li
  Cc: Dmitry Torokhov, Krzysztof Kozlowski, Conor Dooley,
	open list:INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN)...,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, imx

On Tue, Sep 16, 2025 at 12:13 PM Frank Li <Frank.Li@nxp.com> wrote:
>
> Convert tca8418_keypad.txt to yaml format.
>
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> change in v2
> - add TCA8418 to title
> ---
>  .../bindings/input/tca8418_keypad.txt         | 10 ---
>  .../devicetree/bindings/input/ti,tca8418.yaml | 61 +++++++++++++++++++
>  2 files changed, 61 insertions(+), 10 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/input/tca8418_keypad.txt
>  create mode 100644 Documentation/devicetree/bindings/input/ti,tca8418.yaml

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 1/1] dt-bindings: input: convert tca8418_keypad.txt to yaml format
  2025-09-16 17:13 [PATCH v2 1/1] dt-bindings: input: convert tca8418_keypad.txt to yaml format Frank Li
  2025-09-17 15:51 ` Rob Herring
@ 2025-09-18  5:09 ` Dmitry Torokhov
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2025-09-18  5:09 UTC (permalink / raw)
  To: Frank Li
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	open list:INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN)...,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	open list, imx

On Tue, Sep 16, 2025 at 01:13:26PM -0400, Frank Li wrote:
> Convert tca8418_keypad.txt to yaml format.
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>

Applied, thank you.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-18  5:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-16 17:13 [PATCH v2 1/1] dt-bindings: input: convert tca8418_keypad.txt to yaml format Frank Li
2025-09-17 15:51 ` Rob Herring
2025-09-18  5:09 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).