lkml.org 
[lkml]   [2021]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v8 06/34] dt-bindings: clock: tegra-car: Document new tegra-clocks sub-node
On Wed, Aug 18, 2021 at 04:44:30AM +0300, Dmitry Osipenko wrote:
> 18.08.2021 04:15, Rob Herring пишет:
> >> + tegra-clocks:
> >> + description: child nodes are the output clocks from the CAR
> >> + type: object
> >> +
> >> + patternProperties:
> >> + "^[a-z]+[0-9]+$":
> >> + type: object
> >> + properties:
> >> + compatible:
> >> + allOf:
> >> + - items:
> >> + - enum:
> >> + - nvidia,tegra20-sclk
> >> + - nvidia,tegra30-sclk
> >> + - nvidia,tegra30-pllc
> >> + - nvidia,tegra30-plle
> >> + - nvidia,tegra30-pllm
> >> + - const: nvidia,tegra-clock
> > You are saying the first string must be both one of the enums and
> > 'nvidia,tegra-clock'. You don't get an error because your pattern
> > doesn't match 'sclk'.
> >
>
> Could you please rephrase or clarify? If pattern doesn't match 'sclk',
> then it must match any other enum. I'm not sure what you're meaning.

"sclk" doesn't match "^[a-z]+[0-9]+$" because it's missing at least one
digit at the end. Perhaps that last + was supposed to be *?

>
> The 'nvidia,tegra-clock' actually could be removed since it's
> superfluous now. I'll consider the removal in v9.

It also looks like your schema was meant to be something like:

compatible:
- items:
- enum:
- nvidia,tegra20-sclk
- nvidia,tegra30-sclk
- nvidia,tegra30-pllc
- nvidia,tegra30-plle
- nvidia,tegra30-pllm
- const: nvidia,tegra-clock

Note how the const: element is indented one more level. Now this means:
one of the enumeration values, followed by the constant value. That
matches what the example has.

That said, I agree that nvidia,tegra-clock seems a bit useless. There's
really no such thing as a generic clock, they're all different in some
way.

Thierry
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-08-18 15:53    [W:0.148 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site