lkml.org 
[lkml]   [2020]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH V4 01/10] regulator: Update DA9121 dt-bindings
Date
On Mon, Dec 07, 2020 at 17:58PM, Rob Herring wrote:
> > + properties:
> > + regulator-mode:
> > + maxItems: 1
> > + description: Defined in include/dt-bindings/regulator/dlg,da9121-
> regulator.h
>
> 'regulator-mode' is defined as a property of a
> 'regulator-state-(standby|mem|disk)' child node. I don't see how you
> would use this with 'regulator-initial-mode' either.
>
> > +
> > + regulator-initial-mode:
> > + maxItems: 1
>
> 'maxItems' applies to arrays and this is not an array. What you should
> have is constraints on the values:
>
> enum: [ 0, 1, 2, 3 ]

OK, I see better now - would this be the valid way to scope them both?

properties:
regulator-state-(standby|mem|disk):
type: object

properties:
regulator-mode:
enum: [ 0, 1, 2, 3 ]
description: Defined in include/dt-bindings/regulator/dlg,da9121-regulator.h

regulator-initial-mode:
enum: [ 0, 1, 2, 3 ]
description: Defined in include/dt-bindings/regulator/dlg,da9121-regulator.h

I couldn't find a precedent in regulator yaml, and it's far removed enough from what
I see in the abstract JSON-schema documentation to make relating them tricky, even
if I had sufficient familiarity with the terminology to believe I'd properly understood that!

Perhaps I'd be better off abandoning this attempt, and just having the regulator
description mention these properties/file, like the texts for act8865 and max77802 do?

\
 
 \ /
  Last update: 2020-12-08 11:45    [W:0.042 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site