diff mbox series

dt-bindings: mtd: mxc-nand: Drop undocumented properties from example

Message ID 20220525205947.2487165-1-robh@kernel.org
State New
Headers show
Series dt-bindings: mtd: mxc-nand: Drop undocumented properties from example | expand

Commit Message

Rob Herring May 25, 2022, 8:59 p.m. UTC
With unevaluatedProperties issues fixed, 'nand-bus-width' and
'nand-ecc-mode' are flagged as undocumented. Removing them from the example
is the easiest solution to silence the warnings.

Signed-off-by: Rob Herring <robh@kernel.org>
---
These properties may be deprecated, but they are still widely used in
bindings. They either need to be documented (and marked deprecated) or
removed from current users (i.e. dts files).
---
 Documentation/devicetree/bindings/mtd/mxc-nand.yaml | 2 --
 1 file changed, 2 deletions(-)

Comments

Marc Kleine-Budde May 27, 2022, 9:38 a.m. UTC | #1
On 25.05.2022 15:59:46, Rob Herring wrote:
> With unevaluatedProperties issues fixed, 'nand-bus-width' and
> 'nand-ecc-mode' are flagged as undocumented. Removing them from the example
> is the easiest solution to silence the warnings.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>

At least the 'nand-bus-width' property is described in
"nand-controller.yaml" and the "mxc-nand.yaml" refers to it.

| allOf:
|   - $ref: "nand-controller.yaml"

Is this ref broken?

regards,
Marc

> ---
> These properties may be deprecated, but they are still widely used in
> bindings. They either need to be documented (and marked deprecated) or
> removed from current users (i.e. dts files).
> ---
>  Documentation/devicetree/bindings/mtd/mxc-nand.yaml | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mtd/mxc-nand.yaml b/Documentation/devicetree/bindings/mtd/mxc-nand.yaml
> index 73b86f2226c7..66da1b476ab7 100644
> --- a/Documentation/devicetree/bindings/mtd/mxc-nand.yaml
> +++ b/Documentation/devicetree/bindings/mtd/mxc-nand.yaml
> @@ -37,6 +37,4 @@ examples:
>          compatible = "fsl,imx27-nand";
>          reg = <0xd8000000 0x1000>;
>          interrupts = <29>;
> -        nand-bus-width = <8>;
> -        nand-ecc-mode = "hw";
>      };
> -- 
> 2.34.1
> 
>
Uwe Kleine-König May 27, 2022, 9:57 a.m. UTC | #2
On Wed, May 25, 2022 at 03:59:46PM -0500, Rob Herring wrote:
> With unevaluatedProperties issues fixed, 'nand-bus-width' and
> 'nand-ecc-mode' are flagged as undocumented. Removing them from the example
> is the easiest solution to silence the warnings.

It's not clear to me, what has to be done to see this warning. Can you
tell me how to reproduce?

My current WIP patch is:

diff --git a/Documentation/devicetree/bindings/mtd/mxc-nand.yaml b/Documentation/devicetree/bindings/mtd/mxc-nand.yaml
index 73b86f2226c7..6e3e346e4448 100644
--- a/Documentation/devicetree/bindings/mtd/mxc-nand.yaml
+++ b/Documentation/devicetree/bindings/mtd/mxc-nand.yaml
@@ -14,7 +14,18 @@ allOf:
 
 properties:
   compatible:
-    const: fsl,imx27-nand
+    oneOf:
+      - const: fsl,imx21-nand
+      - const: fsl,imx25-nand
+      - const: fsl,imx27-nand
+      - items:
+          - const: fsl,imx31-nand
+          - const: fsl,imx27-nand
+      - items:
+          - const: fsl,imx35-nand
+          - const: fsl,imx27-nand
+      - const: fsl,imx51-nand
+      - const: fsl,imx53-nand
 
   reg:
     maxItems: 1

which I think is right, but obviously doesn't fix the problem you
pointed out :-)

> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
> These properties may be deprecated, but they are still widely used in
> bindings. They either need to be documented (and marked deprecated) or
> removed from current users (i.e. dts files).

Or documented and not marked deprecated?

Best regards
Uwe

> diff --git a/Documentation/devicetree/bindings/mtd/mxc-nand.yaml b/Documentation/devicetree/bindings/mtd/mxc-nand.yaml
> index 73b86f2226c7..66da1b476ab7 100644
> --- a/Documentation/devicetree/bindings/mtd/mxc-nand.yaml
> +++ b/Documentation/devicetree/bindings/mtd/mxc-nand.yaml
> @@ -37,6 +37,4 @@ examples:
>          compatible = "fsl,imx27-nand";
>          reg = <0xd8000000 0x1000>;
>          interrupts = <29>;
> -        nand-bus-width = <8>;
> -        nand-ecc-mode = "hw";
>      };
Rob Herring May 31, 2022, 3:05 p.m. UTC | #3
On Fri, May 27, 2022 at 11:38:39AM +0200, Marc Kleine-Budde wrote:
> On 25.05.2022 15:59:46, Rob Herring wrote:
> > With unevaluatedProperties issues fixed, 'nand-bus-width' and
> > 'nand-ecc-mode' are flagged as undocumented. Removing them from the example
> > is the easiest solution to silence the warnings.
> > 
> > Signed-off-by: Rob Herring <robh@kernel.org>
> 
> At least the 'nand-bus-width' property is described in
> "nand-controller.yaml" and the "mxc-nand.yaml" refers to it.
> 
> | allOf:
> |   - $ref: "nand-controller.yaml"
> 
> Is this ref broken?

Nope, read my note below. 'nand-bus-width' is documented as a nand chip 
(child node) property, not a nand controller property.


> regards,
> Marc
> 
> > ---
> > These properties may be deprecated, but they are still widely used in
> > bindings. They either need to be documented (and marked deprecated) or
> > removed from current users (i.e. dts files).


^^^^

> > ---
> >  Documentation/devicetree/bindings/mtd/mxc-nand.yaml | 2 --
> >  1 file changed, 2 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/mtd/mxc-nand.yaml b/Documentation/devicetree/bindings/mtd/mxc-nand.yaml
> > index 73b86f2226c7..66da1b476ab7 100644
> > --- a/Documentation/devicetree/bindings/mtd/mxc-nand.yaml
> > +++ b/Documentation/devicetree/bindings/mtd/mxc-nand.yaml
> > @@ -37,6 +37,4 @@ examples:
> >          compatible = "fsl,imx27-nand";
> >          reg = <0xd8000000 0x1000>;
> >          interrupts = <29>;
> > -        nand-bus-width = <8>;
> > -        nand-ecc-mode = "hw";
> >      };
> > -- 
> > 2.34.1
> > 
> > 
> 
> -- 
> Pengutronix e.K.                 | Marc Kleine-Budde           |
> Embedded Linux                   | https://www.pengutronix.de  |
> Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
> Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mtd/mxc-nand.yaml b/Documentation/devicetree/bindings/mtd/mxc-nand.yaml
index 73b86f2226c7..66da1b476ab7 100644
--- a/Documentation/devicetree/bindings/mtd/mxc-nand.yaml
+++ b/Documentation/devicetree/bindings/mtd/mxc-nand.yaml
@@ -37,6 +37,4 @@  examples:
         compatible = "fsl,imx27-nand";
         reg = <0xd8000000 0x1000>;
         interrupts = <29>;
-        nand-bus-width = <8>;
-        nand-ecc-mode = "hw";
     };