Linux-ARM-MSM Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/2] dt-bindings: thermal: tsens: Fix nvmem-cell-names schema
@ 2020-03-24 18:05 Rob Herring
  2020-03-24 18:05 ` [PATCH 2/2] dt-bindings: thermal: tsens: Set 'additionalProperties: false' Rob Herring
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Rob Herring @ 2020-03-24 18:05 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Andy Gross, Bjorn Andersson, Amit Kucheria, Zhang Rui,
	linux-arm-msm, linux-pm, devicetree

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 <agross@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Amit Kucheria <amit.kucheria@linaro.org>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: devicetree@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
 .../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 = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
            interrupt-names = "uplow";
-- 
2.20.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/2] dt-bindings: thermal: tsens: Set 'additionalProperties: false'
  2020-03-24 18:05 [PATCH 1/2] dt-bindings: thermal: tsens: Fix nvmem-cell-names schema Rob Herring
@ 2020-03-24 18:05 ` Rob Herring
  2020-03-25 15:44   ` Amit Kucheria
  2020-03-31 21:09   ` Rob Herring
  2020-03-25 15:43 ` [PATCH 1/2] dt-bindings: thermal: tsens: Fix nvmem-cell-names schema Amit Kucheria
  2020-03-31 21:09 ` Rob Herring
  2 siblings, 2 replies; 6+ messages in thread
From: Rob Herring @ 2020-03-24 18:05 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Andy Gross, Bjorn Andersson, Amit Kucheria, Zhang Rui,
	linux-arm-msm, linux-pm, devicetree

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 <agross@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Amit Kucheria <amit.kucheria@linaro.org>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-pm@vger.kernel.org
Cc: devicetree@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
 .../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 <dt-bindings/interrupt-controller/arm-gic.h>
-- 
2.20.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] dt-bindings: thermal: tsens: Fix nvmem-cell-names schema
  2020-03-24 18:05 [PATCH 1/2] dt-bindings: thermal: tsens: Fix nvmem-cell-names schema Rob Herring
  2020-03-24 18:05 ` [PATCH 2/2] dt-bindings: thermal: tsens: Set 'additionalProperties: false' Rob Herring
@ 2020-03-25 15:43 ` Amit Kucheria
  2020-03-31 21:09 ` Rob Herring
  2 siblings, 0 replies; 6+ messages in thread
From: Amit Kucheria @ 2020-03-25 15:43 UTC (permalink / raw)
  To: Rob Herring
  Cc: Daniel Lezcano, Andy Gross, Bjorn Andersson, Zhang Rui,
	linux-arm-msm, Linux PM list, DTML

On Tue, Mar 24, 2020 at 11:35 PM Rob Herring <robh@kernel.org> wrote:
>
> 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.


Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>

> Fixes: a877e768f655 ("dt-bindings: thermal: tsens: Convert over to a yaml schema")
> Cc: Andy Gross <agross@kernel.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Amit Kucheria <amit.kucheria@linaro.org>
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: linux-arm-msm@vger.kernel.org
> Cc: linux-pm@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  .../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 = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
>             interrupt-names = "uplow";
> --
> 2.20.1
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] dt-bindings: thermal: tsens: Set 'additionalProperties: false'
  2020-03-24 18:05 ` [PATCH 2/2] dt-bindings: thermal: tsens: Set 'additionalProperties: false' Rob Herring
@ 2020-03-25 15:44   ` Amit Kucheria
  2020-03-31 21:09   ` Rob Herring
  1 sibling, 0 replies; 6+ messages in thread
From: Amit Kucheria @ 2020-03-25 15:44 UTC (permalink / raw)
  To: Rob Herring
  Cc: Daniel Lezcano, Andy Gross, Bjorn Andersson, Zhang Rui,
	linux-arm-msm, Linux PM list, DTML

On Tue, Mar 24, 2020 at 11:35 PM Rob Herring <robh@kernel.org> wrote:
>
> 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.


Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>

> Fixes: a877e768f655 ("dt-bindings: thermal: tsens: Convert over to a yaml schema")
> Cc: Andy Gross <agross@kernel.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Amit Kucheria <amit.kucheria@linaro.org>
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: linux-arm-msm@vger.kernel.org
> Cc: linux-pm@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  .../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 <dt-bindings/interrupt-controller/arm-gic.h>
> --
> 2.20.1
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] dt-bindings: thermal: tsens: Fix nvmem-cell-names schema
  2020-03-24 18:05 [PATCH 1/2] dt-bindings: thermal: tsens: Fix nvmem-cell-names schema Rob Herring
  2020-03-24 18:05 ` [PATCH 2/2] dt-bindings: thermal: tsens: Set 'additionalProperties: false' Rob Herring
  2020-03-25 15:43 ` [PATCH 1/2] dt-bindings: thermal: tsens: Fix nvmem-cell-names schema Amit Kucheria
@ 2020-03-31 21:09 ` Rob Herring
  2 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2020-03-31 21:09 UTC (permalink / raw)
  To: Rob Herring
  Cc: Daniel Lezcano, Andy Gross, Bjorn Andersson, Amit Kucheria,
	Zhang Rui, linux-arm-msm, linux-pm, devicetree

On Tue, 24 Mar 2020 12:05:12 -0600, Rob Herring wrote:
> 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 <agross@kernel.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Amit Kucheria <amit.kucheria@linaro.org>
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: linux-arm-msm@vger.kernel.org
> Cc: linux-pm@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  .../devicetree/bindings/thermal/qcom-tsens.yaml          | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 

Applied, thanks.

Rob

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] dt-bindings: thermal: tsens: Set 'additionalProperties: false'
  2020-03-24 18:05 ` [PATCH 2/2] dt-bindings: thermal: tsens: Set 'additionalProperties: false' Rob Herring
  2020-03-25 15:44   ` Amit Kucheria
@ 2020-03-31 21:09   ` Rob Herring
  1 sibling, 0 replies; 6+ messages in thread
From: Rob Herring @ 2020-03-31 21:09 UTC (permalink / raw)
  To: Rob Herring
  Cc: Daniel Lezcano, Andy Gross, Bjorn Andersson, Amit Kucheria,
	Zhang Rui, linux-arm-msm, linux-pm, devicetree

On Tue, 24 Mar 2020 12:05:13 -0600, Rob Herring wrote:
> 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 <agross@kernel.org>
> Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
> Cc: Amit Kucheria <amit.kucheria@linaro.org>
> Cc: Zhang Rui <rui.zhang@intel.com>
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: linux-arm-msm@vger.kernel.org
> Cc: linux-pm@vger.kernel.org
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  .../bindings/thermal/qcom-tsens.yaml          | 28 ++++++++++++-------
>  1 file changed, 18 insertions(+), 10 deletions(-)
> 

Applied, thanks.

Rob

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-24 18:05 [PATCH 1/2] dt-bindings: thermal: tsens: Fix nvmem-cell-names schema Rob Herring
2020-03-24 18:05 ` [PATCH 2/2] dt-bindings: thermal: tsens: Set 'additionalProperties: false' Rob Herring
2020-03-25 15:44   ` Amit Kucheria
2020-03-31 21:09   ` Rob Herring
2020-03-25 15:43 ` [PATCH 1/2] dt-bindings: thermal: tsens: Fix nvmem-cell-names schema Amit Kucheria
2020-03-31 21:09 ` Rob Herring

Linux-ARM-MSM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-msm/0 linux-arm-msm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-msm linux-arm-msm/ https://lore.kernel.org/linux-arm-msm \
		linux-arm-msm@vger.kernel.org
	public-inbox-index linux-arm-msm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-arm-msm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git