Re: [PATCH v3 2/6] dt-binding: pinctrl: pinctrl-max77620: convert to DT schema

From: Rob Herring

Date: Wed Mar 11 2026 - 18:11:29 EST


On Sat, Mar 07, 2026 at 03:30:21PM +0200, Svyatoslav Ryhel wrote:
> сб, 7 бер. 2026 р. о 14:48 Krzysztof Kozlowski <krzk@xxxxxxxxxx> пише:
> >
> > On Fri, Mar 06, 2026 at 03:33:47PM +0200, Svyatoslav Ryhel wrote:
> > > Convert pinctrl-max77620 devicetree bindings for the MAX77620 PMIC from
> > > TXT to YAML format. This patch does not change any functionality; the
> > > bindings remain the same.
> > >
> > > Signed-off-by: Svyatoslav Ryhel <clamor95@xxxxxxxxx>
> > > ---
> > > .../pinctrl/maxim,max77620-pinctrl.yaml | 97 +++++++++++++
> > > .../bindings/pinctrl/pinctrl-max77620.txt | 127 ------------------
> > > 2 files changed, 97 insertions(+), 127 deletions(-)
> > > create mode 100644 Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml
> > > delete mode 100644 Documentation/devicetree/bindings/pinctrl/pinctrl-max77620.txt
> > >
> > > diff --git a/Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml
> > > new file mode 100644
> > > index 000000000000..7364a8bdd7d3
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/pinctrl/maxim,max77620-pinctrl.yaml
> > > @@ -0,0 +1,97 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/pinctrl/maxim,max77620-pinctrl.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Pinmux controller function for Maxim MAX77620 Power management IC
> > > +
> > > +maintainers:
> > > + - Svyatoslav Ryhel <clamor95@xxxxxxxxx>
> > > +
> > > +description:
> > > + Device has 8 GPIO pins which can be configured as GPIO as well as the
> > > + special IO functions.
> > > +
> > > +allOf:
> > > + - $ref: /schemas/pinctrl/pincfg-node.yaml
> > > + - $ref: /schemas/pinctrl/pinmux-node.yaml
> > > +
> > > +patternProperties:
> > > + "^(pin_gpio|gpio)[0-7_]+$":
> >
> > Underscores are not allowed in general, so pattern needs fixes. Does
> > anything actually rely on this name? Is this ABI? I don't see old
> > binding and driver using the name, thus this should be just ^pin-[0-7]$
> > (+ is also not correct if you have max 8 gpios)
> >
>
> Old txt schema uses pin_gpio[0-7] hence it is here, but greping trees
> did not reveal use of pin_gpio so it may be dropped.
>
> No this is not ABI, name may be any. Including gpio0-1-2-3, gpio2-4
> etc which is why + is there. or maybe you know better way to cover
> those names?
>
> There are device trees which use gpio5_6 with the underscore
> (tegra210-smaug.dts; tegra210-p2894.dtsi for example). Should the
> schema account for those?

Defining a specific pattern looks like an endorsement of the name. I
would just do the minimum you need. Something like '^(pin|gpio).' unless
you have a pinctrl-* property.

Rob