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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0375DC43334 for ; Thu, 21 Jul 2022 09:06:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232678AbiGUJGs (ORCPT ); Thu, 21 Jul 2022 05:06:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232768AbiGUJGr (ORCPT ); Thu, 21 Jul 2022 05:06:47 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F2833B944 for ; Thu, 21 Jul 2022 02:06:45 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id b21-20020a05600c4e1500b003a32bc8612fso454978wmq.3 for ; Thu, 21 Jul 2022 02:06:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=/H+ubGz5dC0Dz+m1egBSS+mn3sw5UpB8w1f81HptlFo=; b=D0wGWDqCWVf1ogvzp2scTFOcL/n/BMEgsTofv86DsSTkPtAJuQsI83k7g+ea2/xTwQ aI8aQ9xBbDoOqQ5HJIENAZCvvpuIuNc0skABIW5X+dF/ISz+o6oMNsblkkia9J5AZedK i1y3HXa+oWE2R64nyu9rYveTvuz0cb5odonsNSBEx+cwUiSPpkiGVPKv+peVdCd6QB3d OtgnnK4tBoOJsH602xwzjG1GygYAmo2MkVu23eWuqc5iZFp0sPMmFleasSQjSUwtBoAI yE+DInYb6Y7WwG1PbJk9v2V3UK6GMrfcKtTGnRUskE8dqSv80KIp37ZBuWUxeHQGh8H3 9VhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=/H+ubGz5dC0Dz+m1egBSS+mn3sw5UpB8w1f81HptlFo=; b=DqJKwH2vSTOkIQYdy882PzoPcf7sEEXPdDmIMkMFV7WlkdyNwAnD/aNUmUGDOwCd86 Tr1iYo/0rG3IJ7BprItPLyv8bklW2Qv1I/siU+INZGq0yLdZAvW5NqKwO5V/Rsqvtcab aQJj9BC6PyevSWZcOrUgsYC9Ksis/DsO/ZSqHa2kUA8cdUpflgO26+lgShnmjZPAVb3f 1r85TvDhexcjOeElVw5k3RokZNmDjD0xqCwuGzl6MM1uVPLcBg3NPdiBdOL8fiEjPy4U sSSUrL1YwVE/kPdBJWPe876FVXiaYnPsHh8F40++2AWs0n/PpF5kLD0ZOr28lycuDyND zswQ== X-Gm-Message-State: AJIora84AhFrti1rJP3ME8oyXJ8aOlSI8lqBz2+ORKSNU0i6KCovvDC2 YR3p0InlFVPLgzeW+a02ppUXYA== X-Google-Smtp-Source: AGRyM1tZz2TDn6be9lWTWQ2CDScl7zAd9M2KfMm9B3ELPlAoh19nphaaWcU/vY70sT+0kbd5D4xRGw== X-Received: by 2002:a05:600c:5006:b0:3a3:2dcd:8730 with SMTP id n6-20020a05600c500600b003a32dcd8730mr3710520wmr.99.1658394403779; Thu, 21 Jul 2022 02:06:43 -0700 (PDT) Received: from localhost ([82.66.159.240]) by smtp.gmail.com with ESMTPSA id q15-20020a5d658f000000b0021e48faed68sm1225231wru.97.2022.07.21.02.06.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jul 2022 02:06:43 -0700 (PDT) From: Mattijs Korpershoek To: Krzysztof Kozlowski , Rob Herring , Krzysztof Kozlowski , Dmitry Torokhov , Matthias Brugger Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Fabien Parent , devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Fabien Parent , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v1 2/6] dt-bindings: mediatek,mt6779-keypad: use unevaluatedProperties In-Reply-To: References: <20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com> <20220720-mt8183-keypad-v1-2-ef9fc29dbff4@baylibre.com> Date: Thu, 21 Jul 2022 11:06:42 +0200 Message-ID: <874jzaj0m5.fsf@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org On Wed, Jul 20, 2022 at 19:14, Krzysztof Kozlowski wrote: > On 20/07/2022 16:48, Mattijs Korpershoek wrote: >> writing-bindings.rst states: >>> - If schema includes other schema (e.g. /schemas/i2c/i2c-controller.yaml) use >>> "unevaluatedProperties:false". In other cases, usually use >>> "additionalProperties:false". >> >> mt6779-keypad includes matrix-keymap.yaml so replace additionalProperties:false >> by unevaluatedProperties:false. > > This is not sufficient explanation. You now allow all properties from > matrix-keymap.yaml, which might be desired or might be not (e.g. they > are not valid for this device). Please investigate it and mention the > outcome. Hi Krzysztof, Thank you for your prompt review. In mt6779_keypad_pdrv_probe(), we call * matrix_keypad_parse_properties() which requires keypad,num-rows and keypad,num-cols. * matrix_keypad_build_keymap() which uses linux,keymap Therefore, all properties from matrix-keymap.yaml are required by the mt6779-keypad driver. In v2, I will add the above justification and also add all 3 properties in the "required" list. Initially, I did not do this because from a dts/code perspective it seemed interesting to split out SoC specific keyboard node vs board specific key configuration: * [PATCH v1 5/6] arm64: dts: mediatek: mt8183: add keyboard node # SoC specific * [PATCH v1 6/6] arm64: dts: mediatek: mt8183-pumpkin: add keypad support # board specific What would be the recommend approach for above? I see at least 2: * "move the whole keyboard node into the board file (mt8183-pumpkin.dts)" even if it generates duplication between boards using the same SoC. * "add a "dummy keymap,row,cols" properties in the soc node which can be overriden in board file. For example, use rows and cols = 0 which would have the driver early exit. Thanks, Mattijs > > Best regards, > Krzysztof 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 BAEC4C433EF for ; Thu, 21 Jul 2022 09:08:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9IKZF5pI/Q9hJakef9oaiJc1mALcBxcNstu6J2coSJ0=; b=nwwQ5PM7jWuh82 5s3GRoFbrAnmFtjxmEk7WoYH4seBl29CT5WkIS+s1kji4WiX9pSoP4CKQBPBoz6pyUSgZ1QmeP6iq E7tXTZ8sPaalr4dUrzy0B8+kW2fvNU0fDobvfzzA2f6zJTnbjxAzkybzYPiiNW6TTRdDaE984pE28 fTaqMCTIwEb+O0r3amnDxMnzfJlfGxJg9TxdtogIc9GKAqsDRJVCaT24zkP5f3UwbrbnUzTiQF05i uxe1cs77S8D/1iXKcChQUC4m4UJ3PXggc/W8zKbF5YnsP8yFhuPS8BwnrcV3o2KpMPGlAxzRmKa/m e/bsE/O0l8yHRL6cEwOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oES8x-002zZ5-Ly; Thu, 21 Jul 2022 09:06:51 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oES8t-002zQH-Jr for linux-arm-kernel@lists.infradead.org; Thu, 21 Jul 2022 09:06:49 +0000 Received: by mail-wm1-x329.google.com with SMTP id w8-20020a05600c014800b003a32e89bc4eso452120wmm.5 for ; Thu, 21 Jul 2022 02:06:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=/H+ubGz5dC0Dz+m1egBSS+mn3sw5UpB8w1f81HptlFo=; b=D0wGWDqCWVf1ogvzp2scTFOcL/n/BMEgsTofv86DsSTkPtAJuQsI83k7g+ea2/xTwQ aI8aQ9xBbDoOqQ5HJIENAZCvvpuIuNc0skABIW5X+dF/ISz+o6oMNsblkkia9J5AZedK i1y3HXa+oWE2R64nyu9rYveTvuz0cb5odonsNSBEx+cwUiSPpkiGVPKv+peVdCd6QB3d OtgnnK4tBoOJsH602xwzjG1GygYAmo2MkVu23eWuqc5iZFp0sPMmFleasSQjSUwtBoAI yE+DInYb6Y7WwG1PbJk9v2V3UK6GMrfcKtTGnRUskE8dqSv80KIp37ZBuWUxeHQGh8H3 9VhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=/H+ubGz5dC0Dz+m1egBSS+mn3sw5UpB8w1f81HptlFo=; b=inR1US+/DgU3RWbdrJkYrU47O/VJaKqFOm3z4Dzfyfza7f0DZoMb9J52EXslGOZOgj zNRXg3utv8c4hOIQTudK1PPpT44Avf7bux1OKBYjbTbvI3NDmtrakfnTBAI/brBRYUMA uLsSWPZMk1TyymjtUjKdLo3YilfsLR2f/dSDu6OTKFIJZdI6w8KuuyYlYCBj0qY27DBA P4tKAtMtkosucYqRJAw0aKO66Ffgs9iIjkKC/eVVTpSi0sc18edIoCA7nVVIcOiDLop3 nuTSkw3nDCDQHTw8JjRcvO/7hD1+x1eEFF+ZHQYve9ZDsbD+nEnn2kpA8/SqI9YPlU/8 6BVw== X-Gm-Message-State: AJIora+bn2mJ3KxQkNTJa+mTveeBmNafwdPAtr/GN9uiU43bPlvmcnOx WFDzR1srabqbPIPcvn7sinbYxA== X-Google-Smtp-Source: AGRyM1tZz2TDn6be9lWTWQ2CDScl7zAd9M2KfMm9B3ELPlAoh19nphaaWcU/vY70sT+0kbd5D4xRGw== X-Received: by 2002:a05:600c:5006:b0:3a3:2dcd:8730 with SMTP id n6-20020a05600c500600b003a32dcd8730mr3710520wmr.99.1658394403779; Thu, 21 Jul 2022 02:06:43 -0700 (PDT) Received: from localhost ([82.66.159.240]) by smtp.gmail.com with ESMTPSA id q15-20020a5d658f000000b0021e48faed68sm1225231wru.97.2022.07.21.02.06.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jul 2022 02:06:43 -0700 (PDT) From: Mattijs Korpershoek To: Krzysztof Kozlowski , Rob Herring , Krzysztof Kozlowski , Dmitry Torokhov , Matthias Brugger Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Fabien Parent , devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Fabien Parent , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v1 2/6] dt-bindings: mediatek,mt6779-keypad: use unevaluatedProperties In-Reply-To: References: <20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com> <20220720-mt8183-keypad-v1-2-ef9fc29dbff4@baylibre.com> Date: Thu, 21 Jul 2022 11:06:42 +0200 Message-ID: <874jzaj0m5.fsf@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220721_020647_711356_465A3E1D X-CRM114-Status: GOOD ( 14.00 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jul 20, 2022 at 19:14, Krzysztof Kozlowski wrote: > On 20/07/2022 16:48, Mattijs Korpershoek wrote: >> writing-bindings.rst states: >>> - If schema includes other schema (e.g. /schemas/i2c/i2c-controller.yaml) use >>> "unevaluatedProperties:false". In other cases, usually use >>> "additionalProperties:false". >> >> mt6779-keypad includes matrix-keymap.yaml so replace additionalProperties:false >> by unevaluatedProperties:false. > > This is not sufficient explanation. You now allow all properties from > matrix-keymap.yaml, which might be desired or might be not (e.g. they > are not valid for this device). Please investigate it and mention the > outcome. Hi Krzysztof, Thank you for your prompt review. In mt6779_keypad_pdrv_probe(), we call * matrix_keypad_parse_properties() which requires keypad,num-rows and keypad,num-cols. * matrix_keypad_build_keymap() which uses linux,keymap Therefore, all properties from matrix-keymap.yaml are required by the mt6779-keypad driver. In v2, I will add the above justification and also add all 3 properties in the "required" list. Initially, I did not do this because from a dts/code perspective it seemed interesting to split out SoC specific keyboard node vs board specific key configuration: * [PATCH v1 5/6] arm64: dts: mediatek: mt8183: add keyboard node # SoC specific * [PATCH v1 6/6] arm64: dts: mediatek: mt8183-pumpkin: add keypad support # board specific What would be the recommend approach for above? I see at least 2: * "move the whole keyboard node into the board file (mt8183-pumpkin.dts)" even if it generates duplication between boards using the same SoC. * "add a "dummy keymap,row,cols" properties in the soc node which can be overriden in board file. For example, use rows and cols = 0 which would have the driver early exit. Thanks, Mattijs > > Best regards, > Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel