Thread (7 messages) 7 messages, 3 authors, 2025-11-17

Re: [PATCH net-next v2 1/3] net: mdio: move device reset functions to mdio_device.c

From: Andrew Lunn <andrew@lunn.ch>
Date: 2025-11-17 13:49:01
Also in: lkml

On Mon, Nov 17, 2025 at 01:22:32PM +0100, Buday Csaba wrote:
On Mon, Nov 17, 2025 at 09:34:49AM +0000, Russell King (Oracle) wrote:
quoted
On Mon, Nov 17, 2025 at 10:28:51AM +0100, Buday Csaba wrote:
quoted
diff --git a/include/linux/mdio.h b/include/linux/mdio.h
index 42d6d47e4..1322d2623 100644
--- a/include/linux/mdio.h
+++ b/include/linux/mdio.h
@@ -92,6 +92,8 @@ void mdio_device_free(struct mdio_device *mdiodev);
 struct mdio_device *mdio_device_create(struct mii_bus *bus, int addr);
 int mdio_device_register(struct mdio_device *mdiodev);
 void mdio_device_remove(struct mdio_device *mdiodev);
+int mdio_device_register_gpiod(struct mdio_device *mdiodev);
+int mdio_device_register_reset(struct mdio_device *mdiodev);
These are private functions to the mdio code living in drivers/net/phy,
so I wonder whether we want to have drivers/net/phy/mdio.h for these to
discourage other code calling these?
I completely agree with that, but that file does not exist yet.
Is it worth creating just for the sake of these two functions?
The effort of creating such a file is much smaller than cleaning up
the mess when somebody uses them inappropriately.

Maybe drivers/net/phy/mdio.h is too open,
drivers/net/phy/mdio-private.h would be better, since these are
supposed to only be used by the core, not PHY drivers.

	Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help