Lines Matching refs:devad

529 static void mmd_phy_indirect(struct mii_bus *bus, int phy_addr, int devad,
533 __mdiobus_write(bus, phy_addr, MII_MMD_CTRL, devad);
540 devad | MII_MMD_CTRL_NOINCR);
544 int devad, u32 regnum)
547 return __mdiobus_c45_read(bus, phy_addr, devad, regnum);
549 mmd_phy_indirect(bus, phy_addr, devad, regnum);
555 int devad, u32 regnum, u16 val)
558 return __mdiobus_c45_write(bus, phy_addr, devad, regnum, val);
560 mmd_phy_indirect(bus, phy_addr, devad, regnum);
569 * @devad: The MMD to read from (0..31)
574 int __phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum)
576 if (regnum > (u16)~0 || devad > 32)
580 return phydev->drv->read_mmd(phydev, devad, regnum);
583 phydev->is_c45, devad, regnum);
591 * @devad: The MMD to read from
596 int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum)
601 ret = __phy_read_mmd(phydev, devad, regnum);
612 * @devad: The MMD to read from
618 int __phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val)
620 if (regnum > (u16)~0 || devad > 32)
624 return phydev->drv->write_mmd(phydev, devad, regnum, val);
627 phydev->is_c45, devad, regnum, val);
635 * @devad: The MMD to read from
641 int phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val)
646 ret = __phy_write_mmd(phydev, devad, regnum, val);
657 * @devad: The MMD to read from
669 unsigned int addr_offset, int devad,
677 if (regnum > (u16)~0 || devad > 32)
680 return mmd_phy_read(phydev->mdio.bus, addr, phydev->is_c45, devad,
689 * @devad: The MMD to read from
701 unsigned int addr_offset, int devad,
710 if (regnum > (u16)~0 || devad > 32)
714 val = mmd_phy_read(phydev->mdio.bus, addr, phydev->is_c45, devad,
726 * @devad: The MMD to write to
739 unsigned int addr_offset, int devad,
747 if (regnum > (u16)~0 || devad > 32)
750 return mmd_phy_write(phydev->mdio.bus, addr, phydev->is_c45, devad,
759 * @devad: The MMD to write to
772 unsigned int addr_offset, int devad,
781 if (regnum > (u16)~0 || devad > 32)
785 ret = mmd_phy_write(phydev->mdio.bus, addr, phydev->is_c45, devad,
865 * @devad: the MMD containing register to modify
875 int __phy_modify_mmd_changed(struct phy_device *phydev, int devad, u32 regnum,
880 ret = __phy_read_mmd(phydev, devad, regnum);
888 ret = __phy_write_mmd(phydev, devad, regnum, new);
897 * @devad: the MMD containing register to modify
908 int phy_modify_mmd_changed(struct phy_device *phydev, int devad, u32 regnum,
914 ret = __phy_modify_mmd_changed(phydev, devad, regnum, mask, set);
924 * @devad: the MMD containing register to modify
933 int __phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum,
938 ret = __phy_modify_mmd_changed(phydev, devad, regnum, mask, set);
947 * @devad: the MMD containing register to modify
956 int phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum,
962 ret = __phy_modify_mmd(phydev, devad, regnum, mask, set);