From patchwork Wed Jan 8 13:45:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Burri X-Patchwork-Id: 13930924 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2077.outbound.protection.outlook.com [40.107.22.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 605731F9F4F; Wed, 8 Jan 2025 13:45:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.77 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736343956; cv=fail; b=kVJi7ON4ZYPClYRXXsCSfFxL+eEg7MgUPQWiqsSXncd2Vz6rrZLMoyrSYuX/iDTAVOv/KzYiRIr338hv0w/xQSmUj56bT0T35hUr2L774iHe8U441pYpPPMbbYpHV2t8QDicPU7mFpPb2ieW6Zw4cKSSNUopSxps4sCV81alga4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736343956; c=relaxed/simple; bh=v8k8ugvjybQT9dxu2k0Uyuxpx5+LWRXd0lMgHhFUN9I=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=tKbqzn2JrbxlUMtcoLEk39tfNQoY58kfnJ6htBbAg62WniuzP/3/8PExksGYJdgPbm2IwVBAzLS9unSGE6R9UeL/tW73oz4Bw2GPUaFXD+W9vk5MfbG/mIC1JkYDRulpSG3ywgpgUWX1+GiLN0flBzU1DU45MIpz+XSxr0LsWG0= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mt.com; spf=pass smtp.mailfrom=mt.com; dkim=pass (2048-bit key) header.d=mt.com header.i=@mt.com header.b=PRKEM5+y; arc=fail smtp.client-ip=40.107.22.77 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mt.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mt.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mt.com header.i=@mt.com header.b="PRKEM5+y" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IzokMikDlBvg/QrooZK5YxWyQZxm5z13Fl953AyZiMBY4Ze4TRz/hF7XQI9oSIMsaSWAjjlKrqhQfwOJs9bk638j4pFONYxqZvmCAVMXmarG6FPyXMayVgF5bj42ohcCoSIEZ4vHbttjf4pYmtq7iwevNbKWbfppPFJMFLroi/MKXGpOgCFz5jYaZvXqVuZGo5Y7dR5cFV08lHMiXEt0pGM/yExnyAVs1Luos6VGrwFLvzPb1BD1yNmQYLLZIcfVOk1T8SgsfJt86rKIFVqqaeEZiZ30H2hsbTDiIbopFtYm0JGWEJJEwegR2C6KKX5t3KCH4ph5IkauH5R9RADxyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vd3cgXOZNocABuSffotEqyOPH5w04TTyG8W7gsEZz0c=; b=U1Wqb+gJuUMHZDKUX6tXkMogN23AYEboSAcfzSpm/BkOqh27WmtarHm7QOCJUEd2bLDoDqGArG0FLkgpAgNbD8BxqcYKW8ZbwSGXAV/t4mwGFy2Rda7VS+rCWad7WLlLhhhKnzdiudFVLhCQx7i51RszgqfUrHijuc1mZZQJfPv7D6l1E6qInWTPLMaCb8lXvLwOi/7zJ1v1KioZI4qBtp9PQxsSobdEb04TWE0Y+v5xL/NIlAnOkrp131HcJ7ZVoh5oplv9dmzwO0Mk8GTgFOJl1V6Nk3zTtphUnzx1Jj/ZbvC5xO1SHeu1tPRBcm5P5OTEZFLobiZ9Iwdt2txcdA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mt.com; dmarc=pass action=none header.from=mt.com; dkim=pass header.d=mt.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mt.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vd3cgXOZNocABuSffotEqyOPH5w04TTyG8W7gsEZz0c=; b=PRKEM5+yo1UOM2DSoKRUnUv6qT7tMMoYMJUdcn1uTgRTRMuN0oMqCMUqOYadGajjD5lRMMnFTm8+8n7Qd5c2jGHDMb53gBlqH38MLeyhAAuBuozX+IsGYfd921eapZ2Ug1wAm0Nc03feiFAzrECuERLzj7oSqWToAgvQnmcZQUVjbkXRkZk6/iocGoOV4yQKSlxNPsvco9DaQ11SZwHN0sHpOHHOFZAco6DRp0XBuHigEymjvC/7Jtom2I512Gq110xdpQuywtpuTC0cGQ+W3imH/NFexzmbN+UMRpXJqQRRo/66OKCLr4jtcnSvJqznsQfR/hNlpFZ2N+nzhJiw4A== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=mt.com; Received: from DBBPR03MB5399.eurprd03.prod.outlook.com (2603:10a6:10:f5::22) by AM0PR03MB6307.eurprd03.prod.outlook.com (2603:10a6:20b:15b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8335.11; Wed, 8 Jan 2025 13:45:51 +0000 Received: from DBBPR03MB5399.eurprd03.prod.outlook.com ([fe80::2fec:64f5:1893:f53a]) by DBBPR03MB5399.eurprd03.prod.outlook.com ([fe80::2fec:64f5:1893:f53a%3]) with mapi id 15.20.8314.018; Wed, 8 Jan 2025 13:45:51 +0000 From: Markus Burri To: linux-kernel@vger.kernel.org Cc: Markus Burri , Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Marek Vasut , linux-input@vger.kernel.org, devicetree@vger.kernel.org, Manuel Traut Subject: [PATCH v4 3/7] dt-bindings: input: matrix_keypad - convert to YAML Date: Wed, 8 Jan 2025 14:45:03 +0100 Message-Id: <20250108134507.257268-4-markus.burri@mt.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250108134507.257268-1-markus.burri@mt.com> References: <20250108134507.257268-1-markus.burri@mt.com> X-ClientProxiedBy: ZR2P278CA0067.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:52::14) To DBBPR03MB5399.eurprd03.prod.outlook.com (2603:10a6:10:f5::22) Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DBBPR03MB5399:EE_|AM0PR03MB6307:EE_ X-MS-Office365-Filtering-Correlation-Id: 60be4389-c45f-4f62-dacf-08dd2feac412 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|52116014|376014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: iK+mGLKXlEohHch1R/Zt2DaMUaCz9TS19YK1RAMBk2BeCfyXa+5je/+TEtU0ECVsr7JQYsyXz+GKVel/MfzIaIkaDtMjEn6VAJ6Smxf+XxYbPAuW7nKPlJygXxvxhu7jjRj6u0yEjrqxV1B1+avU3DEGUKZHF4CwiC7NTx13lTYhwdMLqz0D3MjvHTpuguT7dxEo2FAnytUcBTwomNp/Bhwimqp39cJuZy3am45fYxIg7d6btw8UsAnJbF5R0QQtE6Tqp1t1GjU+jmHX0zahyFfkQcWKwZqnEAC1JpWW0et4BXZ2ZmoKLdhPW/obAafBOBooEtIG7Zav7mivM4x3DDYE2Qo6HuuhS0CIrDy0NnE2RnGLE9hEbdXRP1cWCb9rL+58HZBn05BvaVVlqh+laEQUuHZqCwZ1prwfSkvcqavsBgL87rtbOuCtHGfoWyw42K/tW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ZmdMxcFdC6WVDE0UOxc/jhVI1xza0J+q8T+oZED/JDxU+cCCvvE1JMTmjHUYqmJygLJgJyQZ8iBVrsEM6lgN4Iudr7GwfZEYDAz5HOO8Xrjy09tUf3A9TL/dewTa8gka7Uz9aMk8hUnIeMI0r3TP6xuA3Q0V0nf8WsMB7FifMduYjcHVJwycdGoIrJltSnbfgubUo/p0kSoUPX/AN4cKCR+rvgidbWz1PhJ9G8c9Lp6IBGPu6muD6pzE31NB33G82Fk0sJOJKPw+rJWP/N8Q59qbkTe7op0DWwCyz8+0Td6OJPt64POICWuZ/e2objVIpPoAMDatZkNa7f+mUb92DotPfiOG4J1mW5fLgDDA4M+TfHglL8BrLWopSH/ILZ14H5L35ADxU+uIWMavUivKOdo3ZYktXhi2n3hQvFNJTl/cNB+YxYqnyjtz5tW4aPELSHhxtPbd4ju4zvmCfmXEgo+wChsSBproVko7QxzoerQ8ty+VpnE+XYkm+aZYHKAj8qn9MzO7UI4M8aC/SOkO1iRdFaDGZ4fIzIpIxU9E/C1OUqYESQYComgxarGy43RcEr872kYD6wMo2n7nqBgzMWT7plHrWEYnrIu4JVqYuBKWGni6E0b4ik0ll9i52Q61xJrFrgc+2paGstHeUY8i/WfW7KUcmg== X-OriginatorOrg: mt.com X-MS-Exchange-CrossTenant-Network-Message-Id: 60be4389-c45f-4f62-dacf-08dd2feac412 X-MS-Exchange-CrossTenant-AuthSource: DBBPR03MB5399.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jan 2025 13:45:51.5933 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fb4c0aee-6cd2-482f-a1a5-717e7c02496b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8GwHdvoJ1Tiv4s21jVHPu0JCaj/q3rjXoLgBMqT+mXG6oLKemLh7ZptfLFCDNgQTu339V27skWQ+qwEslxLi8g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR03MB6307 Convert the gpio-matrix-keypad bindings from text to DT schema. Signed-off-by: Markus Burri --- .../bindings/input/gpio-matrix-keypad.txt | 49 ----------- .../bindings/input/gpio-matrix-keypad.yaml | 88 +++++++++++++++++++ .../bindings/power/wakeup-source.txt | 2 +- 3 files changed, 89 insertions(+), 50 deletions(-) delete mode 100644 Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt create mode 100644 Documentation/devicetree/bindings/input/gpio-matrix-keypad.yaml diff --git a/Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt b/Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt deleted file mode 100644 index 570dc10..0000000 --- a/Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt +++ /dev/null @@ -1,49 +0,0 @@ -* GPIO driven matrix keypad device tree bindings - -GPIO driven matrix keypad is used to interface a SoC with a matrix keypad. -The matrix keypad supports multiple row and column lines, a key can be -placed at each intersection of a unique row and a unique column. The matrix -keypad can sense a key-press and key-release by means of GPIO lines and -report the event using GPIO interrupts to the cpu. - -Required Properties: -- compatible: Should be "gpio-matrix-keypad" -- row-gpios: List of gpios used as row lines. The gpio specifier - for this property depends on the gpio controller to - which these row lines are connected. -- col-gpios: List of gpios used as column lines. The gpio specifier - for this property depends on the gpio controller to - which these column lines are connected. -- linux,keymap: The definition can be found at - bindings/input/matrix-keymap.txt - -Optional Properties: -- linux,no-autorepeat: do no enable autorepeat feature. -- wakeup-source: use any event on keypad as wakeup event. - (Legacy property supported: "linux,wakeup") -- debounce-delay-ms: debounce interval in milliseconds -- col-scan-delay-us: delay, measured in microseconds, that is needed - before we can scan keypad after activating column gpio -- drive-inactive-cols: drive inactive columns during scan, - default is to turn inactive columns into inputs. - -Example: - matrix-keypad { - compatible = "gpio-matrix-keypad"; - debounce-delay-ms = <5>; - col-scan-delay-us = <2>; - - row-gpios = <&gpio2 25 0 - &gpio2 26 0 - &gpio2 27 0>; - - col-gpios = <&gpio2 21 0 - &gpio2 22 0>; - - linux,keymap = <0x0000008B - 0x0100009E - 0x02000069 - 0x0001006A - 0x0101001C - 0x0201006C>; - }; diff --git a/Documentation/devicetree/bindings/input/gpio-matrix-keypad.yaml b/Documentation/devicetree/bindings/input/gpio-matrix-keypad.yaml new file mode 100644 index 0000000..0f348b9 --- /dev/null +++ b/Documentation/devicetree/bindings/input/gpio-matrix-keypad.yaml @@ -0,0 +1,88 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- + +$id: http://devicetree.org/schemas/input/gpio-matrix-keypad.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: GPIO matrix keypad + +maintainers: + - Marek Vasut + +description: + GPIO driven matrix keypad is used to interface a SoC with a matrix keypad. + The matrix keypad supports multiple row and column lines, a key can be + placed at each intersection of a unique row and a unique column. The matrix + keypad can sense a key-press and key-release by means of GPIO lines and + report the event using GPIO interrupts to the cpu. + +allOf: + - $ref: /schemas/input/matrix-keymap.yaml# + +properties: + compatible: + const: gpio-matrix-keypad + + row-gpios: + description: + List of GPIOs used as row lines. The gpio specifier for this property + depends on the gpio controller to which these row lines are connected. + + col-gpios: + description: + List of GPIOs used as column lines. The gpio specifier for this property + depends on the gpio controller to which these column lines are connected. + + linux,keymap: true + + linux,no-autorepeat: + type: boolean + description: Do not enable autorepeat feature. + + + debounce-delay-ms: + description: Debounce interval in milliseconds. + default: 0 + + col-scan-delay-us: + description: + Delay, measured in microseconds, that is needed + before we can scan keypad after activating column gpio. + default: 0 + + drive-inactive-cols: + type: boolean + description: + Drive inactive columns during scan, + default is to turn inactive columns into inputs. + +required: + - compatible + - row-gpios + - col-gpios + - linux,keymap + +additionalProperties: false + +examples: + - | + matrix-keypad { + compatible = "gpio-matrix-keypad"; + debounce-delay-ms = <5>; + col-scan-delay-us = <2>; + + row-gpios = <&gpio2 25 0 + &gpio2 26 0 + &gpio2 27 0>; + + col-gpios = <&gpio2 21 0 + &gpio2 22 0>; + + linux,keymap = <0x0000008B + 0x0100009E + 0x02000069 + 0x0001006A + 0x0101001C + 0x0201006C>; + }; diff --git a/Documentation/devicetree/bindings/power/wakeup-source.txt b/Documentation/devicetree/bindings/power/wakeup-source.txt index 27f1797..66bb016 100644 --- a/Documentation/devicetree/bindings/power/wakeup-source.txt +++ b/Documentation/devicetree/bindings/power/wakeup-source.txt @@ -23,7 +23,7 @@ List of legacy properties and respective binding document 1. "gpio-key,wakeup" Documentation/devicetree/bindings/input/gpio-keys{,-polled}.txt 2. "has-tpo" Documentation/devicetree/bindings/rtc/rtc-opal.txt -3. "linux,wakeup" Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt +3. "linux,wakeup" Documentation/devicetree/bindings/input/gpio-matrix-keypad.yaml Documentation/devicetree/bindings/mfd/tc3589x.txt Documentation/devicetree/bindings/input/touchscreen/ti,ads7843.yaml 4. "linux,keypad-wakeup" Documentation/devicetree/bindings/input/qcom,pm8921-keypad.yaml