Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp514441lqp; Wed, 12 Jun 2024 08:13:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUl+CtbaaxZUuWe8/TbZ9gu3vtKqR9VwJXELkV+E3U/KJ/5x6I1/MniJegE0g7+AWVLtEhqcoROAP29jxrj7PNDbfGdA5OtRWSt1S55Vw== X-Google-Smtp-Source: AGHT+IEByUeFbvuht/6/sFMgoQ6Ws9txEO4oQdYTeZACEZQlwZEgHsijnctig5kvq4P/3ySuOIMj X-Received: by 2002:a05:6870:9a25:b0:23b:caff:be33 with SMTP id 586e51a60fabf-25514eb6a3emr2341581fac.49.1718205218585; Wed, 12 Jun 2024 08:13:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718205218; cv=pass; d=google.com; s=arc-20160816; b=tdcVBOXWci1HAvHqhUN4SrU1Pu1FaOTQXDM7gV42t/e+pjVBEqBlB/00XwGtXyzfdP N3vpy1qScXAvoAldkFSjdIs8P0PxZIHP1jNemji+ue/hL6uqsByeOcHKkH6QQ5gMDwO5 V5idK9BjTmR5ujuzBuBPVXHfzsDUQIVVIVc1bE5DP5E+QYi4eLt1mcX+3NR9gEEHU2Ts iVZL2V9hGJIhOF9tZ0TnGIBpJhJ0PUPUoYvwLfJYtUvRQhez7wPTHcTMjlxwUhOn7mu3 ptZQJtm6IGar3Bgl0ciDlkt+Z6WXnD2veVen06SNiyMwxeh/n6bSLGxBuOIDJ7bGyFeQ 7WUg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=+e6m33PRrkfeoKJB8tWne+G0mb2Nm9QwOT+TQzuvl+Q=; fh=ACil1jas7tj6OkavH2eIvwexMjtmAkb9Tgu0MnUWAGw=; b=gKNUsrAOKxNwB+4e5TmlrPRds/6wGF2+nMvGBPHT3yFS47+Obj8t0SpEBzE4Wj2orm rOedekZ07g2V88EHZ6VyFVXc+6Ww+GmhH0I7wn+iqbDm3dSaAZDT7mJUnFl9J8LVlT6W 0nPfSnFUtmHl18AyDe1TbHLQizaspZbm/WBvA8VOcfcAFSt4URQBAJvgO4LlhPRiUhEU sn4UX1JJTNGQPEx3zWnCilBnybAaxRPcJJjSyexUMrj+lJ3SwSntW5DjqTawYLRPpwyD CLpApN/qKiDNenNjknaggNAKB18EsK6s5G5/3dmiJ8tToNeWoE0f2JADXIrfrXBx4EQn NNkw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=UaMfkBp5; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-211756-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211756-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6e99ffec1basi7526525a12.224.2024.06.12.08.13.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 08:13:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211756-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=UaMfkBp5; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-211756-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211756-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id ADC3A282BE3 for ; Wed, 12 Jun 2024 15:11:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C74B1180A9C; Wed, 12 Jun 2024 15:07:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="UaMfkBp5" Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 DB81017F51D; Wed, 12 Jun 2024 15:07:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.249 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718204839; cv=none; b=Ck7YHyd4EKoCOSGnst8L48afOyNLppja63VhK6Om76+GjJc68Hf0ME7eTMR0Li7VWORzTGszBgYIvQY5eZeIuVJnQxis/14qXKSw/vy/GjvvL7dPqeG8y+LPHzznvC0oUuQ0E5nHJ16RSUlAx3Xm+9QYpCDgC/wm3VB0XSCrkd8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718204839; c=relaxed/simple; bh=zEWuCAoO2uNYvaqGht66j45VjIoDAy1oI5JMwk8VCn4=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=elQFA2f0R02vBGRSG/ctvZupumHMKUe+wmbJ6ieObO9DT9W1yMnAf6IzJrdjJK/RSJcn3MB3aMtLbDV7QhWytpTQMF6o3YUiRPxEXKnSCVUyCFqfRkDV23wHjTwsHCzFdLm3J0H8VgwyyTH/jREWzuXI6sKIXj8HbxWQzCshPAY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=UaMfkBp5; arc=none smtp.client-ip=198.47.23.249 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 45CF7CAt009684; Wed, 12 Jun 2024 10:07:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1718204832; bh=+e6m33PRrkfeoKJB8tWne+G0mb2Nm9QwOT+TQzuvl+Q=; h=From:To:CC:Subject:Date; b=UaMfkBp5pfqlADHSY9trtk6Xnv7nKcPeKglhgG8k6sIncMeRWFoONm+K0V5AOEteT EKbjq92SPOqLgvw/bMw5Vt4iziIvxxfMMddV2YH+G4THlmiLDeXHLKKjFAUGGBIInq xCpCGlZAcPCnefviisg/LOmfR04z1vjmKBhdvoZ4= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 45CF7CWT027678 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 12 Jun 2024 10:07:12 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 12 Jun 2024 10:07:12 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 12 Jun 2024 10:07:12 -0500 Received: from fllvsmtp8.itg.ti.com ([10.249.42.149]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 45CF7BDF095064; Wed, 12 Jun 2024 10:07:12 -0500 From: Andrew Davis To: Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: , , , Andrew Davis Subject: [PATCH] dt-bindings: input: ti,nspire-keypad: convert to YAML format Date: Wed, 12 Jun 2024 10:07:11 -0500 Message-ID: <20240612150711.26706-1-afd@ti.com> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Convert TI-NSPIRE Keypad controller bindings to DT schema. Signed-off-by: Andrew Davis --- .../bindings/input/ti,nspire-keypad.txt | 60 --------------- .../bindings/input/ti,nspire-keypad.yaml | 74 +++++++++++++++++++ 2 files changed, 74 insertions(+), 60 deletions(-) delete mode 100644 Documentation/devicetree/bindings/input/ti,nspire-keypad.txt create mode 100644 Documentation/devicetree/bindings/input/ti,nspire-keypad.yaml diff --git a/Documentation/devicetree/bindings/input/ti,nspire-keypad.txt b/Documentation/devicetree/bindings/input/ti,nspire-keypad.txt deleted file mode 100644 index 513d94d6e899e..0000000000000 --- a/Documentation/devicetree/bindings/input/ti,nspire-keypad.txt +++ /dev/null @@ -1,60 +0,0 @@ -TI-NSPIRE Keypad - -Required properties: -- compatible: Compatible property value should be "ti,nspire-keypad". - -- reg: Physical base address of the peripheral and length of memory mapped - region. - -- interrupts: The interrupt number for the peripheral. - -- scan-interval: How often to scan in us. Based on a APB speed of 33MHz, the - maximum and minimum delay time is ~2000us and ~500us respectively - -- row-delay: How long to wait before scanning each row. - -- clocks: The clock this peripheral is attached to. - -- linux,keymap: The keymap to use - (see Documentation/devicetree/bindings/input/matrix-keymap.txt) - -Optional properties: -- active-low: Specify that the keypad is active low (i.e. logical low signifies - a key press). - -Example: - -input { - compatible = "ti,nspire-keypad"; - reg = <0x900E0000 0x1000>; - interrupts = <16>; - - scan-interval = <1000>; - row-delay = <200>; - - clocks = <&apb_pclk>; - - linux,keymap = < - 0x0000001c 0x0001001c 0x00040039 - 0x0005002c 0x00060015 0x0007000b - 0x0008000f 0x0100002d 0x01010011 - 0x0102002f 0x01030004 0x01040016 - 0x01050014 0x0106001f 0x01070002 - 0x010a006a 0x02000013 0x02010010 - 0x02020019 0x02030007 0x02040018 - 0x02050031 0x02060032 0x02070005 - 0x02080028 0x0209006c 0x03000026 - 0x03010025 0x03020024 0x0303000a - 0x03040017 0x03050023 0x03060022 - 0x03070008 0x03080035 0x03090069 - 0x04000021 0x04010012 0x04020020 - 0x0404002e 0x04050030 0x0406001e - 0x0407000d 0x04080037 0x04090067 - 0x05010038 0x0502000c 0x0503001b - 0x05040034 0x0505001a 0x05060006 - 0x05080027 0x0509000e 0x050a006f - 0x0600002b 0x0602004e 0x06030068 - 0x06040003 0x0605006d 0x06060009 - 0x06070001 0x0609000f 0x0708002a - 0x0709001d 0x070a0033 >; -}; diff --git a/Documentation/devicetree/bindings/input/ti,nspire-keypad.yaml b/Documentation/devicetree/bindings/input/ti,nspire-keypad.yaml new file mode 100644 index 0000000000000..ed3cfff13addc --- /dev/null +++ b/Documentation/devicetree/bindings/input/ti,nspire-keypad.yaml @@ -0,0 +1,74 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/ti,nspire-keypad.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TI-NSPIRE Keypad + +maintainers: + - Andrew Davis + +allOf: + - $ref: input.yaml# + - $ref: matrix-keymap.yaml# + +properties: + compatible: + enum: + - ti,nspire-keypad + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + scan-interval: + $ref: /schemas/types.yaml#/definitions/uint32 + description: How often to scan in us. Based on a APB speed of 33MHz, the + maximum and minimum delay time is ~2000us and ~500us respectively + + row-delay: + $ref: /schemas/types.yaml#/definitions/uint32 + description: How long to wait between scanning each row in us. + + active-low: + description: Specify that the keypad is active low. + +required: + - compatible + - reg + - interrupts + - clocks + - scan-interval + - row-delay + - linux,keymap + +unevaluatedProperties: false + +examples: + - | + #include + keypad@900e0000 { + compatible = "ti,nspire-keypad"; + reg = <0x900e0000 0x1000>; + interrupts = <16>; + + clocks = <&apb_pclk>; + + scan-interval = <1000>; + row-delay = <200>; + + linux,keymap = < + MATRIX_KEY(0, 0, KEY_ENTER) + MATRIX_KEY(0, 1, KEY_ENTER) + MATRIX_KEY(0, 4, KEY_SPACE) + MATRIX_KEY(0, 5, KEY_Z) + MATRIX_KEY(0, 6, KEY_Y) + MATRIX_KEY(0, 7, KEY_0) + >; + }; -- 2.39.2