summaryrefslogtreecommitdiff
path: root/include/linux/of_mdio.h
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2020-06-29 14:03:45 +0200
committerDavid S. Miller <davem@davemloft.net>2020-06-30 15:57:34 -0700
commit14eeb6e086d6b9004c600e5f0f62bacb458ecfba (patch)
treec50a619917df6ac612b4f457bbe1d53c75c337cc /include/linux/of_mdio.h
parenta0bd96f5aed2108505386733abe76f37362c2f50 (diff)
of: mdio: provide devm_of_mdiobus_register()
Implement a managed variant of of_mdiobus_register(). We need to make mdio_devres into its own module because otherwise we'd hit circular sumbol dependencies between phylib and of_mdio. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/of_mdio.h')
-rw-r--r--include/linux/of_mdio.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/of_mdio.h b/include/linux/of_mdio.h
index ba8e157f24ad..1efb88d9f892 100644
--- a/include/linux/of_mdio.h
+++ b/include/linux/of_mdio.h
@@ -8,12 +8,15 @@
#ifndef __LINUX_OF_MDIO_H
#define __LINUX_OF_MDIO_H
+#include <linux/device.h>
#include <linux/phy.h>
#include <linux/of.h>
#if IS_ENABLED(CONFIG_OF_MDIO)
bool of_mdiobus_child_is_phy(struct device_node *child);
int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np);
+int devm_of_mdiobus_register(struct device *dev, struct mii_bus *mdio,
+ struct device_node *np);
struct phy_device *of_phy_find_device(struct device_node *phy_np);
struct phy_device *
of_phy_connect(struct net_device *dev, struct device_node *phy_np,