[PATCH v2 2/2] dt-bindings: mtd: sunxi-nand: Add YAML schemas

Maxime Ripard maxime.ripard at bootlin.com
Wed Apr 3 01:49:38 PDT 2019

On Wed, Apr 03, 2019 at 03:33:42AM -0500, Rob Herring wrote:
> > The other one that might be more problematic is that it also tries to
> > validate nodes that are not enabled. For in-SoC components that don't
> > rely on anything external, it's fine, however, for components that
> > would require something that is connected on the board (like a
> > regulator, a phy, a GPIO, whatever), then we can't have all the
> > required resources in the DTSI, and boards that don't use that
> > component (and keep it disabled) will emit warning that this
> > particular property is missing.
> >
> > I've tried to look into it but couldn't find an easy fix for that in
> > the tooling, so I've opened a github issue for this. Let me know if
> > it's not appropriate.
> Yeah, I need to go look at that. Skipping disabled nodes shouldn't be
> too hard to do within the tool. This came up before I think and I've
> resisted because I don't want to skip validating at least what is
> there. Maybe the better solution would be to drop 'required' from
> schema when validating disabled nodes. (At least, I think just
> 'required' is the problem?)

I thought about something along those lines too, since indeed the only
thing that causes troube is required.

> The complication would be we'd need 2 sets of schemas and select the
> right one for each node.

You mean two instances of the schema in the tool, right? Not two
schema files? Do you expect any drawback to that (like
performance-wise maybe, if we have more schemas with more complicated
select patterns)?

> Another way to implement it would be just to filter out the warning
> messages.

That would work too I guess :)


Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20190403/75cfe620/attachment.sig>

More information about the linux-mtd mailing list