Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1183682ybk; Thu, 14 May 2020 02:34:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgFgbI6qY+JGaptSLdh27ITw5urxEQTJ58lnZY6Jl6I/2VkAbr5Z7ZrtSnP3XfIo8tz8tz X-Received: by 2002:a17:906:3791:: with SMTP id n17mr1710504ejc.249.1589448870814; Thu, 14 May 2020 02:34:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589448870; cv=none; d=google.com; s=arc-20160816; b=Pz6/b2SwkTQKk53KroK+nDj05Nb4do3S77tsdAtbfnDaa21/GZ2QKPG03bsFGYrMl7 w/sdkT105jvao2Vv7Cw4Z/kx4XFuonLWqZ+5dEy+E9rohK1AAUTJwz/O4oCguBAOZ0Or KvwlyZQLOF5J3wljmI7dzL4gtq4y9eyygca3QfkyEuCi1FM2clbwWAXcXrsmWu8isOSk iYfty4NX/lnYakmzHyJw/ErlKJi9XNHkobGcpFvOb63sC8jYeJppyjYR9zeUNdAM04b7 Gnx6spLrHdj2/4ZfqKfscgU+NRdbXoLtpW4vdBNHSb49/GEKmJX4rSVgAuNYTY5Q1m2z Etog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=xAzMF5eQFuR47edtFi5ivGIGqegoQjWNMUPiWFYFtyA=; b=zmM6UBkA8Lhtg0Yl8AMfCJj0+R3bjE9zgv80JWCMLk9UtoIwgarY2W40YvZGPM1glA n7TqUFSIn7GTkOamDWJg6gTzLM50O2srL5wDj3VuSOMKGhzoFr4lJflWkn84R3Q87pmH pvkMuvgM140lne9Vh9W+pIinqhXswBnvQAV2ev9DeinCTGv4zedlTgd4zTNR3ZRnT9mg bac4IK5TsCIaUAQ+k49juXLyquPC1zlzUVz7Lgu5+3vqvwS3/2HY/W/ASIGZxQM3GDj6 urNCgB+cXnswUEKlCkcYBjTMrOsavh9lLcnLHHpSNbbpOEpY+g/NTMgEwNBLxyHG+EDq qfuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r25si1406320edo.482.2020.05.14.02.34.07; Thu, 14 May 2020 02:34:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726161AbgENJb1 (ORCPT + 99 others); Thu, 14 May 2020 05:31:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725878AbgENJb0 (ORCPT ); Thu, 14 May 2020 05:31:26 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CDF1C061A0C for ; Thu, 14 May 2020 02:31:26 -0700 (PDT) Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jZACz-0001LV-Mi; Thu, 14 May 2020 11:31:17 +0200 Received: from mfe by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1jZACy-0005WE-PV; Thu, 14 May 2020 11:31:16 +0200 Date: Thu, 14 May 2020 11:31:16 +0200 From: Marco Felsch To: Fengping Yu Cc: Yingjoe Chen , Dmitry Torokhov , Andy Shevchenko , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 1/3] dt-bindings: Add keypad devicetree documentation Message-ID: <20200514093116.coiz5ofsjmxhafma@pengutronix.de> References: <20200514061747.25466-1-fengping.yu@mediatek.com> <20200514061747.25466-2-fengping.yu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200514061747.25466-2-fengping.yu@mediatek.com> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 11:26:01 up 181 days, 44 min, 197 users, load average: 0.03, 0.10, 0.14 User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 20-05-14 14:17, Fengping Yu wrote: > From: "fengping.yu" > > Add Mediatek matrix keypad dt-binding doc as yaml schema. > > Signed-off-by: fengping.yu > --- > .../devicetree/bindings/input/mtk-kpd.yaml | 102 ++++++++++++++++++ > 1 file changed, 102 insertions(+) > create mode 100644 Documentation/devicetree/bindings/input/mtk-kpd.yaml > > diff --git a/Documentation/devicetree/bindings/input/mtk-kpd.yaml b/Documentation/devicetree/bindings/input/mtk-kpd.yaml > new file mode 100644 > index 000000000000..8f594fe0bfc2 > --- /dev/null > +++ b/Documentation/devicetree/bindings/input/mtk-kpd.yaml > @@ -0,0 +1,102 @@ > +%YAML 1.2 > +--- > +version: 1 > + > +$id: http://devicetree.org/schemas/input/mtk-keypad.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Mediatek's Keypad Controller device tree bindings > + > +maintainer: > + - Fengping Yu > + > +description: | > + Mediatek'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. > + > +properties: > + compatible: > + constraint: | enum or const ? > + "mediatek,mt6779-keypad" > + "mediatek, kp" > + > + clock-names: > + description: Names of the clocks listed in clocks property in the same order > + > + clocks: > + description: Must contain one entry, for the module clock > + refs: devicetree/bindings/clocks/clock-bindings.txt for details. > + > + interrupts: > + description: A single interrupt specifier > + > + linux,keymap: > + description: The keymap for keys as described in the binding document > + refs: devicetree/bindings/input/matrix-keymap.txt > + > + pinctrl-0: > + description: Specify pin control groups used for this controller > + refs: devicetree/bindings/pinctrl/pinctrl-bindings.txt > + > + pinctrl-names: > + description: Names for optional pin modes > + > + reg: > + description: The base address of the Keypad register bank > + > + wakeup-source: > + description: use any event on keypad as wakeup event > + > + keypad,num-columns: > + description: Number of column lines connected to the keypad controller, > + it is not equal to PCB columns number, instead you should add required value > + for each IC > + > + keypad,num-rows: > + description: Number of row lines connected to the keypad controller, it is > + not equal to PCB rows number, instead you should add required value for each IC > + > + mediatek,debounce-us: > + description: Debounce interval in microseconds > + maximum: 256000 I think that you are missing the maxItems on all your properties so we can't make any validation. Also the indent looks wrong. > + > + > +required: > + - compatible > + - reg > + - interrupts > + - mediatek,debounce-us > + - keypad,num-rows > + - keypad,num-columns > + - linux,keymap > + - pinctrl > + - clocks > + - clock-names > + > +optional: > + - wakeup-source: I think the optional can be dropped. > +examples: > + - | > + > + keypad: kp@10010000 { > + compatible = "mediatek,kp"; > + reg = <0 0x10010000 0 0x1000>; > + wakeup-source; > + interrupts = ; > + clocks = <&clk26m>; > + clock-names = "kpd"; > + }; > + > + &keypad { > + mediatek,debounce-us = <32000>; > + keypad,num-rows = <8>; > + keypad,num-columns = <9>; > + linux,keymap = < MATRIX_KEY(0x00, 0x00, KEY_VOLUMEDOWN) >; > + status = "okay"; > + pinctrl-names = "default"; > + pinctrl-0 = <&kpd_gpios_def_cfg>; > + }; Pls squash those nodes. Regards, Marco > -- > 2.18.0