All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J. Neuschäfer" <j.ne@posteo.net>
To: Rob Herring <robh@kernel.org>
Cc: "J. Neuschäfer" <j.ne@posteo.net>,
	"Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Claudiu Manoil" <claudiu.manoil@nxp.com>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] dt-bindings: net: Convert fsl,gianfar-{mdio,tbi} to YAML
Date: Wed, 26 Feb 2025 14:59:06 +0000	[thread overview]
Message-ID: <Z78sOtFfNC8i2amq@probook> (raw)
In-Reply-To: <20250226133114.GA1771231-robh@kernel.org>

On Wed, Feb 26, 2025 at 07:31:14AM -0600, Rob Herring wrote:
> On Tue, Feb 25, 2025 at 11:12:42AM +0000, J. Neuschäfer wrote:
> > On Mon, Feb 24, 2025 at 08:58:19PM +0000, J. Neuschäfer wrote:
> > > On Fri, Feb 21, 2025 at 10:36:51AM -0600, Rob Herring wrote:
> > > > On Thu, Feb 20, 2025 at 06:29:21PM +0100, J. Neuschäfer wrote:
> > > > > Move the information related to the Freescale Gianfar (TSEC) MDIO bus
> > > > > and the Ten-Bit Interface (TBI) from fsl-tsec-phy.txt to a new binding
> > > > > file in YAML format, fsl,gianfar-mdio.yaml.
> > > > > 
> > > > > Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
> > > > > ---
> > > [...]
> > > > > +properties:
> > > > > +  compatible:
> > > > > +    enum:
> > > > > +      - fsl,gianfar-tbi
> > > > > +      - fsl,gianfar-mdio
> > > > > +      - fsl,etsec2-tbi
> > > > > +      - fsl,etsec2-mdio
> > > > > +      - fsl,ucc-mdio
> > > > > +      - gianfar
> > > > 
> > > > Can you just comment out this to avoid the duplicate issue.
> > > > 
> > > > Though I think if you write a custom 'select' which looks for 
> > > > 'device_type = "mdio"' with gianfar compatible and similar in the other 
> > > > binding, then the warning will go away. 
> > > 
> > > I'm not sure how the 'select' syntax works, is there a reference
> > > document I could read?
> > 
> > Ok, I think I figured it out, this seems to work as intended:
> > 
> 
> Looks pretty good.
> 
> > 
> > select:
> >   oneOf:
> >     - properties:
> >         compatible:
> 
> Add "contains" here. That way if someone puts another string in with 
> these we still match and then throw a warning.

Good idea.

> 
> >           enum:
> >             - fsl,gianfar-tbi
> >             - fsl,gianfar-mdio
> >             - fsl,etsec2-tbi
> >             - fsl,etsec2-mdio
> >             - fsl,ucc-mdio
> > 
> >       required:
> >         - compatible
> > 
> >     - properties:
> >         compatible:
> >           enum:
> >             - gianfar
> >             - ucc_geth_phy
> 
> You could move ucc_geth_phy because there's not a collision with it.

ucc_geth_phy also requires device_type = "mdio". It is more compact
to write it like this, but perhaps clarity wins out here, and this
requirement should be expressed with an "if:"?

> Add a comment somewhere that this is all because of a reuse of gianfar.

Will do.

> 
> >         device_type:
> >           const: mdio
> > 
> >       required:
> >         - compatible
> >         - device_type
> 
> You can move 'required: [compatible]' out of the oneOf.

Will do.


Thanks,
J. Neuschäfer

  reply	other threads:[~2025-02-26 14:59 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-20 17:29 [PATCH 0/3] net: Convert Gianfar (Triple Speed Ethernet Controller) bindings to YAML J. Neuschäfer
2025-02-20 17:29 ` J. Neuschäfer via B4 Relay
2025-02-20 17:29 ` [PATCH 1/3] dt-bindings: net: Convert fsl,gianfar-{mdio,tbi} " J. Neuschäfer
2025-02-20 17:29   ` J. Neuschäfer via B4 Relay
2025-02-21 16:36   ` Rob Herring
2025-02-24 20:58     ` J. Neuschäfer
2025-02-25 11:12       ` J. Neuschäfer
2025-02-26 13:31         ` Rob Herring
2025-02-26 14:59           ` J. Neuschäfer [this message]
2025-02-28 13:38             ` Rob Herring
2025-02-20 17:29 ` [PATCH 2/3] dt-bindings: net: fsl,gianfar-mdio: Update information about TBI J. Neuschäfer
2025-02-20 17:29   ` J. Neuschäfer via B4 Relay
2025-02-21 23:23   ` Rob Herring (Arm)
2025-02-20 17:29 ` [PATCH 3/3] dt-bindings: net: Convert fsl,gianfar to YAML J. Neuschäfer
2025-02-20 17:29   ` J. Neuschäfer via B4 Relay
2025-02-20 18:02   ` Andrew Lunn
2025-02-21 11:51     ` J. Neuschäfer
2025-02-20 19:01   ` Rob Herring (Arm)
2025-02-21 23:35   ` Rob Herring
2025-02-25 10:44     ` J. Neuschäfer
2025-02-28 13:52       ` Rob Herring
2025-02-27 13:10   ` kernel test robot

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=Z78sOtFfNC8i2amq@probook \
    --to=j.ne@posteo.net \
    --cc=andrew+netdev@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.