Re: [PATCH v2 2/5] dt-bindings: media: document SK Hynix Hi-846 MIPI CSI-2 8M pixel sensor

From: Sakari Ailus
Date: Wed Jun 02 2021 - 09:52:33 EST


On Fri, May 28, 2021 at 11:35:35AM +0300, Laurent Pinchart wrote:
...
> > + maxItems: 1
> > +
> > + clocks:
> > + description: Reference to the mclk clock.
> > + maxItems: 1
>
> You could also write this
>
> clocks:
> items:
> - description: Reference to the mclk clock.
>
> The maxItems will then be implicit. This is the preferred form when
> multiple clocks are used, and given that clocks it meant to contain a
> list of clocks, even if it has a single entry, placing the description
> in a list of items may be a bit better semantically speaking.
>
> > +
> > + clock-names:
> > + const: mclk
>
> Similarly,
>
> clock-names:
> items:
> - const: mclk
>
> Rob, is standardizing this pattern a good idea, or do you prefer the
> shorter form
>
> clock-names:
> const: mclk

As there's just one clock, isn't the clock-names redundant?

--
Sakari Ailus