From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C1ECBC3DA4A for ; Mon, 19 Aug 2024 15:50:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=CSLcyqFQ3EMWy37KrwIoFJyqnZnAuoV7z3EUYygVqD8=; b=gm5F0REcTdKmpPffccVQcehzCP wsGbkQFlApS/rqDQhufpOLL4t6Zc/Xgei1JzzSx1TEMS5zzjWJLHbM+geypw053jtEM2gSE5ckahV VkTjtrpXFvqg8SfahiRV6PGohBd96OQmxrFPvkZjAWuaqVd8XbzEY0Y2SD4sxea4ALM/SrQZetpyx raB8mAZQagnQx72qJjG+NFvPqyAL8Qm0UdrQA1MGCSnEGAPha9rmW2qAfD6SxkhbDbgqlcLIQwL5l Z1CiSw6iNKJUACAnxPfe7Vc8PSHFHoc3Be9YAc/f36a4PQCMOp/31+bx/taeMVyyLN2KmLu8V719q BWi2u1uQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sg4dq-000000020xh-2Xyr; Mon, 19 Aug 2024 15:49:58 +0000 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sg4d9-000000020jv-11eK for linux-arm-kernel@lists.infradead.org; Mon, 19 Aug 2024 15:49:16 +0000 Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-201d5af11a4so41407355ad.3 for ; Mon, 19 Aug 2024 08:49:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724082554; x=1724687354; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=CSLcyqFQ3EMWy37KrwIoFJyqnZnAuoV7z3EUYygVqD8=; b=HgD0XpLOUpjlwRluU0JeC8RlYF46tPUGNy++UTJKzACSxxp26PTR3ZN45pleRC9QxB PiwSsVrFp++Z52ESVnXoJA9KVcMQEP9sFA/zDFfyNG/n54rvyAkkKDTvWKeG0MHpIohq OwXTI+8DwuT6+Nbij6GEVN7G3RtQNDKlLUbImyZ34qjHlCVFaEBEfHPBr2p0XZUgI6Rt qk51wJD7QBHjMsXLFXE370CLbxkokio8oPCIURSbH0cM4oEBHF0Cw41XrkTVxvydZZLs qsvXE0TkeQZmQZK+ccSlF9gmlg5RnlzQFf1H+1jHtvjrmoJSs18Isv1EeliE8pR/3925 z4MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724082554; x=1724687354; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=CSLcyqFQ3EMWy37KrwIoFJyqnZnAuoV7z3EUYygVqD8=; b=lcfUR4DdH21P2R8gU5403RzhdcBRu0QrqAauoMy77pDvagTiKKSySGTK0FtUPEmCHq jLlNEh1PED7Gf/vIZuVANg5rnUU1Fkvp+m8Tz/tnAkt5npd6JNNpGp9POXkn8Fx1SKmf 7ZKd3S0OI8zxyTOyYUUjOAb8HUOwNBMMpdOGeJESWrIat4K2TYWtSQMt2AUllBA8HDx6 jK4pYOWfeNC810lqP62YuJpx/YRnVxjV5J5nTi5iobIofCcFb0l1hxuqsEDSIPUXwET4 xr0KJ4mEEHNgUOGdCQ1lJsapA0c+D8GjLT6YkrRbB4cgC4iNRFtS7x5jo1Hcuzug05V+ 6PJA== X-Forwarded-Encrypted: i=1; AJvYcCXB3VTDzLYznZ1Y4rlTZcMUyuZWmfBVIukyT8cq/lhQ0eOuNL5OefBrwuhr3HVfhXto7TicZqx1dheMBqtsv7iJQRFeFjypnvjFNBqa6MB0NBXynL4= X-Gm-Message-State: AOJu0Yxrab7wRsOqMpVdvzAZqe3vR6FPFU95bbUpMPOYzh9b2f8kAdpF vnZB4L38KyC71vjW3QuFO6acxzBvswKNkD2FEfn9eGTFO9AWZdoi X-Google-Smtp-Source: AGHT+IEU9Es4Ml341v7O0mbmgFiXC/PhOCgXS75ZkA/SB7UZuypVK5RcoYwAPwcMAnMi1qk6M4kD+w== X-Received: by 2002:a17:903:228a:b0:1fd:a942:1558 with SMTP id d9443c01a7336-20203f329a2mr180311055ad.40.1724082553437; Mon, 19 Aug 2024 08:49:13 -0700 (PDT) Received: from google.com ([2620:15c:9d:2:f80c:1483:bced:7f88]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-201f038b401sm63783585ad.213.2024.08.19.08.49.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2024 08:49:13 -0700 (PDT) Date: Mon, 19 Aug 2024 08:49:10 -0700 From: Dmitry Torokhov To: Krzysztof Kozlowski Cc: Arnd Bergmann , Mark Brown , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, patches@opensource.cirrus.com Subject: Re: [PATCH 09/14] dt-bindings: input: samsung,s3c6410-keypad: introduce compact binding Message-ID: References: <20240819045813.2154642-1-dmitry.torokhov@gmail.com> <20240819045813.2154642-10-dmitry.torokhov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240819_084915_310741_AFFDD3A5 X-CRM114-Status: GOOD ( 22.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Aug 19, 2024 at 03:02:07PM +0200, Krzysztof Kozlowski wrote: > On Sun, Aug 18, 2024 at 09:58:06PM -0700, Dmitry Torokhov wrote: > > The binding with a sub-node per each key is very verbose and is hard to > > use with static device properties. Allow standard matrix keymap binding > > in addition to the verbose one. > > > > Signed-off-by: Dmitry Torokhov > > --- > > .../input/samsung,s3c6410-keypad.yaml | 57 ++++++++++++++++++- > > 1 file changed, 54 insertions(+), 3 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/input/samsung,s3c6410-keypad.yaml b/Documentation/devicetree/bindings/input/samsung,s3c6410-keypad.yaml > > index a53569aa0ee7..28a318a0ff7e 100644 > > --- a/Documentation/devicetree/bindings/input/samsung,s3c6410-keypad.yaml > > +++ b/Documentation/devicetree/bindings/input/samsung,s3c6410-keypad.yaml > > @@ -16,6 +16,10 @@ description: > > maintainers: > > - Krzysztof Kozlowski > > > > +allOf: > > + - $ref: input.yaml# > > + - $ref: matrix-keymap.yaml# > > + > > properties: > > compatible: > > enum: > > @@ -37,6 +41,10 @@ properties: > > > > wakeup-source: true > > > > + keypad,num-columns: true > > + keypad,num-rows: true > > + linux,keymap: true > > + > > linux,input-no-autorepeat: > > type: boolean > > description: > > @@ -81,12 +89,33 @@ patternProperties: > > - keypad,row > > - linux,code > > > > +dependencies: > > + linux,keymap: > > + required: > > Why "required" keyword? The dependencies should have just list of > properties. See example-schema. OK, changed this to dependencies: linux,keymap: [ "keypad,num-columns", "keypad,num-rows" ] > > > + - keypad,num-columns > > + - keypad,num-rows > > + > > required: > > - compatible > > - reg > > - interrupts > > - - samsung,keypad-num-columns > > - - samsung,keypad-num-rows > > + > > +if: > > put allOf: here and this within allOf, so you the "if" could grow in the > future. Hmm, there is already "allOf" at the beginning of the file, so adding another one results in complaints about duplicate "allOf". I can move it all to the top, like this: allOf: - $ref: input.yaml# - $ref: matrix-keymap.yaml# - if: required: - linux,keymap then: properties: samsung,keypad-num-columns: false samsung,keypad-num-rows: false patternProperties: '^key-[0-9a-z]+$': false else: properties: keypad,num-columns: false keypad,num-rows: false required: - samsung,keypad-num-columns - samsung,keypad-num-rows Is this OK? I don't quite like that "tweaks" are listed before main body of properties. Thanks. -- Dmitry