X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=include%2Fmiiphy.h;h=9b97d09f186ba09100e9999a5553439f8fe8035f;hb=8880edba06d5deb52ebca7c3eb1bbdcdcc8ec2b6;hp=e6dd441983f2ab5447f103ede4d0682397591246;hpb=c38ac2893cc8f56365ab1084b2c5b06fc31dd697;p=oweals%2Fu-boot.git 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