From patchwork Fri Nov 25 14:33:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 26028 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp4063845wrr; Fri, 25 Nov 2022 06:34:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf79/9oHOmKuPxEff2Ev/bUaCKu7EuQnmljRDVYFWINySp7Mgb/hRYHUbAuQssEX7NHt2K6D X-Received: by 2002:a2e:be8a:0:b0:26f:c081:9aed with SMTP id a10-20020a2ebe8a000000b0026fc0819aedmr12204602ljr.222.1669386880866; Fri, 25 Nov 2022 06:34:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669386880; cv=none; d=google.com; s=arc-20160816; b=YAd3uJyaDlr3yp+/fgf4FfV0kf2i+DAbya/1CIe6Yvy/2M/PXuKb638F7DPts4jOYb Rm1kyHCLSssiNb866DOltfOPIMsGCXj/2Da6CCHU1x/JdQ9ghWsGCRDZvgcKRmtVFvss KtblAK3y95Ij1FTceL1R9WA0giYKIRDH+MeIroi5Qd1VYkOaFV5AX8DiJgUBgCR0AePj UuF+9k18E+ivDhI2em8XM+VJYy/JjKvhEoC4uuobEtIOj5HD5yQL/XjYakJ/nNGphDVl KAZxL1d2z65yljS8Q6VHcD4vt864vSzHeQWjjrRAqQ8KORKEJ5elUtRnzH/pmL4ViDUw zQGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=uCo1AkWD2FgarCrXoedmAiqLbycN5G3SgzmeYSK7Dpg=; b=ace5dlKoNI7nr+mJGO9zaav1bD1aBUwuDUdHAHhizI9xPv2zHVqzOdjgN6mduOLElh 7svydQA5VaRmQIJc2zk4hT30nmDPmMZcPzPIfTmefMazHfNpAt1wde1S0mMZiyZwcJYT 7nuCqLEpyqYsY2m15NLfkzrxQHEsPr7u6sOygZjWMSOwZFI0Q8M3QZBoZoaceH3xmrdt lOz0LqkFLpqsoRlcUKN9aGKnTP3CRO1cHPkMSLLVrhuxrkNrhqkrXGxx8UG3vQNlG3Dy GDv31wRYslVHtqYh7EwXFxqLEyLmxQna9n20HP9OAu+CWR3MGaso1Qs+GjTkpZCRpJfM bC7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="a/b4t6mq"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id di13-20020a170906730d00b007adf6f0f962si2807882ejc.291.2022.11.25.06.34.16; Fri, 25 Nov 2022 06:34:40 -0800 (PST) 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; dkim=pass header.i=@linaro.org header.s=google header.b="a/b4t6mq"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229995AbiKYOdp (ORCPT + 99 others); Fri, 25 Nov 2022 09:33:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229989AbiKYOdh (ORCPT ); Fri, 25 Nov 2022 09:33:37 -0500 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31E5E2EF17 for ; Fri, 25 Nov 2022 06:33:36 -0800 (PST) Received: by mail-lf1-x132.google.com with SMTP id p8so7152661lfu.11 for ; Fri, 25 Nov 2022 06:33:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=uCo1AkWD2FgarCrXoedmAiqLbycN5G3SgzmeYSK7Dpg=; b=a/b4t6mqId1FZXTFhl4/ax7IXwC4KMoBiYwDBaG4hEAaEj3DvhfNLxJxcO1aQ9SwJU aPmaVgbczdckQp+p5lKzgrpjtk3BFmpgfw3crNADB9wxbgtIn4p8jwcSTyaz1hDvD8Fn 31UbcmABDzolszp2S1jCH+B2kNFVfz/ZI5NEvyLNTP8v40XPSt56SjWTfXBDqk+5ZyHn UmdTd3a380vjjtdIZ3Z92/4yXq+nWNgp58lzn0J3Vuucd0UclrtEYt8r2MQRI+KpyP+y Q03LywMGzMuqlSIZBCB+0KQN6/cBnrQ2FwO5LDK19hdS8SDl0dzm+xbbpS8StMeofjGR 4Cew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uCo1AkWD2FgarCrXoedmAiqLbycN5G3SgzmeYSK7Dpg=; b=WI3D0+5mWOcBshNmwbdQtwOvQb3SNc+XnoR4UAMzKBR88O6eZpi4AYb9ulP/KIzNv9 CHvX0JTifwZYtFfMHQ0/JkN/HMwfedynzetA9dYnMz7fryNNPX5wZdk/t7cryJRFG9uP 2hROijxczwGvQDCKcSi1m5YUYeAx9SMQlJ/9psUwyhW98GQLlIxex66PL6oYAgMNHm72 crCGeoG3dJ3O/lVeVu2ZElq6D/YUnBJaKMTEYyDEP0HtYvjGGqG6M3yj8/z6wZAFTFTV pRNQrH2aTDJHk05sda1TOirPCMEWe2wGqSqqQUe1IXlBBNyJmZchKheLpyjp6fswM/dj k5Dg== X-Gm-Message-State: ANoB5pn5sthyZ5UqJ4q/tygS/yB8/IF2ouEcofkrE+lv4p117kzMbcGe xOPwTO8/ioy/mq8Lkgr1JgwC5w== X-Received: by 2002:ac2:4189:0:b0:4b1:2447:6971 with SMTP id z9-20020ac24189000000b004b124476971mr8011706lfh.83.1669386814361; Fri, 25 Nov 2022 06:33:34 -0800 (PST) Received: from krzk-bin.NAT.warszawa.vectranet.pl (088156142067.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.67]) by smtp.gmail.com with ESMTPSA id k26-20020a05651c10ba00b002798ab42fffsm312966ljn.129.2022.11.25.06.33.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Nov 2022 06:33:33 -0800 (PST) From: Krzysztof Kozlowski To: Pavel Machek , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Vincent Knecht , Nikita Travkin , Jacek Anaszewski , Andrew Davis , Gene Chen , Bjorn Andersson , ChiYuan Huang , Luca Weiss , - NeilBrown , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Cc: Krzysztof Kozlowski Subject: [PATCH 1/4] dt-bindings: leds: use unevaluatedProperties for common.yaml Date: Fri, 25 Nov 2022 15:33:28 +0100 Message-Id: <20221125143331.473981-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750479017708775935?= X-GMAIL-MSGID: =?utf-8?q?1750479017708775935?= The common.yaml schema allows further properties, so the bindings using it should restrict it with unevaluatedProperties:false. Signed-off-by: Krzysztof Kozlowski --- .../devicetree/bindings/leds/issi,is31fl319x.yaml | 1 + .../devicetree/bindings/leds/leds-aw2013.yaml | 1 + .../devicetree/bindings/leds/leds-gpio.yaml | 2 +- .../devicetree/bindings/leds/leds-lp50xx.yaml | 8 ++++++++ Documentation/devicetree/bindings/leds/leds-pwm.yaml | 2 +- .../devicetree/bindings/leds/leds-qcom-lpg.yaml | 12 +++++++++++- .../devicetree/bindings/leds/leds-rt4505.yaml | 1 + .../devicetree/bindings/leds/leds-sgm3140.yaml | 1 + .../devicetree/bindings/leds/ti,tca6507.yaml | 2 +- 9 files changed, 26 insertions(+), 4 deletions(-) diff --git a/Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml b/Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml index 940333f2d69c..2929382625b6 100644 --- a/Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml +++ b/Documentation/devicetree/bindings/leds/issi,is31fl319x.yaml @@ -57,6 +57,7 @@ patternProperties: "^led@[1-9]$": type: object $ref: common.yaml# + unevaluatedProperties: false properties: reg: diff --git a/Documentation/devicetree/bindings/leds/leds-aw2013.yaml b/Documentation/devicetree/bindings/leds/leds-aw2013.yaml index e24b0d15ef01..6c3ea0f06cef 100644 --- a/Documentation/devicetree/bindings/leds/leds-aw2013.yaml +++ b/Documentation/devicetree/bindings/leds/leds-aw2013.yaml @@ -33,6 +33,7 @@ patternProperties: "^led@[0-2]$": type: object $ref: common.yaml# + unevaluatedProperties: false properties: reg: diff --git a/Documentation/devicetree/bindings/leds/leds-gpio.yaml b/Documentation/devicetree/bindings/leds/leds-gpio.yaml index 7ad2baeda0b0..7e11703acbd6 100644 --- a/Documentation/devicetree/bindings/leds/leds-gpio.yaml +++ b/Documentation/devicetree/bindings/leds/leds-gpio.yaml @@ -23,8 +23,8 @@ patternProperties: # node name to at least catch some child nodes. "(^led-[0-9a-f]$|led)": type: object - $ref: common.yaml# + unevaluatedProperties: false properties: gpios: diff --git a/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml b/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml index 63da380748bf..402c25424525 100644 --- a/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml +++ b/Documentation/devicetree/bindings/leds/leds-lp50xx.yaml @@ -77,6 +77,14 @@ patternProperties: "^led@[0-9a-f]+$": type: object $ref: common.yaml# + unevaluatedProperties: false + + properties: + reg: + maxItems: 1 + + required: + - reg required: - compatible diff --git a/Documentation/devicetree/bindings/leds/leds-pwm.yaml b/Documentation/devicetree/bindings/leds/leds-pwm.yaml index fe4d5fd25913..7de6da58be3c 100644 --- a/Documentation/devicetree/bindings/leds/leds-pwm.yaml +++ b/Documentation/devicetree/bindings/leds/leds-pwm.yaml @@ -20,8 +20,8 @@ properties: patternProperties: "^led(-[0-9a-f]+)?$": type: object - $ref: common.yaml# + unevaluatedProperties: false properties: pwms: diff --git a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml index 497db289169d..1df837798249 100644 --- a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml +++ b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml @@ -72,14 +72,24 @@ properties: "^led@[0-9a-f]$": type: object $ref: common.yaml# + unevaluatedProperties: false + + properties: + reg: + maxItems: 1 + + required: + - reg patternProperties: "^led@[0-9a-f]$": type: object $ref: common.yaml# + unevaluatedProperties: false properties: - reg: true + reg: + maxItems: 1 required: - reg diff --git a/Documentation/devicetree/bindings/leds/leds-rt4505.yaml b/Documentation/devicetree/bindings/leds/leds-rt4505.yaml index 5b0c74aa6723..cb71fec173c1 100644 --- a/Documentation/devicetree/bindings/leds/leds-rt4505.yaml +++ b/Documentation/devicetree/bindings/leds/leds-rt4505.yaml @@ -27,6 +27,7 @@ properties: led: type: object $ref: common.yaml# + unevaluatedProperties: false required: - compatible diff --git a/Documentation/devicetree/bindings/leds/leds-sgm3140.yaml b/Documentation/devicetree/bindings/leds/leds-sgm3140.yaml index f68259619488..56b2b2630108 100644 --- a/Documentation/devicetree/bindings/leds/leds-sgm3140.yaml +++ b/Documentation/devicetree/bindings/leds/leds-sgm3140.yaml @@ -34,6 +34,7 @@ properties: led: type: object $ref: common.yaml# + unevaluatedProperties: false required: - compatible diff --git a/Documentation/devicetree/bindings/leds/ti,tca6507.yaml b/Documentation/devicetree/bindings/leds/ti,tca6507.yaml index 32c600387895..9ce5c0f16e17 100644 --- a/Documentation/devicetree/bindings/leds/ti,tca6507.yaml +++ b/Documentation/devicetree/bindings/leds/ti,tca6507.yaml @@ -38,8 +38,8 @@ properties: patternProperties: "^led@[0-6]$": type: object - $ref: common.yaml# + unevaluatedProperties: false properties: reg: