summaryrefslogtreecommitdiff
path: root/include/of.h
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2018-10-16 12:15:49 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2018-10-23 13:42:43 +0200
commit0247554a3629f59debb92e4188d45d3d98d2aded (patch)
tree8ffe726b1eef8ba47e1758d2047ffd883d1a1f91 /include/of.h
parent01c926daf58ebd18728ddcd989c5e8f20751ecae (diff)
downloadbarebox-0247554a3629f59debb92e4188d45d3d98d2aded.tar.gz
mdio_bus: Allow for non PHY-devices on MDIO buses
Instead of just creating a simple PHY device for every child of MDIO bus node, add code to check if any of them have "compatible" property set, as well as code to create a proper platform device for such cases. This change is useful for when MDIO bus and some of Ethernet ports are connected to a switch or some other MDIO device that doesn't behave like a generic PHY and can't be probed via its PHY ID. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/of.h')
-rw-r--r--include/of.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/of.h b/include/of.h
index 7fc4b7791f..184acb4741 100644
--- a/include/of.h
+++ b/include/of.h
@@ -321,6 +321,12 @@ static inline int of_set_root_node(struct device_node *node)
return -ENOSYS;
}
+static inline struct device_d *of_platform_device_create(struct device_node *np,
+ struct device_d *parent)
+{
+ return NULL;
+}
+
static inline int of_n_addr_cells(struct device_node *np)
{
return 0;