Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4826745rwb; Tue, 8 Aug 2023 14:45:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG5DMyZwvWXpQrQo8g1VJ7EnOn6gFAS+B/4+PV7Uzy/6LuWLnXi4cNkRyBg5a4ZtgS1RqZ9 X-Received: by 2002:a17:902:d2c2:b0:1b5:219a:cbbd with SMTP id n2-20020a170902d2c200b001b5219acbbdmr1086832plc.3.1691531137702; Tue, 08 Aug 2023 14:45:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691531137; cv=none; d=google.com; s=arc-20160816; b=KryXAX6cgNg6v0kNV2JkFcE4uyx2WCtdjk9nDk8Di5qVUJjBC9acY40dtJk7DktWu+ Auc3wxPRWpw0OG+ilhnlFlDNainno1LmabncMp61SHNiXkD71zsx3L3pjD+WoTAzifMD 9fUudX94CK3yeN4bioC5o2Pri3xBmADi8vglAlJyrWWcc09tn8uFcxu03GjqulVvr1Qj 9S49EtWOkL6VYryP4kqNpb79BxcZXh86bQ2+jufs7EtMb1qUDx7DEdAvh4MPF4sjoAIo qRaJvMt94nYaypVNt848VUeofsIRr4b3ech32cVXttQaJmg2hw8P4TbKnhge85jj7qKf 30hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=i3zTmIvIB0R3e+WmnTqH0LedhzMB2RxrUfyyPyBZvV4=; fh=8PxhZktp8TAonzLXus55LuV9f6ZjVcXJOgrCFKSnvz8=; b=ZwAHYxjowOZUGC8oJ70+RiIdqYoutI27DGcTNyAYmsxrWdZhB9TODYsjfwNVRuhEvA p4Gri3eenBEQfqw6YXMc/j7hS1DUsuWiO1I7g0j1tcRXscTQnejKLiID6muqHXJzsx+2 97y8dGKNbMtx5bC/nZV6AEd2duEYoWLvDIw22Hh5OqhQNfh3A9129BGIWLT87F5fk+on UrACKD2Mp8r951uOP033u2rz2Mij82g9hC8UvaeFRM+7WJ1ntw/ebGvLb45gfYmdeV7Y V5Ph+QYYI1JMjofZyRJQijnRCZFCW29SC5u8UaUobmL/eehlanPtRghSEi6IExMsXtF8 jXqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e5-20020a17090301c500b001b89b77ce99si8125664plh.458.2023.08.08.14.45.25; Tue, 08 Aug 2023 14:45:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235793AbjHHUgQ (ORCPT + 99 others); Tue, 8 Aug 2023 16:36:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233824AbjHHUfq (ORCPT ); Tue, 8 Aug 2023 16:35:46 -0400 Received: from SHSQR01.spreadtrum.com (unknown [222.66.158.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5C4E270D for ; Tue, 8 Aug 2023 10:06:25 -0700 (PDT) Received: from SHSQR01.spreadtrum.com (localhost [127.0.0.2] (may be forged)) by SHSQR01.spreadtrum.com with ESMTP id 3787NRFW028631 for ; Tue, 8 Aug 2023 15:23:27 +0800 (+08) (envelope-from Wenhua.Lin@unisoc.com) Received: from dlp.unisoc.com ([10.29.3.86]) by SHSQR01.spreadtrum.com with ESMTP id 3787MuLc026831; Tue, 8 Aug 2023 15:22:56 +0800 (+08) (envelope-from Wenhua.Lin@unisoc.com) Received: from SHDLP.spreadtrum.com (shmbx06.spreadtrum.com [10.0.1.11]) by dlp.unisoc.com (SkyGuard) with ESMTPS id 4RKl3L3dTlz2NsJlw; Tue, 8 Aug 2023 15:21:02 +0800 (CST) Received: from xm9614pcu.spreadtrum.com (10.13.2.29) by shmbx06.spreadtrum.com (10.0.1.11) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Tue, 8 Aug 2023 15:22:54 +0800 From: Wenhua Lin To: Dmitry Torokhov , Jonathan Cameron , Andy Shevchenko , =?UTF-8?q?Nuno=20S=C3=A1?= , Arnd Bergmann , Samuel Holland , Robert Jarzmik , Mattijs Korpershoek , Bartosz Golaszewski , Orson Zhai , Baolin Wang , Chunyan Zhang CC: , , wenhua lin , Wenhua Lin , Xiongpeng Wu Subject: [PATCH 1/2] devicetree: bindings: Add keypad driver ducumentation Date: Tue, 8 Aug 2023 15:22:52 +0800 Message-ID: <20230808072252.3229-1-Wenhua.Lin@unisoc.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.13.2.29] X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To shmbx06.spreadtrum.com (10.0.1.11) X-MAIL: SHSQR01.spreadtrum.com 3787MuLc026831 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add keypad driver ducumentation. Signed-off-by: Wenhua Lin --- .../bindings/input/sprd-keypad.yaml | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/sprd-keypad.yaml diff --git a/Documentation/devicetree/bindings/input/sprd-keypad.yaml b/Documentation/devicetree/bindings/input/sprd-keypad.yaml new file mode 100644 index 000000000000..51710e1eb389 --- /dev/null +++ b/Documentation/devicetree/bindings/input/sprd-keypad.yaml @@ -0,0 +1,76 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright 2023 Unisoc Inc. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/sprd-keypad.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Device-Tree bindings for GPIO attached keys + +maintainers: + - Orson Zhai + - Baolin Wang + - Chunyan Zhang + +description: | + Keypad controller is used to interface a SoC with a matrix-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. + +properties: + compatible: + const: sprd,sc9860-keypad + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + keypad,num-rows: + description: Number of row lines connected to the keypad controller. + + keypad,num-columns: + description: Number of column lines connected to the keypad. + + debounce-interval: + description: + Debouncing interval time in milliseconds. If not specified defaults to 5. + $ref: /schemas/types.yaml#/definitions/uint32 + + default: 5 + + linux,keymap: + description: An array of packed 1-cell entries containing the equivalent + of row, column and linux key-code. The 32-bit big endian cell is packed. + +required: + - compatible + - reg + - keypad,num-rows + - keypad,num-columns + - linux,keymap + +unevaluatedProperties: false + + +examples: + - | + keypad@40250000 { + compatible = "sprd,sc9860-keypad"; + reg = <0x40250000 0x1000>; + interrupts = ; + clocks = <&aonapb_gate CLK_KPD_EB>, + <&aonapb_gate CLK_KPD_RTC_EB>; + clock-names = "enable", "rtc"; + keypad,num-rows= <3>; + keypad,num-columns = <3>; + debounce-interval = <5>; + linux,keymap = < 0x00000001 + 0x01000002 + 0x00020003>; + status = "okay"; + }; +... -- 2.17.1