From 0247554a3629f59debb92e4188d45d3d98d2aded Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Tue, 16 Oct 2018 12:15:49 -0700 Subject: 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 Signed-off-by: Sascha Hauer --- include/of.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') 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; -- cgit v1.2.3