summaryrefslogtreecommitdiff
path: root/include/miiphy.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-07-18 20:32:07 -0400
committerTom Rini <trini@konsulko.com>2019-07-18 20:32:07 -0400
commit62a09f45ab824c5fdebf0217c774bededf223232 (patch)
tree32ad59e054f8c1640374b0eee25eb4e6695e2a16 /include/miiphy.h
parent0de815356474912ef5bef9a69f0327a5a93bb2c2 (diff)
parentbbfc562719c463ba6e7b03125aedd5720a325d2d (diff)
Merge branch 'master' of git://git.denx.de/u-boot-net
Diffstat (limited to 'include/miiphy.h')
-rw-r--r--include/miiphy.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/miiphy.h b/include/miiphy.h
index e6dd441983..9b97d09f18 100644
--- a/include/miiphy.h
+++ b/include/miiphy.h
@@ -167,4 +167,24 @@ struct phy_device *dm_mdio_phy_connect(struct udevice *dev, int addr,
#endif
+#ifdef CONFIG_DM_MDIO_MUX
+
+/* indicates none of the child buses is selected */
+#define MDIO_MUX_SELECT_NONE -1
+
+/**
+ * struct mdio_mux_ops - MDIO MUX operations
+ *
+ * @select: Selects a child bus
+ * @deselect: Clean up selection. Optional, can be NULL
+ */
+struct mdio_mux_ops {
+ int (*select)(struct udevice *mux, int cur, int sel);
+ int (*deselect)(struct udevice *mux, int sel);
+};
+
+#define mdio_mux_get_ops(dev) ((struct mdio_mux_ops *)(dev)->driver->ops)
+
+#endif
+
#endif