From: Marek Vasut <marex@nabladev.com>
To: Frank Li <Frank.li@oss.nxp.com>
Cc: netdev@vger.kernel.org, Vladimir Oltean <vladimir.oltean@nxp.com>,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Clark Wang <xiaoning.wang@nxp.com>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
Conor Dooley <conor+dt@kernel.org>,
Eric Dumazet <edumazet@kernel.org>, Frank Li <Frank.Li@nxp.com>,
Jakub Kicinski <kuba@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh@kernel.org>,
UNGLinuxDriver@microchip.com, Wei Fang <wei.fang@nxp.com>,
devicetree@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [net-next,PATCH 2/2] enetc: Make eMDIO MDC rate configurable from DT
Date: Sat, 17 Oct 2026 00:04:14 +0200 [thread overview]
Message-ID: <329d56ac-00ce-4fb6-87fc-eeb14ed78959@nabladev.com> (raw)
In-Reply-To: <atKDNdxl0w65s8yQ@SMW015318>
On 10/16/26 10:04 PM, Frank Li wrote:
[...]
>> +int enetc_mdio_update_mdc_div(struct mii_bus *bus)
>> +{
>> + struct enetc_mdio_priv *mdio_priv = bus->priv;
>> + struct device *dev = bus->parent;
>> + struct clk *enet_clk;
>> + u32 div, mdc_freq;
>> +
>> + if (device_property_read_u32(dev, "clock-frequency", &mdc_freq))
>> + return 0;
>> +
>> + enet_clk = devm_clk_get(dev, NULL);
>> + if (IS_ERR(enet_clk))
>> + return dev_err_probe(dev, PTR_ERR(enet_clk),
>> + "Input clock unknown, not changing MDC frequency\n");
>
> binding said clock is optional. If return failure here, it will block
> existing dts, which have not clock property.
>
> should be devm_clk_get_optional()?
Existing DTs are fine, since they don't define clock-frequency property.
And whoever wants to define clock-frequency property, they also must
provide clock property.
next prev parent reply other threads:[~2026-10-17 17:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 19:32 [net-next,PATCH 1/2] dt-bindings: net: enetc-mdio: Document optional MDC clock Marek Vasut
2026-10-16 19:32 ` [net-next,PATCH 2/2] enetc: Make eMDIO MDC rate configurable from DT Marek Vasut
2026-10-16 20:04 ` Frank Li
2026-10-16 22:04 ` Marek Vasut [this message]
2026-10-17 2:24 ` Wei Fang
2026-10-17 17:30 ` Marek Vasut
2026-10-16 20:59 ` Andrew Lunn
2026-10-16 22:26 ` Marek Vasut
2026-10-17 17:39 ` Andrew Lunn
2026-10-16 19:59 ` [net-next,PATCH 1/2] dt-bindings: net: enetc-mdio: Document optional MDC clock Frank Li
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=329d56ac-00ce-4fb6-87fc-eeb14ed78959@nabladev.com \
--to=marex@nabladev.com \
--cc=Frank.Li@nxp.com \
--cc=Frank.li@oss.nxp.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew+netdev@lunn.ch \
--cc=chleroy@kernel.org \
--cc=claudiu.manoil@nxp.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@kernel.org \
--cc=imx@lists.linux.dev \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=vladimir.oltean@nxp.com \
--cc=wei.fang@nxp.com \
--cc=xiaoning.wang@nxp.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