Re: [PATCH 1/2] net: mdio: common handling of phy reset properties

From: Andrew Lunn

Date: Mon Oct 13 2025 - 10:13:52 EST


> +/**
> + * 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