From patchwork Tue Mar 24 18:05:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 189856 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 769C0C43331 for ; Tue, 24 Mar 2020 18:05:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5270F2074D for ; Tue, 24 Mar 2020 18:05:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585073118; bh=4aihBhnSGF+aSJdFGhn0tiX6DoGkhqBJTcfx0vtR8VE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=QgEXHBLUuAsIhLxx3BG75zRpH0Vt3hg9KxLd18REQJ8HIK1FWy+1vd2r7EygnSxgy edO+1d5vyiVyIsqnzHapr+kKsk5uimkGNSJHs1g6g4Q7oXXmbxNdnA5PxvU7yfK6Uv JEhs4hYqfB0FXFrC7x8O2mEByePbNg/c8OyOtLCk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727543AbgCXSFR (ORCPT ); Tue, 24 Mar 2020 14:05:17 -0400 Received: from mail-il1-f196.google.com ([209.85.166.196]:43165 "EHLO mail-il1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727314AbgCXSFR (ORCPT ); Tue, 24 Mar 2020 14:05:17 -0400 Received: by mail-il1-f196.google.com with SMTP id g15so8511425ilj.10; Tue, 24 Mar 2020 11:05:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=f9FwT4hBATnVfznxi1cnrb0F4y7CCgXvMmx9RvvvTuk=; b=HQFyIs64REozGG698aB7gxXHmc92rNPosEpkNH5SrahMuIhYpfZSvr9aVIw6uoqlZk 9ImqfjsiST5bg4Q0oVynq1uB8aJrEnIS1d+ikgPmXEiBvPk1aXIhE8LkWCmjZT+Rj2ln skE/NKiNIWz16/da1dtjBPsNWSXYKWLk/3GANp0xht7OqPggVawDoA9Q44ryktbPCEyv EKQI2Z5z7OtL5JT9DKq5OFINe9hb9JAWF0XXnkJQVtHZTLm1VvydguVbMYrysIsYdRRE qMET8ENLXm9XKCe1Qomx9F0+HBFyqP8BVkdZSH7UF4wpiOua5sWDNVqY1fn6OR8CgpOI eFXA== X-Gm-Message-State: ANhLgQ034nJwvC4HvNYcEb+/8EIUf7YcPQ0olCFQNlH3h+OFBoEYswMq 0fo4ErOOzFXABXNn6k2oJw== X-Google-Smtp-Source: ADFU+vtWYXZGcZ5Xm5GdMRAWBGF58PhfvWP3D92WD4x1uhj4RylpNyqfXK314CqkENzaR4qEWKuXbQ== X-Received: by 2002:a92:8316:: with SMTP id f22mr703764ild.169.1585073116525; Tue, 24 Mar 2020 11:05:16 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.250]) by smtp.googlemail.com with ESMTPSA id h12sm5348493iob.22.2020.03.24.11.05.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Mar 2020 11:05:15 -0700 (PDT) From: Rob Herring To: Daniel Lezcano Cc: Andy Gross , Bjorn Andersson , Amit Kucheria , Zhang Rui , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 2/2] dt-bindings: thermal: tsens: Set 'additionalProperties: false' Date: Tue, 24 Mar 2020 12:05:13 -0600 Message-Id: <20200324180513.3882-2-robh@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200324180513.3882-1-robh@kernel.org> References: <20200324180513.3882-1-robh@kernel.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Ensure the node only contains the properties listed in the schema by setting 'additionalProperties: false'. Doing this requires reworking the interrupt properties schemas so that they are defined in the main 'properties' section. Fixes: a877e768f655 ("dt-bindings: thermal: tsens: Convert over to a yaml schema") Cc: Andy Gross Cc: Bjorn Andersson Cc: Amit Kucheria Cc: Zhang Rui Cc: Daniel Lezcano Cc: linux-arm-msm@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring Reviewed-by: Amit Kucheria --- .../bindings/thermal/qcom-tsens.yaml | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml index 7a38d2116059..3492447e42e9 100644 --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml @@ -46,6 +46,18 @@ properties: - description: TM registers - description: SROT registers + interrupts: + minItems: 1 + items: + - description: Combined interrupt if upper or lower threshold crossed + - description: Interrupt if critical threshold crossed + + interrupt-names: + minItems: 1 + items: + - const: uplow + - const: critical + nvmem-cells: minItems: 1 maxItems: 2 @@ -88,22 +100,16 @@ allOf: then: properties: interrupts: - items: - - description: Combined interrupt if upper or lower threshold crossed + maxItems: 1 interrupt-names: - items: - - const: uplow + maxItems: 1 else: properties: interrupts: - items: - - description: Combined interrupt if upper or lower threshold crossed - - description: Interrupt if critical threshold crossed + minItems: 2 interrupt-names: - items: - - const: uplow - - const: critical + minItems: 2 required: - compatible @@ -113,6 +119,8 @@ required: - interrupt-names - "#thermal-sensor-cells" +additionalProperties: false + examples: - | #include