From: Linus Walleij <linus.walleij@linaro.org>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Lee Jones <lee.jones@linaro.org>, Mark Brown <broonie@kernel.org>,
Zhang Rui <rui.zhang@intel.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
Linux PM list <linux-pm@vger.kernel.org>,
linux-tegra@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: mfd: max77620: Convert to json-schema
Date: Tue, 7 Jul 2020 13:28:44 +0200 [thread overview]
Message-ID: <CACRpkdY=rVH03i+JsLuiDKa_BSU57ZNdBNHGv6avuC-AkPZkMQ@mail.gmail.com> (raw)
In-Reply-To: <20200609162621.1769610-1-thierry.reding@gmail.com>
Hi Thierry,
thanks for doing this!
On Tue, Jun 9, 2020 at 6:26 PM Thierry Reding <thierry.reding@gmail.com> wrote:
> delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-max77620.txt
> delete mode 100644 Documentation/devicetree/bindings/mfd/max77620.txt
> create mode 100644 Documentation/devicetree/bindings/mfd/max77620.yaml
> delete mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-max77620.txt
> delete mode 100644 Documentation/devicetree/bindings/regulator/regulator-max77620.txt
> delete mode 100644 Documentation/devicetree/bindings/thermal/max77620_thermal.txt
So everything goes in under the MFD node now I suppose (why not).
> diff --git a/Documentation/devicetree/bindings/mfd/max77620.yaml b/Documentation/devicetree/bindings/mfd/max77620.yaml
(...)
> +patternProperties:
> + "^gpio(@[0-9]+)?$":
> + type: object
> + properties:
> + gpio-hog:
> + $ref: "/schemas/types.yaml#/definitions/flag"
> +
> + output-high:
> + $ref: "/schemas/types.yaml#/definitions/flag"
> +
> + gpios:
> + $ref: "/schemas/types.yaml#/definitions/uint32-matrix"
This looks strange. ^gpio(@[0-9]+)?$ seems like the node for
the gpio-controller per se, and that should have a subnode for
the hog, but this makes it look like that hog is directly in the
gpio controller node.
The current gpio.txt lists this example:
qe_pio_a: gpio-controller@1400 {
compatible = "fsl,qe-pario-bank-a", "fsl,qe-pario-bank";
reg = <0x1400 0x18>;
gpio-controller;
#gpio-cells = <2>;
line_b {
gpio-hog;
gpios = <6 0>;
output-low;
line-name = "foo-bar-gpio";
};
};
I know I should make a generic gpio.yaml include you can just
use for all of this but you know ... time. (Volunteers welcome!)
> + "^pinmux(@[0-9]+)?$":
> + type: object
> + patternProperties:
> + "^gpio[0-7_]+$":
> + type: object
> + properties:
> + pins:
> + items:
> + pattern: "^gpio[0-7]$"
> + minItems: 1
> + maxItems: 8
> +
> + function:
> + $ref: "/schemas/types.yaml#/definitions/string"
> + enum:
> + - gpio
> + - lpm-control-in
> + - fps-out
> + - 32k-out1
> + - sd0-dvs-in
> + - sd1-dvs-in
> + - reference-out
> +
> + drive-push-pull:
> + $ref: "/schemas/types.yaml#/definitions/uint32"
> + enum: [ 0, 1 ]
> +
> + drive-open-drain:
> + $ref: "/schemas/types.yaml#/definitions/uint32"
> + enum: [ 0, 1 ]
> +
> + bias-pull-up:
> + $ref: "/schemas/types.yaml#/definitions/uint32"
> + enum: [ 0, 1 ]
> +
> + bias-pull-down:
> + $ref: "/schemas/types.yaml#/definitions/uint32"
> + enum: [ 0, 1 ]
This seems to reinvent large parts of Rob's already provided:
Documentation/devicetree/bindings/pinctrl/pinmux-node.yaml
Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml
So just $ref-include these instead. See other bindings for examples.
Since this is placed in mfd you might need some ../pinctrl... path.
Yours,
Linus Walleij
prev parent reply other threads:[~2020-07-07 11:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-09 16:26 [PATCH] dt-bindings: mfd: max77620: Convert to json-schema Thierry Reding
2020-06-09 16:31 ` Mark Brown
2020-06-18 8:28 ` Lee Jones
2020-07-07 11:28 ` Linus Walleij [this message]
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='CACRpkdY=rVH03i+JsLuiDKa_BSU57ZNdBNHGv6avuC-AkPZkMQ@mail.gmail.com' \
--to=linus.walleij@linaro.org \
--cc=bgolaszewski@baylibre.com \
--cc=broonie@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=lee.jones@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=rui.zhang@intel.com \
--cc=thierry.reding@gmail.com \
/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).