From nobody Sat Oct 4 06:33:20 2025 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0376C30DD09; Tue, 19 Aug 2025 22:28:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755642533; cv=none; b=InomGPfB7E/Z+cMzB3IkSPuC2d06YkCw8VYjPR2X/CgLxogyP8Mxc6EBfKd0ncWQ+oJtpIjEzAMWU1ArhT2zOfCJLrggMXlP0P6TtDfPuoaI4TMXEVD6xeT0+cp+BnE9GyBJL0T7qgaxC1za7zvKPPvDqG+j3/3BlA/H6JlWnig= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755642533; c=relaxed/simple; bh=0+8XVoBAD/tPExRqsH1rlyeLVpU7k7+Wq25d9Q2DBX0=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=VHfljjUsENPUIBJkjxiWM7UI9aJg9++N6E4TF7arW7MC6nhWxeNnWVyXSWv8DxDg/jQ95gkb4NTkEJTl/pSyg09viN6RJu3acLUP8Jw9xZdKkgx3KRAvL2lAR+H6p7G/tWNqm4H+s1ZHVsyr1QyK9WJRvZkQ4IrCzVXJuYgFJ44= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=AqtGIAX8; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AqtGIAX8" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-45a1b066b5eso30537085e9.1; Tue, 19 Aug 2025 15:28:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755642530; x=1756247330; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=nxRrcohdrp6hc8dJuUXjhJQdfVF4Q8UIJXDooLC5mqs=; b=AqtGIAX8JnVng8Y4yvZxVhuM6ZWijpWoPDpZRtp3VfUCvjv/VL8zNj2wVcP0LGNHcX iwwazT63j8jtwCYs4BkLi59LEAEwt5ZRlpNxPnCV8oXl4vS568sdTXbiWQ5WXBpa67gS 2HjkJMCLfKLLzelu8uJb4Prl1yfCh+Yh2kTWzUWseCvdlq3Ou4df7cv06kBAD7+4mm// j8/WRaQd5KI9hr5y5Wr0E2VbUwAP2oHMbTFGS/f+hvgjwTQPrLi4pzQpMu8SnARFZ8ZX JKiBj1bC6hPHvP/5ETw3Sv1xFaCJyBKMh/bCT+X1IaoDz0Xh+weN65vGQ8JMhsIvduxQ /MYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755642530; x=1756247330; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nxRrcohdrp6hc8dJuUXjhJQdfVF4Q8UIJXDooLC5mqs=; b=amO0fD8cgLuuPhOvLGudor4pTMiV/uWNH/wV/ZurOigZRUKXrOiw6VCJy575mrytLQ hqba+Rtj1GEoFzE7oDPwdUmj8MpnEd1WzW8sYSTPTSIKOlK8mqSGebwJ/YK8j4JQZKFi 60i40JYJiA+3lv2y4Dl5TlNDVWImOuYq/5Lud7koKciwlGqeeTxqXLvJxYRuBjWXGjOv QvV7it1f2hE6W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xm8cQlV0WtiWfjw== X-Received: by 2002:a05:600c:524e:b0:45b:43cc:e557 with SMTP id 5b1f17b1804b1-45b47a1a101mr3752005e9.34.1755642530044; Tue, 19 Aug 2025 15:28:50 -0700 (PDT) Received: from localhost.localdomain ([2a0d:e487:216f:2f7a:74c6:177a:3b99:868c]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45b47c30dc1sm4394875e9.6.2025.08.19.15.28.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Aug 2025 15:28:48 -0700 (PDT) From: Jihed Chaibi To: dmitry.torokhov@gmail.com Cc: krzk+dt@kernel.org, robh@kernel.org, conor+dt@kernel.org, peter.ujfalusi@gmail.com, devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, shuah@kernel.org, jihed.chaibi.dev@gmail.com Subject: [PATCH v4] input: dt-bindings: ti,twl4030-keypad: convert to DT schema Date: Wed, 20 Aug 2025 00:28:23 +0200 Message-Id: <20250819222823.157943-1-jihed.chaibi.dev@gmail.com> X-Mailer: git-send-email 2.39.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Convert the legacy TXT binding for the TWL4030 keypad module to the modern YAML DT schema format. This adds formal validation and improves documentation by inheriting from the matrix-keymap schema. Signed-off-by: Jihed Chaibi Reviewed-by: Rob Herring (Arm) --- Changes in v4: - No changes. - This patch is split from larger series per maintainer feedback. - v3 link: https://lore.kernel.org/all/20250816021523.167049-1-jihed.chaibi.dev@gm= ail.com/ Changes in v3: - Made 'linux,keymap' a required property as suggested by the reviewer. Changes in v2: - Simplified the description field by removing redundant '|' as it does not affect formatting in this context. --- .../bindings/input/ti,twl4030-keypad.yaml | 59 +++++++++++++++++++ .../bindings/input/twl4030-keypad.txt | 27 --------- 2 files changed, 59 insertions(+), 27 deletions(-) create mode 100644 Documentation/devicetree/bindings/input/ti,twl4030-keyp= ad.yaml delete mode 100644 Documentation/devicetree/bindings/input/twl4030-keypad.= txt diff --git a/Documentation/devicetree/bindings/input/ti,twl4030-keypad.yaml= b/Documentation/devicetree/bindings/input/ti,twl4030-keypad.yaml new file mode 100644 index 000000000..c69aa7f5c --- /dev/null +++ b/Documentation/devicetree/bindings/input/ti,twl4030-keypad.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/ti,twl4030-keypad.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments TWL4030-family Keypad Controller + +maintainers: + - Peter Ujfalusi + +description: + TWL4030's Keypad controller is used to interface a SoC with a matrix-type + keypad device. The keypad controller supports multiple row and column li= nes. + A key can be placed at each intersection of a unique row and a unique co= lumn. + The keypad controller can sense a key-press and key-release and report t= he + event using a interrupt to the cpu. + +allOf: + - $ref: matrix-keymap.yaml# + +properties: + compatible: + const: ti,twl4030-keypad + + interrupts: + maxItems: 1 + +required: + - compatible + - interrupts + - keypad,num-rows + - keypad,num-columns + - linux,keymap + +unevaluatedProperties: false + +examples: + - | + #include + + keypad { + compatible =3D "ti,twl4030-keypad"; + interrupts =3D <1>; + keypad,num-rows =3D <8>; + keypad,num-columns =3D <8>; + linux,keymap =3D < + /* row 0 */ + MATRIX_KEY(0, 0, KEY_1) + MATRIX_KEY(0, 1, KEY_2) + MATRIX_KEY(0, 2, KEY_3) + + /* ...and so on for a full 8x8 matrix... */ + + /* row 7 */ + MATRIX_KEY(7, 6, KEY_Y) + MATRIX_KEY(7, 7, KEY_Z) + >; + }; diff --git a/Documentation/devicetree/bindings/input/twl4030-keypad.txt b/D= ocumentation/devicetree/bindings/input/twl4030-keypad.txt deleted file mode 100644 index e4be2f76a..000000000 --- a/Documentation/devicetree/bindings/input/twl4030-keypad.txt +++ /dev/null @@ -1,27 +0,0 @@ -* TWL4030's Keypad Controller device tree bindings - -TWL4030's Keypad controller is used to interface a SoC with a matrix-type -keypad device. The keypad controller supports multiple row and column line= s. -A key can be placed at each intersection of a unique row and a unique colu= mn. -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,twl4030-keypad": For controllers compatible with twl4030 keypad - controller. -- interrupt: should be one of the following - - <1>: For controllers compatible with twl4030 keypad controller. - -Example: - twl_keypad: keypad { - compatible =3D "ti,twl4030-keypad"; - interrupts =3D <1>; - keypad,num-rows =3D <8>; - keypad,num-columns =3D <8>; - }; --=20 2.39.5