From: "Vaittinen, Matti" <Matti.Vaittinen@fi.rohmeurope.com>
To: "robh@kernel.org" <robh@kernel.org>
Cc: "broonie@kernel.org" <broonie@kernel.org>,
"dmurphy@ti.com" <dmurphy@ti.com>,
"linux-leds@vger.kernel.org" <linux-leds@vger.kernel.org>,
"linux-rtc@vger.kernel.org" <linux-rtc@vger.kernel.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"alexandre.belloni@bootlin.com" <alexandre.belloni@bootlin.com>,
"mazziesaccount@gmail.com" <mazziesaccount@gmail.com>,
"mturquette@baylibre.com" <mturquette@baylibre.com>,
"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
"a.zummo@towertech.it" <a.zummo@towertech.it>,
"mark.rutland@arm.com" <mark.rutland@arm.com>,
"bgolaszewski@baylibre.com" <bgolaszewski@baylibre.com>,
"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
"lee.jones@linaro.org" <lee.jones@linaro.org>,
"sboyd@kernel.org" <sboyd@kernel.org>,
"jacek.anaszewski@gmail.com" <jacek.anaszewski@gmail.com>,
"pavel@ucw.cz" <pavel@ucw.cz>
Subject: Re: [RFC PATCH v2 02/13] dt-bindings: mfd: Document ROHM BD71828 bindings
Date: Fri, 1 Nov 2019 12:52:47 +0000 [thread overview]
Message-ID: <a8acd74fa9c6abc8c2daea9f016d035a1ef87b02.camel@fi.rohmeurope.com> (raw)
In-Reply-To: <CAL_JsqJ6kmZyfXtZy_gz_6sxgK2CTXKTcpARkaf462QiwJXYZA@mail.gmail.com>
On Thu, 2019-10-31 at 12:50 -0500, Rob Herring wrote:
> On Thu, Oct 31, 2019 at 7:54 AM Vaittinen, Matti
> <Matti.Vaittinen@fi.rohmeurope.com> wrote:
> >
> > On Wed, 2019-10-30 at 14:22 -0500, Rob Herring wrote:
> > > On Wed, Oct 30, 2019 at 3:27 AM Vaittinen, Matti
> > > <Matti.Vaittinen@fi.rohmeurope.com> wrote:
> > > > On Tue, 2019-10-29 at 14:34 -0500, Rob Herring wrote:
> > > > > On Fri, Oct 25, 2019 at 05:49:17AM +0000, Vaittinen, Matti
> > ...which brings me here. I looked at the
> > Documentation/devicetree/bindings folder and did read the 'writing-
> > bindings.txt' and 'submitting-patches.txt' from there. Then I also
> > checked the Documentation/devicetree/usage-model.txt None of which
> > helped me out. I did also open the 'writing-schema.rst' but I
> > didn't
> > read it carefully enough. Probably because I thought after reading
> > the
> > opening chapter that this described how to do actual dts in yaml.
>
> Things are a bit scattered around I'll admit. I feel like we need a
> 'start here', but the challenge is people have different starting
> points.
cross-referencing? =)
I guess that if yaml is what is expected to be used as patch format,
then we should probably mention this in submitting-patches.txt and
writing-bindings.txt. Actyually, I think that writing-bindings.txt
could be combined with writing-schema.rst - they are about the same
thing, right?
> > > There is some notion to convert the DT spec to schema and then
> > > generate the spec from the schema. Take properties, their type,
> > > and
> > > descriptions and put that back into tables for example. Would
> > > love to
> > > have someone work on that. :)
> >
> > I am glad to hear you have developed / are developing such tooling.
>
> TBC, I have not and am not. It's just an idea. There's been nothing
> done beyond experimenting if rST could be embedded into yaml.
>
> > I
> > really appreciate it. What comes to giving a helping hand - I'd
> > better
> > to stick the simple C drivers for now ;) But if I ever get the
> > feeling
> > that I don't know what to do I'll keep this in mind :] Let me do
> > some
> > calculus... Only 11 years and my youngest son will probably leave
> > our
> > house - do you think 2030 is a bit too late? Just let me know if
> > this
> > is still relevant then - and I'll buy you a beer or write a tool
> > (of
> > some kind) xD
>
> I've scheduled you in for 2030. :)
Fine. Let's see if it is a beer or a tool then :]
> > Meanwhile... I have tried to convert the BD71828 DT doc from the
> > RFC
> > patch to yaml - and I am having hard time. Especially with the
> > regulators node - which I would like to place in
> > Documentation/devicetree/bindings/regulator/rohm,bd71828-
> > regulator.yaml
> >
> > My problem is the
> > regulators {
> > buck1: BUCK1 {
> > regulator-name = "buck1";
> > regulator-min-microvolt = <500000>;
> > regulator-max-microvolt = <2000000>;
> > regulator-ramp-delay = <2500>;
> > rohm,dvs-runlvl-ctrl;
> > rohm,dvs-runlevel0-voltage = <500000>;
> > rohm,dvs-runlevel1-voltage = <506250>;
> > rohm,dvs-runlevel2-voltage = <512500>;
> > rohm,dvs-runlevel3-voltage = <518750>;
> > regulator-boot-on;
> > };
> > ...
> > };
> > node which only contains BUCKX and LDOX sub-nodes. It has no own
> > properties.
> >
> > From MFD yaml I did try:
> >
> > regulators:
> > $ref: ../regulator/rohm,bd71828-regulator.yaml
> > description:
> > List of child nodes that specify the regulators.
> >
> > and in rohm,bd71828-regulator.yaml
> >
> > I tried doing:
> >
> > patternProperties:
> > "^BUCK[1-7]$":
> > type: object
> > description:
> > Properties for single regulator.
> > properties:
> > ...
> >
> > but this fails validation as properties: is not given.
> >
> > [mvaittin@localhost linux]$ dt-doc-validate
> > Documentation/devicetree/bindings/regulator/rohm,bd71828-
> > regulator.yaml
> > /home/mvaittin/torvalds/linux/Documentation/devicetree/bindings/reg
> > ulat
> > or/rohm,bd71828-regulator.yaml: 'properties' is a required property
> >
> > If I try and add:
> >
> > properties:
> > foo: true
> >
> > patternProperties:
> > "^BUCK[1-7]$":
> > type: object
> > description:
> > Properties for single regulator.
> > properties:
> > ...
>
> That's a case of needing to adjust the meta-schema (the schema that
> checks the schemas). It's a bit overly restrictive just to try to
> contain what's allowed. I've fixed it now. Update dtschema and it
> should work now.
Thanks. At least the make dt_binding_check passed now. dt-doc-validate
is not able to locate the regulator.yaml and errors out - but it does
no longer complain about missing 'properties:'.
> BTW, what you will also need is to reference the common schema:
>
> "^BUCK[1-7]$":
> type: object
> allOf:
> - $ref: regulator.yaml#
> properties:
> rohm,dvs-runlvl-ctrl:
> type: boolean
> description: ...
> ...
Thanks for the pointers ;) I just submitted the RFC v3 :)
Br,
Matti Vaittinen
next prev parent reply other threads:[~2019-11-01 12:52 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-24 11:40 [RFC PATCH v2 00/13] Support ROHM BD71828 PMIC Matti Vaittinen
2019-10-24 11:41 ` [RFC PATCH v2 01/13] mfd: bd71828: Support ROHM BD71828 PMIC - core Matti Vaittinen
2019-10-24 11:41 ` [RFC PATCH v2 02/13] dt-bindings: mfd: Document ROHM BD71828 bindings Matti Vaittinen
2019-10-24 19:35 ` Dan Murphy
2019-10-25 5:49 ` Vaittinen, Matti
2019-10-29 12:08 ` Lee Jones
2019-10-29 19:34 ` Rob Herring
2019-10-30 8:26 ` Vaittinen, Matti
2019-10-30 19:22 ` Rob Herring
2019-10-31 12:54 ` Vaittinen, Matti
2019-10-31 17:50 ` Rob Herring
2019-11-01 12:52 ` Vaittinen, Matti [this message]
2019-11-04 19:28 ` Rob Herring
2019-10-24 11:42 ` [RFC PATCH v2 03/13] dt-bindings: regulator: Document ROHM BD71282 regulator bindings Matti Vaittinen
2019-10-24 11:44 ` [RFC PATCH v2 04/13] mfd: input: bd71828: Add power-key support Matti Vaittinen
2019-10-24 11:44 ` [RFC PATCH v2 05/13] clk: bd718x7: Support ROHM BD71828 clk block Matti Vaittinen
2019-10-28 23:32 ` Stephen Boyd
2019-10-29 6:28 ` Vaittinen, Matti
[not found] ` <20191105005541.7913220717@mail.kernel.org>
2019-11-05 8:11 ` Vaittinen, Matti
2019-10-24 11:45 ` [RFC PATCH v2 06/13] regulator: bd718x7: Split driver to common and bd718x7 specific parts Matti Vaittinen
2019-10-24 11:46 ` [RFC PATCH v2 07/13] regulator: bd71828: Basic support for ROHM bd71828 PMIC regulators Matti Vaittinen
2019-10-24 11:46 ` [RFC PATCH v2 08/13] regulator: bd71828: Add GPIO based run-level control for regulators Matti Vaittinen
2019-10-24 11:47 ` [RFC PATCH v2 09/13] regulator: bd71828: enhanced run-level support Matti Vaittinen
2019-10-24 11:47 ` [RFC PATCH v2 10/13] regulator: bd71828: Support in-kernel APIs to change run-level Matti Vaittinen
2019-10-24 11:50 ` [RFC PATCH v2 11/13] rtc: bd70528 add BD71828 support Matti Vaittinen
2019-10-24 11:50 ` [RFC PATCH v2 12/13] gpio: bd71828: Initial support for ROHM BD71828 PMIC GPIOs Matti Vaittinen
2019-10-24 11:59 ` Linus Walleij
2019-10-24 13:34 ` Vaittinen, Matti
2019-10-24 11:52 ` [RFC PATCH v2 13/13] led: bd71828: Support LED outputs on ROHM BD71828 PMIC Matti Vaittinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a8acd74fa9c6abc8c2daea9f016d035a1ef87b02.camel@fi.rohmeurope.com \
--to=matti.vaittinen@fi.rohmeurope.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=bgolaszewski@baylibre.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmurphy@ti.com \
--cc=jacek.anaszewski@gmail.com \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mazziesaccount@gmail.com \
--cc=mturquette@baylibre.com \
--cc=pavel@ucw.cz \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).