From: Jakub Kicinski <kuba@kernel.org>
To: Buday Csaba <buday.csaba@prolan.hu>
Cc: Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Philipp Zabel <p.zabel@pengutronix.de>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v4 1/4] net: mdio: common handling of phy reset properties
Date: Tue, 28 Oct 2025 18:22:40 -0700 [thread overview]
Message-ID: <20251028182240.17da8177@kernel.org> (raw)
In-Reply-To: <58dd6c6e6684e2dc8e7a97e9ebc086a1cb273735.1761124022.git.buday.csaba@prolan.hu>
Let me give you some nit picky comments, maybe v5 will have more luck
attracting area experts :(
On Wed, 22 Oct 2025 11:08:50 +0200 Buday Csaba wrote:
> Reset properties of an `mdio_device` are initialized in multiple
> source files and multiple functions:
> - `reset_assert_delay` and `reset_deassert_delay` are in
> fwnode_mdio.c
> - `reset_gpio` and `reset_ctrl` are in mdio_bus.c, but handled by
> different functions
>
> This patch unifies the handling of all these properties into two
> functions.
Use imperative mood. "This patch unifies" -> "Unify"
Please check all commits msgs for this (eg glancing at patch 2
"Changed" -> "Change")
> mdiobus_register_gpiod() and mdiobus_register_reset() are removed,
> while mdio_device_register_reset() and mdio_device_unregister_reset()
> are introduced instead.
> These functions handle both reset-controllers and reset-gpios, and
> also read the corresponding properties from the device tree.
> These changes should make tracking the reset properties easier.
> + /* reset-gpio, bring up deasserted */
> + mdiodev->reset_gpio = gpiod_get_optional(&mdiodev->dev, "reset",
> + GPIOD_OUT_LOW);
> +
no empty lines between call and its error check pls
> + if (IS_ERR(mdiodev->reset_gpio))
> + return PTR_ERR(mdiodev->reset_gpio);
> +
> + if (mdiodev->reset_gpio)
> + gpiod_set_consumer_name(mdiodev->reset_gpio, "PHY reset");
> +
> + reset = reset_control_get_optional_exclusive(&mdiodev->dev, "phy");
> + if (IS_ERR(reset))
> + return PTR_ERR(reset);
> +
> + mdiodev->reset_ctrl = reset;
> +
> + /* Assert the reset signal */
> + mdio_device_reset(mdiodev, 1);
> +
> + return 0;
> +}
next prev parent reply other threads:[~2025-10-29 1:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-22 9:08 [PATCH net-next v4 0/4] net: mdio: implement optional PHY reset before MDIO access Buday Csaba
2025-10-22 9:08 ` [PATCH net-next v4 1/4] net: mdio: common handling of phy reset properties Buday Csaba
2025-10-29 1:22 ` Jakub Kicinski [this message]
2025-10-22 9:08 ` [PATCH net-next v4 2/4] net: mdio: change property read from fwnode_property_read_u32() to device_property_read_u32() Buday Csaba
2025-10-22 9:08 ` [PATCH net-next v4 3/4] net: mdio: introduce mdio_device_has_reset() Buday Csaba
2025-10-22 9:08 ` [PATCH net-next v4 4/4] net: mdio: reset PHY before attempting to access registers in fwnode_mdiobus_register_phy Buday Csaba
2025-10-29 1:26 ` Jakub Kicinski
2025-10-29 7:24 ` Buday Csaba
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=20251028182240.17da8177@kernel.org \
--to=kuba@kernel.org \
--cc=andrew@lunn.ch \
--cc=buday.csaba@prolan.hu \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=pabeni@redhat.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 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.