RE: [PATCH V4 01/10] regulator: Update DA9121 dt-bindings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux