Re: [PATCH 1/3] dt-bindings: mtd: atmel-nand: convert txt to yaml

From: Conor Dooley
Date: Fri Mar 22 2024 - 03:31:46 EST


On Fri, Mar 22, 2024 at 04:27:29AM +0000, Balamanikandan.Gunasundar@xxxxxxxxxxxxx wrote:
> On 20/03/24 10:05 pm, Conor Dooley wrote:
> > On Wed, Mar 20, 2024 at 11:22:07AM +0530, Balamanikandan Gunasundar wrote:

> >> +allOf:
> >> + - if:
> >> + properties:
> >> + compatible:
> >> + contains:
> >> + enum:
> >> + - atmel,at91rm9200-nand-controller
> >> + - atmel,at91sam9260-nand-controller
> >> + - atmel,at91sam9261-nand-controller
> >> + - atmel,at91sam9g45-nand-controller
> >> + - atmel,sama5d3-nand-controller
> >> + - microchip,sam9x60-nand-controller
> >> + then:
> >> + properties:
> >> + "#address-cells":
> >> + const: 2
> >> +
> >> + "#size-cells":
> >> + const: 1
> > Why is this in an if? Isn't this all of the devices in the binding?
> >
>
> The default nand-controller.yaml defines this as const values.
> (#address-cell : 1 and #size-cells : 1). I am trying to override this
> const value.

You're not overriding anything as you don't have a ref to
nand-controller.yaml in this file, AFAICT. Why don't you?

> May be I should think about better approach ?

You should be able to apply this unconditionally for this file. I don't
see why the if would be needed?


> >> +patternProperties:
> >> + "^nand@[a-f0-9]$":
> >> + type: object
> >> + $ref: nand-chip.yaml#
> >> + description:
> >> + NAND chip bindings. All generic properties described in
> >> + Documentation/devicetree/bindings/mtd/{common,nand}.txt also apply to
> >> + the NAND device node, and NAND partitions should be defined under the
> >> + NAND node as described in
> >> + Documentation/devicetree/bindings/mtd/partition.txt.
> > These files do not exist.
> >
>
> Apologies for copying the content from the text file. I will correct this.

You don't need these comments at all I think. You have the ref to
nand-chip.yaml, so at least the first text file reference can be
removed.

> Yes. I should fix the alignment. I will send a v2 shortly

I did make other comments, so I assume you agree with everything else I
mentioned and will implement them in v2.

Thanks,
Conor.

Attachment: signature.asc
Description: PGP signature