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 09E0AC433F5 for ; Tue, 3 May 2022 18:45:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234806AbiECStE (ORCPT ); Tue, 3 May 2022 14:49:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241640AbiECStA (ORCPT ); Tue, 3 May 2022 14:49:00 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AFF081FCF3 for ; Tue, 3 May 2022 11:45:26 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id ba17so803370edb.5 for ; Tue, 03 May 2022 11:45:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=G8p7yldKtTr1PNOn8wgGIMMVK/LhdITnIisacE3JNHw=; b=YGDEzllOPX0H7yHdt3Cd+P/OufKVIhQ9fVyXiIjA6hOhBxwJV1tHelxKWqvzp/oE8/ W8V0LDSTLA3y0/gw38XOZvhpv5JZ1wd3859Hw2dSVJL1NP63+1exFvVWv0mPnOGswUoB kFxj5ZtfXJX//arKuEKnBzN03av8B/XppcLxPHn0ydki3x/aritvrQK1QeR/aOTp8Ar/ NDGa4XlR+d/rYfB4+Pl/aQLDtbdxPgE3z8XYryZLoOyn93bzz3OvkRi2UMndCNUEG2vN uUOIgRxzfs7VQY2tEijbizsu/S/algodvp5heTlR3482b0BmF2s6I5V+wR+SxD4jY376 kDQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=G8p7yldKtTr1PNOn8wgGIMMVK/LhdITnIisacE3JNHw=; b=iOuVTydC2sviqDkJpUybSiDmTs+V1Fl560CRtBrqqZCDJKo68HRFVlZVJpFegCHgy7 fVUDCah4q5U1W/874WXNPhyjHuI3Mh+iKNLabLu51hPYfqtkSW+nD1b8oGQ+Y4YSyFG+ mbrR05npFs9+bD1xKMEGhutbPPlWW4+LFHghv7f8zBqQ7vQG0UVAMMwCEBf/21qwTpO7 28poWfNmM4lRnNfKwsCY3trlPXjGsIYf/mhVyM+I5WTthtY6eCeBAYQenhbmH7b/tno5 l5lsYLtFQMcvMmeHZl5G4dV5Z412Q4/erlDegbm1YGIXFHRCsnfi0Ydeikoe5kedluAA Ko4g== X-Gm-Message-State: AOAM532deDS2UIddQ2/G0ZuUmxnZQQTwGIpQgwTWeSdFxa3RoDQAHKe4 0N8IyGQoBvmDj8VMzQb8ApEcew== X-Google-Smtp-Source: ABdhPJzI5A1uJNgod3x8D6YTKaAahyJjif8qzzhmrGUNRzQTxJzrMZfdsh/nkKu29nRLM9x/jCMPIw== X-Received: by 2002:a05:6402:42d4:b0:416:5cac:a9a0 with SMTP id i20-20020a05640242d400b004165caca9a0mr19742244edc.86.1651603525309; Tue, 03 May 2022 11:45:25 -0700 (PDT) Received: from [192.168.0.206] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id ia17-20020a170907a07100b006f3ef214de6sm4862679ejc.76.2022.05.03.11.45.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 May 2022 11:45:24 -0700 (PDT) Message-ID: <4ff1354e-07c6-5518-879d-1ad55f04e22a@linaro.org> Date: Tue, 3 May 2022 20:45:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v3 1/2] dt-bindings: google,cros-ec-keyb: Introduce switches only compatible Content-Language: en-US To: Doug Anderson , Krzysztof Kozlowski Cc: Stephen Boyd , Dmitry Torokhov , LKML , patches@lists.linux.dev, chrome-platform@lists.linux.dev, Krzysztof Kozlowski , Rob Herring , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Benson Leung , Guenter Roeck , Hsin-Yi Wang , "Joseph S. Barrera III" References: <20220503042242.3597561-1-swboyd@chromium.org> <20220503042242.3597561-2-swboyd@chromium.org> <2280875f-fbd8-0dfd-5a0a-1d7fceb856e4@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 03/05/2022 18:14, Doug Anderson wrote: > Hi, > > On Tue, May 3, 2022 at 8:54 AM Krzysztof Kozlowski wrote: >> >> On 03/05/2022 17:46, Doug Anderson wrote: >>> Hi, >>> >>> On Tue, May 3, 2022 at 8:42 AM Krzysztof Kozlowski >>> wrote: >>>> >>>> On 03/05/2022 06:22, Stephen Boyd wrote: >>>>> If the ChromeOS board is a detachable, this cros-ec-keyb device won't >>>>> have a matrix keyboard but it may have some button switches, e.g. volume >>>>> buttons and power buttons. The driver still registers a keyboard though >>>>> and that leads to userspace confusion around where the keyboard is. >>>> >>>> (...) >>>> >>>>> >>>>> +if: >>>>> + properties: >>>>> + compatible: >>>>> + contains: >>>>> + const: google,cros-ec-keyb >>>>> +then: >>>>> + allOf: >>>>> + - $ref: "/schemas/input/matrix-keymap.yaml#" >>>>> + required: >>>>> + - keypad,num-rows >>>>> + - keypad,num-columns >>>>> + - linux,keymap >>>> >>>> else: >>>> properties: >>>> function-row-phsymap: false >>>> google,needs-ghost-filter: false >>>> >>>> Because these are not valid for the non-matrix-keyboard case, right? >>> >>> Isn't that implicit because this file has `unevaluatedProperties: false` ? >> >> But they are evaluated here, aren't they? > > Only if the "if" test, though? No, they are evaluated always. They are listed directly in properties, not in "if", therefore they will be considered as always evaluated. > ...ah, or is this a difference between > "unevaluatedProperties" and "additionalProperties" ? Best regards, Krzysztof