From: Rob Herring <robh@kernel.org>
To: Kory Maincent <kory.maincent@bootlin.com>
Cc: "Kyle Swenson" <kyle.swenson@est.tech>,
"o.rempel@pengutronix.de" <o.rempel@pengutronix.de>,
"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Roland Kovács" <roland.kovacs@est.tech>,
"David Nyström" <david.nystrom@est.tech>
Subject: Re: [PATCH net-next v3 1/2] dt-bindings: net: pse-pd: Add bindings for LTC4266 PSE Controller
Date: Thu, 15 Oct 2026 14:30:36 -0500 [thread overview]
Message-ID: <20261015193036.GD5059-robh@kernel.org> (raw)
In-Reply-To: <92efb7e8-e69d-49aa-9cf7-9dc8fc0ead99@bootlin.com>
On Tue, Oct 13, 2026 at 04:57:29PM +0200, Kory Maincent wrote:
>
>
> On 10/10/26 09:30, Kyle Swenson wrote:
> > Hello Rob,
> >
> > On Wed, Oct 07, 2026 at 04:04:54PM -0500, Rob Herring wrote:
> > > On Sun, Sep 27, 2026 at 09:29:48PM +0000, Kyle Swenson wrote:
> > > > Add the LTC4266 Power Sourcing Equipment controller device tree bindings
> > > > documentation.
> > > >
> > > > Signed-off-by: Kyle Swenson <kyle.swenson@est.tech>
> > > > ---
> > > > .../bindings/net/pse-pd/lltc,ltc4266.yaml | 180 ++++++++++++++++++
> > > > 1 file changed, 180 insertions(+)
> > > > create mode 100644 Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.yaml
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.yaml b/Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.yaml
> > > > new file mode 100644
> > > > index 000000000000..e11c9d601eee
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/net/pse-pd/lltc,ltc4266.yaml
> > > > @@ -0,0 +1,180 @@
> > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > > +%YAML 1.2
> > > > +---
> > > > +$id: http://devicetree.org/schemas/net/pse-pd/lltc,ltc4266.yaml#
> > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > +
> > > > +title: Linear Technology LTC4266 Power Sourcing Equipment controller
> > > > +
> > > > +maintainers:
> > > > + - Kyle Swenson <kyle.swenson@est.tech>
> > > > +
> > > > +allOf:
> > > > + - $ref: pse-controller.yaml#
> > > > +
> > > > +properties:
> > > > + compatible:
> > > > + enum:
> > > > + - lltc,ltc4266
> > > > +
> > > > + reg:
> > > > + maxItems: 1
> > > > +
> > > > + interrupts:
> > > > + maxItems: 1
> > > > +
> > > > + channels:
> > > > + type: object
> > > > + additionalProperties: false
> > > > + description:
> > > > + Defines the 4 physical delivery channels on the controller that can be
> > > > + referenced by PSE PIs through their "pairsets" property. The actual port
> > > > + matrix mapping is created when PSE PIs reference these channels in their
> > > > + pairsets.
> > > > +
> > > > + properties:
> > > > + '#address-cells':
> > > > + const: 1
> > > > +
> > > > + '#size-cells':
> > > > + const: 0
> > > > +
> > > > + patternProperties:
> > > > + '^channel@[0-3]$':
> > > > + type: object
> > > > + additionalProperties: false
> > > > +
> > > > + properties:
> > > > + reg:
> > > > + maxItems: 1
> > > > +
> > > > + sense-resistor-micro-ohms:
> > > > + description: Sense resistor connected to the channel's MOSFET, used
> > > > + for current measurement and for overcurrent detection. The I_CUT
> > > > + and I_LIM register encodings depend on which value is fitted, so
> > > > + a wrong value programs the wrong thresholds.
> > > > + enum: [250000, 500000]
> > > > +
> > > > + required:
> > > > + - reg
> > > > + - sense-resistor-micro-ohms
> > > > +
> > > > + required:
> > > > + - '#address-cells'
> > > > + - '#size-cells'
> > > > +
> > > > + pse-pis:
> > > > + type: object
> > > > + additionalProperties: false
> > > > +
> > > > + properties:
> > > > + '#address-cells':
> > > > + const: 1
> > > > +
> > > > + '#size-cells':
> > > > + const: 0
> > > > +
> > > > + patternProperties:
> > > > + '^pse-pi@[0-3]$':
> > > > + type: object
> > > > + additionalProperties: true
> > >
> > > This cannot be true. That allows adding any property.
> > >
> >
> > So my intent with the additionalProperties: true was to avoid
> > replicating the entire pse-pis node from pse-controller.yaml.
> > Conceptually, my goal was to inherit everything from the
> > pse-controller.yaml binding, except limit the maxItems to 1 (since the
> > LTC4266 only supports power over a single PI).
> >
> > Is there a better way to express this?
>
> I think you can do something like this:
> patternProperties:
>
> '^pse-pi@[0-3]$':
>
> type: object
>
> $ref:
> pse-controller.yaml#/properties/pse-pis/patternProperties/^pse-pi@[0-9a-f]+$
>
> unevaluatedProperties: false
Yes, if you want/need to allow custom properties, like this is what I
meant.
However, it is hit or miss if a $ref to a regex works. Instead,
pse-controller.yaml would need a $defs section that the pattern and this
schema can reference. Multiple levels of nodes and allowing them to be
extended gets messy.
Rob
next prev parent reply other threads:[~2026-10-15 19:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-27 21:29 [PATCH net-next v3 0/2] net: pse-pd: Add LTC4266 PSE controller driver Kyle Swenson
2026-09-27 21:29 ` [PATCH net-next v3 1/2] dt-bindings: net: pse-pd: Add bindings for LTC4266 PSE Controller Kyle Swenson
2026-09-30 21:31 ` netdev-bot+sashiko
2026-10-07 21:04 ` Rob Herring
2026-10-10 7:30 ` Kyle Swenson
2026-10-13 14:57 ` Kory Maincent
2026-10-15 19:30 ` Rob Herring [this message]
2026-10-15 19:25 ` Rob Herring
2026-09-27 21:29 ` [PATCH net-next v3 2/2] net: pse-pd: Add LTC4266 PSE controller driver Kyle Swenson
2026-09-30 21:31 ` netdev-bot+sashiko
2026-10-05 6:00 ` Kyle Swenson
2026-10-05 9:42 ` Kory Maincent
2026-10-06 7:52 ` Kyle Swenson
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=20261015193036.GD5059-robh@kernel.org \
--to=robh@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=david.nystrom@est.tech \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=kory.maincent@bootlin.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=kyle.swenson@est.tech \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=roland.kovacs@est.tech \
/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