On Wed, Jul 14, 2021 at 10:26:39AM +0200, Linus Walleij wrote: > On Mon, Jul 12, 2021 at 4:16 PM Maxime Ripard wrote: > > > > maxItems is set, but not minItems. > > > > Yeah, and if one is missing the other is added with the value of the > > other. > > > > What the schema enforces currently is that (for the common part) the > > interrupt list can be between 1 and 2 and then for a specific set of > > compatibles (including the LIS3MDL) it has to be exactly 2. > > maxItems is not an intuitive naming to what it does so it creates > bugs like this :/ I mean, it's complicated. Both minItems and maxItems are required for all the items in the schema spec. In order to reduce the boilerplate, the tooling will add the other if one is missing, which can lead to things like this indeed. But the alternative is not really to just optionally use minItems, it's to have to always specify it, in all the schemas. > Can you fix so it works with your PinePhone DTS and send a patch? > Perhaps also add as an example so it doesn't happen again? Yeah, I can definitely do that, I'm not really sure what makes sense for the driver at this point though. > > Even the common part looks weird though, it says that it can handle up > > to three interrupts but has maxItems: 2? > > Maybe just drop maxItems for now? Dropping minItems and maxItems on interrupts will enforce that there's only one interrupt, which isn't want we want either Maxime