diff mbox series

[v2,1/4] dt-bindings: nvmem: Add soc qfprom compatible strings

Message ID 20201016122559.v2.1.I8b447ca96abfbef5f298d77350e6c9d1d18d00f6@changeid
State New
Headers show
Series nvmem: qfprom: Avoid untouchable regions | expand

Commit Message

Evan Green Oct. 16, 2020, 7:26 p.m. UTC
Add SoC-specific compatible strings so that data can be attached
to it in the driver.

Signed-off-by: Evan Green <evgreen@chromium.org>
---

Changes in v2:
 - Add other soc compatible strings (Doug)
 - Fix compatible string definition (Doug)

 .../devicetree/bindings/nvmem/qcom,qfprom.yaml      | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

Comments

Rob Herring Oct. 19, 2020, 7:55 p.m. UTC | #1
On Fri, 16 Oct 2020 12:26:51 -0700, Evan Green wrote:
> Add SoC-specific compatible strings so that data can be attached

> to it in the driver.

> 

> Signed-off-by: Evan Green <evgreen@chromium.org>

> ---

> 

> Changes in v2:

>  - Add other soc compatible strings (Doug)

>  - Fix compatible string definition (Doug)

> 

>  .../devicetree/bindings/nvmem/qcom,qfprom.yaml      | 13 ++++++++++++-

>  1 file changed, 12 insertions(+), 1 deletion(-)

> 



My bot found errors running 'make dt_binding_check' on your patch:

/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/nvmem/qcom,qfprom.example.dt.yaml: efuse@784000: compatible:0: 'qcom,qfprom' is not one of ['qcom,apq8064-qfprom', 'qcom,apq8084-qfprom', 'qcom,msm8974-qfprom', 'qcom,msm8916-qfprom', 'qcom,msm8996-qfprom', 'qcom,msm8998-qfprom', 'qcom,qcs404-qfprom', 'qcom,sc7180-qfprom', 'qcom,sdm845-qfprom']
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/nvmem/qcom,qfprom.example.dt.yaml: efuse@784000: compatible: ['qcom,qfprom'] is too short
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/nvmem/qcom,qfprom.example.dt.yaml: efuse@784000: compatible:0: 'qcom,qfprom' is not one of ['qcom,apq8064-qfprom', 'qcom,apq8084-qfprom', 'qcom,msm8974-qfprom', 'qcom,msm8916-qfprom', 'qcom,msm8996-qfprom', 'qcom,msm8998-qfprom', 'qcom,qcs404-qfprom', 'qcom,sc7180-qfprom', 'qcom,sdm845-qfprom']
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/nvmem/qcom,qfprom.example.dt.yaml: efuse@784000: compatible: ['qcom,qfprom'] is too short
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml


See https://patchwork.ozlabs.org/patch/1383520

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure dt-schema is up to date:

pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade

Please check and re-submit.
Doug Anderson Oct. 21, 2020, 9:40 p.m. UTC | #2
Hi,

On Fri, Oct 16, 2020 at 12:27 PM Evan Green <evgreen@chromium.org> wrote:
>

> Add SoC-specific compatible strings so that data can be attached

> to it in the driver.

>

> Signed-off-by: Evan Green <evgreen@chromium.org>

> ---

>

> Changes in v2:

>  - Add other soc compatible strings (Doug)

>  - Fix compatible string definition (Doug)

>

>  .../devicetree/bindings/nvmem/qcom,qfprom.yaml      | 13 ++++++++++++-

>  1 file changed, 12 insertions(+), 1 deletion(-)

>

> diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml

> index 1a18b6bab35e7..eb1440045aff1 100644

> --- a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml

> +++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml

> @@ -14,7 +14,18 @@ allOf:

>

>  properties:

>    compatible:

> -    const: qcom,qfprom

> +    items:

> +      - enum:

> +          - qcom,apq8064-qfprom

> +          - qcom,apq8084-qfprom

> +          - qcom,msm8974-qfprom

> +          - qcom,msm8916-qfprom

> +          - qcom,msm8996-qfprom

> +          - qcom,msm8998-qfprom

> +          - qcom,qcs404-qfprom

> +          - qcom,sc7180-qfprom

> +          - qcom,sdm845-qfprom

> +      - const: qcom,qfprom

>

>    reg:

>      # If the QFPROM is read-only OS image then only the corrected region


As Rob's bot found, your example no longer matches your requirements.
It needs an SoC-specific string plus the "qcom,qfprom".  It's always
good to try running "make dt_binding_check" to catch these sorts of
things.


-Doug
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
index 1a18b6bab35e7..eb1440045aff1 100644
--- a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
+++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
@@ -14,7 +14,18 @@  allOf:
 
 properties:
   compatible:
-    const: qcom,qfprom
+    items:
+      - enum:
+          - qcom,apq8064-qfprom
+          - qcom,apq8084-qfprom
+          - qcom,msm8974-qfprom
+          - qcom,msm8916-qfprom
+          - qcom,msm8996-qfprom
+          - qcom,msm8998-qfprom
+          - qcom,qcs404-qfprom
+          - qcom,sc7180-qfprom
+          - qcom,sdm845-qfprom
+      - const: qcom,qfprom
 
   reg:
     # If the QFPROM is read-only OS image then only the corrected region