Re: [PATCH v7 1/3] dt-bindings: mtd: Add Loongson-1 NAND Controller

From: Miquel Raynal
Date: Thu Jun 06 2024 - 17:33:59 EST


Hi,

> > > > > +properties:
> > > > > + compatible:
> > > > > + oneOf:
> > > > > + - const: loongson,ls1b-nfc
> > > >
> > > > What is the rationale behind this choice? Seems like the b variant has
> > > > two possible implementations and should always be preceded by a more
> > > > specific compatible.
> > > >
> > > > As there is currently no description of this controller upstream, I
> > > > would not care too much about any out-of-tree description and directly
> > > > go for a clean description.
> > > >
> > > Excuse me, should I add a description for this property?
> >
> > No, description is not needed. But you are allowing the
> > "loongson,ls1b-nfc" compatible alone, which I think is not relevant,
> > unless you convince me it is :-)
> >
> "loongson,ls1b-nfc" itself is a specific implementation.
> I was suggested to set up a fallback before.
> https://lore.kernel.org/all/20231007-untapped-masses-01f80b7c13c7@spud/
> Then "loongson,ls1b-nfc" became the fallback.

You cannot allow 'the fallback', alone. But this is what you do above.
Below description is fine. Just don't allow the ls1b-nfc compatible
alone.

Thanks,
Miquèl