* [PATCH] dt-bindings: input: Convert TI Keypad Controller to DT schema
@ 2026-07-08 12:32 Eduard Bostina
2026-07-08 12:41 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Eduard Bostina @ 2026-07-08 12:32 UTC (permalink / raw)
To: Conor Dooley, devicetree, Dmitry Torokhov, Eduard Bostina,
Krzysztof Kozlowski, linux-input, linux-kernel, Rob Herring
Cc: daniel.baluta, simona.toaca, goledhruva, m-chawdhry
Convert the Texas Instruments Keypad Controller bindings
to DT schema.
During the conversion, the following updates were made:
- Corrected the documented property 'linux,keypad-no-autorepeat'
to 'linux,input-no-autorepeat'. The old text binding documented
the property incorrectly. The standard input subsystem property is
'linux,input-no-autorepeat', which is actively used in device
trees and parsed by the kernel.
- Added the 'reg-names' property ("mpu"), which was omitted from
the original text binding but is actively used in devide trees.
- Omitted 'keypad,num-rows' and 'keypad,num-columns' from the
required list. The original text binding stated these were
required but enforcing them causes validation failures.
Signed-off-by: Eduard Bostina <egbostina@gmail.com>
---
.../devicetree/bindings/input/omap-keypad.txt | 28 ---------
.../bindings/input/ti,omap4-keypad.yaml | 57 +++++++++++++++++++
2 files changed, 57 insertions(+), 28 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/input/omap-keypad.txt
create mode 100644 Documentation/devicetree/bindings/input/ti,omap4-keypad.yaml
diff --git a/Documentation/devicetree/bindings/input/omap-keypad.txt b/Documentation/devicetree/bindings/input/omap-keypad.txt
deleted file mode 100644
index 34ed1c60ff95..000000000000
--- a/Documentation/devicetree/bindings/input/omap-keypad.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-* TI's Keypad Controller device tree bindings
-
-TI's Keypad controller is used to interface a SoC with a matrix-type
-keypad device. The keypad controller supports multiple row and column lines.
-A key can be placed at each intersection of a unique row and a unique column.
-The keypad controller can sense a key-press and key-release and report the
-event using a interrupt to the cpu.
-
-This binding is based on the matrix-keymap binding with the following
-changes:
-
-keypad,num-rows and keypad,num-columns are required.
-
-Required SoC Specific Properties:
-- compatible: should be one of the following
- - "ti,omap4-keypad": For controllers compatible with omap4 keypad
- controller.
-
-Optional Properties specific to linux:
-- linux,keypad-no-autorepeat: do no enable autorepeat feature.
-
-Example:
- keypad@4ae1c000{
- compatible = "ti,omap4-keypad";
- keypad,num-rows = <2>;
- keypad,num-columns = <8>;
- linux,keypad-no-autorepeat;
- };
diff --git a/Documentation/devicetree/bindings/input/ti,omap4-keypad.yaml b/Documentation/devicetree/bindings/input/ti,omap4-keypad.yaml
new file mode 100644
index 000000000000..5647b4a24228
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/ti,omap4-keypad.yaml
@@ -0,0 +1,57 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/input/ti,omap4-keypad.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments Keypad Controller
+
+maintainers:
+ - Eduard Bostina <egbostina@gmail.com>
+
+description: |
+ TI's Keypad controller is used to interface a SoC with a matrix-type
+ keypad device. The keypad controller supports multiple row and column lines.
+ A key can be placed at each intersection of a unique row and a unique column.
+ The keypad controller can sense a key-press and key-release and report the
+ event using a interrupt to the cpu.
+
+allOf:
+ - $ref: /schemas/input/matrix-keymap.yaml#
+
+properties:
+ compatible:
+ const: ti,omap4-keypad
+
+ reg:
+ maxItems: 1
+
+ reg-names:
+ const: mpu
+
+ interrupts:
+ maxItems: 1
+
+ linux,input-no-autorepeat:
+ type: boolean
+ description: Do not enable autorepeat feature.
+
+required:
+ - compatible
+ - reg
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ keypad@4ae1c000 {
+ compatible = "ti,omap4-keypad";
+ reg = <0x4ae1c000 0x400>;
+ reg-names = "mpu";
+ interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
+ keypad,num-rows = <2>;
+ keypad,num-columns = <8>;
+ linux,input-no-autorepeat;
+ };
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] dt-bindings: input: Convert TI Keypad Controller to DT schema
2026-07-08 12:32 [PATCH] dt-bindings: input: Convert TI Keypad Controller to DT schema Eduard Bostina
@ 2026-07-08 12:41 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-07-08 12:41 UTC (permalink / raw)
To: Eduard Bostina; +Cc: dmitry.torokhov, conor+dt, linux-input, devicetree, robh
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Properties strictly required by the hardware and driver ('keypad,num-rows', 'keypad,num-columns', 'interrupts', and 'linux,keymap') are omitted from the 'required:' list, allowing non-functional device trees to silently pass validation.
--
--- Patch [1]: [PATCH] dt-bindings: input: Convert TI Keypad Controller to DT schema ---
commit 31e1662350e854e7b96beb7e7de83fc2b0d265e2
Author: Eduard Bostina <egbostina@gmail.com>
dt-bindings: input: Convert TI Keypad Controller to DT schema
This commit converts the Texas Instruments Keypad Controller bindings to DT
schema format. It updates the autorepeat property name, adds the reg-names
property, and omits the keypad row and column properties from the required
list to prevent validation failures.
> diff --git a/Documentation/devicetree/bindings/input/ti,omap4-keypad.yaml b/Documentation/devicetree/bindings/input/ti,omap4-keypad.yaml
> new file mode 100644
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/input/ti,omap4-keypad.yaml
[ ... ]
> +required:
> + - compatible
> + - reg
[Severity: Medium]
The commit message mentions that keypad,num-rows and keypad,num-columns were
omitted from this required list because enforcing them causes validation
failures. Should these properties, along with interrupts and linux,keymap,
be included here to accurately reflect the driver's probing requirements?
Omitting them allows non-functional device tree nodes to silently pass
schema validation. At runtime, the omap4-keypad driver will unconditionally
fail to probe via platform_get_irq(), matrix_keypad_parse_properties(), and
matrix_keypad_build_keymap() when these properties are missing.
Would it be better to enforce the strict hardware and driver requirements in
the schema, and instead fix the incomplete device tree nodes that are
failing validation?
> +
> +unevaluatedProperties: false
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260708123252.1768355-1-egbostina@gmail.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-08 12:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-08 12:32 [PATCH] dt-bindings: input: Convert TI Keypad Controller to DT schema Eduard Bostina
2026-07-08 12:41 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox