[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20191231080002.efq3yeomzktepegk@hendrix.lan>
Date: Tue, 31 Dec 2019 09:00:02 +0100
From: Maxime Ripard <mripard@...nel.org>
To: saravanan sekar <sravanhome@...il.com>
Cc: lgirdwood@...il.com, broonie@...nel.org, robh+dt@...nel.org,
mark.rutland@....com, shawnguo@...nel.org, heiko@...ech.de,
sam@...nborg.org, icenowy@...c.io,
laurent.pinchart@...asonboard.com, gregkh@...uxfoundation.org,
Jonathan.Cameron@...wei.com, davem@...emloft.net,
mchehab+samsung@...nel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/4] dt-bindings: regulator: add document bindings for
mpq7920
On Thu, Dec 26, 2019 at 11:23:36PM +0100, saravanan sekar wrote:
> > > + mps,inc-off-time:
> > > + description: |
> > > + mutually exclusive to mps,fixed-off-time an array of 8, linearly increase
> > > + output delay during power off sequence based on factor of time slot/interval
> > > + for each regulator.
> > > + allOf:
> > > + - $ref: "/schemas/types.yaml#/definitions/uint8-array"
> > > + - minimum: 0
> > > + - maximum: 15
> > > + - default: [ 0, 6, 0, 6, 7, 7, 7, 9 ]
> > You should check the size of the array too, but if it's a property of
> > the regulators, why not have it in the regulators node?
>
> the node regulators & sub-node of regulators are parsed (initdata) by
> regulator framework during regulator registration,
> so it would be redundant parsing all the node if mentioned under each
> regulator node and this is optional. If you still not
> convinced I will change.
It's not really redundant, since the regulator framework will ignore
whatever custom property you would put there, and your driver would
ignore any generic property in those nodes.
> > > + regulators:
> > > + type: object
> > > + description:
> > > + list of regulators provided by this controller, must be named
> > > + after their hardware counterparts BUCK[1-4], one LDORTC, and LDO[2-5]
> > > + The valid names for regulators are
> > > + buck1, buck2, buck3, buck4, ldortc, ldo2, ldo3, ldo4, ldo5
> > For the third times now, the names should be validated using
> > propertyNames.
>
> Not sure did I understand your question correctly.
> all the node name under regulators node are parsed by regulator
> framework & validated against
> name in regulator descriptors.
Yes, and the point of the bindings in YAML is to make sure all the
constraints we might have can be catched at compilation / validation
time.
The names of the nodes are a constraint, and propertyNames allows you
to express it.
Maxime
Powered by blists - more mailing lists