From patchwork Tue Mar 24 18:05:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11456123 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 136551392 for ; Tue, 24 Mar 2020 18:05:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E988F212CC 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=1585073119; bh=gwowZflma4HOUrkpOxfcknYhcrXvqIPfeMghYSj8EKs=; h=From:To:Cc:Subject:Date:List-ID:From; b=XFR/XLerPcvw/P/oAb29Jwv+cQYrqT2Q9ltn70n7nm6AhZ5quI/7QTuEdnLUoSwv1 84E2npR008GGWoL8fsixwKtvaZY1YeL5J/W+ItWoI8h5lXT9xSBuekJ9Ha+2snk6Qu 5L9BHbX6xOqICNqjlls1jAlcrCLD+6cZOiC9kn34= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727553AbgCXSFS (ORCPT ); Tue, 24 Mar 2020 14:05:18 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:46166 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727495AbgCXSFR (ORCPT ); Tue, 24 Mar 2020 14:05:17 -0400 Received: by mail-io1-f65.google.com with SMTP id a20so11798695ioo.13; Tue, 24 Mar 2020 11:05:15 -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:mime-version :content-transfer-encoding; bh=nyDEVt1mvrogKhA8Gqx9BDr8ZhtFuURVk0awOOjdRAk=; b=FRvVpYZQ7kbHljZAiALiNAYG2hMeiVKXcQ1YWleARDSyLEBqaXP1dJpny0a+TDuhUh qYHnfX6qZDseEAXVITgxaKuiaG6+MNuN81fk8cjdTcp78Ogomzzflo+4Fy7sMtYFymhi wjMStuKRdM+uNSEFGmjL58iBB0VnBZZ7SbD0LXbLlGFURR1vkyjkYV1V9NH8ZCqdxsLh l1UuunmM0F9PZ9sf4PH2fbHAEUWK7X5odUv3t0qWossqDTG2SLurJPzdh5hnMFEJqDGs e445soVE84Y1uOIl/XiXYencK70axgE4+dPhRPG0eVc3SweVfZ62lwb6cf8Snyk1IeoK sjUQ== X-Gm-Message-State: ANhLgQ2xeVxUvivr1m/NbjGu4HMGnRTP6KJE+953m0Xoc+ftFHbawdAy UE38gKZ6k65O8Ou1KnwvGA== X-Google-Smtp-Source: ADFU+vviVLJ2406W4da5BKPv3JBD0h+tKl7SMZvgGaaTsZAT3LHrZ3tTM5vdWhgLvBrZ8lN+deNRYw== X-Received: by 2002:a02:740d:: with SMTP id o13mr25847674jac.113.1585073114974; Tue, 24 Mar 2020 11:05:14 -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.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Mar 2020 11:05:14 -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 1/2] dt-bindings: thermal: tsens: Fix nvmem-cell-names schema Date: Tue, 24 Mar 2020 12:05:12 -0600 Message-Id: <20200324180513.3882-1-robh@kernel.org> X-Mailer: git-send-email 2.20.1 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 There's a typo 'nvmem-cells-names' in the schema which means the correct 'nvmem-cell-names' in the examples are not checked. The possible values are wrong too both in that the 2nd entry is not specified correctly and the values are just wrong based on the dts files in the kernel. 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 --- .../devicetree/bindings/thermal/qcom-tsens.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml index eac644d9e238..7a38d2116059 100644 --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.yaml @@ -52,13 +52,12 @@ properties: description: Reference to an nvmem node for the calibration data - nvmem-cells-names: + nvmem-cell-names: minItems: 1 maxItems: 2 items: - - enum: - - caldata - - calsel + - const: calib + - const: calib_sel "#qcom,sensors": allOf: @@ -124,7 +123,7 @@ examples: <0x4a8000 0x1000>; /* SROT */ nvmem-cells = <&tsens_caldata>, <&tsens_calsel>; - nvmem-cell-names = "caldata", "calsel"; + nvmem-cell-names = "calib", "calib_sel"; interrupts = ; interrupt-names = "uplow"; 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 (Arm)" X-Patchwork-Id: 11456119 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7BF5714B4 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 51E1D20719 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