mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Buday Csaba <buday.csaba@prolan.hu>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] net: mdio: common handling of phy reset properties
Date: Mon, 13 Oct 2025 16:13:38 +0200	[thread overview]
Message-ID: <91eda093-0adc-4fa4-9b36-5c71d71d98b0@lunn.ch> (raw)
In-Reply-To: <20251013135557.62949-1-buday.csaba@prolan.hu>

> +/**
> + * mdio_device_register_reset - Read and initialize the reset properties of
> + *				an mdio device
> + * @mdiodev: mdio_device structure
> + */
> +int mdio_device_register_reset(struct mdio_device *mdiodev)
> +{
> +	struct reset_control *reset;
> +
> +	/* Read optional firmware properties */
> +	fwnode_property_read_u32(dev_fwnode(&mdiodev->dev), "reset-assert-us",
> +				 &mdiodev->reset_assert_delay);
> +	fwnode_property_read_u32(dev_fwnode(&mdiodev->dev), "reset-deassert-us",
> +				 &mdiodev->reset_deassert_delay);
> +

device_property_read_u32() would be better here. But i can see why you
kept fwnode_property_read_u32() it makes it easier to see that there
have not been any code changes. So maybe add a patch 2/3 to convert
this?

> +/**
> + * mdio_device_unregister_reset - uninitialize the reset properties of
> + *				  an mdio device
> + * @mdiodev: mdio_device structure
> + */
> +int mdio_device_unregister_reset(struct mdio_device *mdiodev)
> +{
> +	gpiod_put(mdiodev->reset_gpio);
> +	reset_control_put(mdiodev->reset_ctrl);

Both of these return void, so you should make this function a void as
well.

    Andrew

---
pw-bot: cr

      parent reply	other threads:[~2025-10-13 14:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-13 13:55 Buday Csaba
2025-10-13 13:55 ` [PATCH 2/2] net: mdio: reset PHY before attempting to access registers in fwnode_mdiobus_register_phy Buday Csaba
2025-10-13 14:31   ` Maxime Chevallier
2025-10-15  9:07     ` Buday Csaba
2025-10-15  9:48       ` Russell King (Oracle)
2025-10-13 14:13 ` Andrew Lunn [this message]

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=91eda093-0adc-4fa4-9b36-5c71d71d98b0@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=buday.csaba@prolan.hu \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®