Lines Matching refs:phy_addr
57 static int fixed_mdio_read(struct mii_bus *bus, int phy_addr, int reg_num) in fixed_mdio_read() argument
63 if (fp->addr == phy_addr) { in fixed_mdio_read()
85 static int fixed_mdio_write(struct mii_bus *bus, int phy_addr, int reg_num, in fixed_mdio_write() argument
118 int fixed_phy_add(unsigned int irq, int phy_addr, in fixed_phy_add() argument
137 fmb->mii_bus->irq[phy_addr] = irq; in fixed_phy_add()
139 fp->addr = phy_addr; in fixed_phy_add()
164 static void fixed_phy_del(int phy_addr) in fixed_phy_del() argument
170 if (fp->addr == phy_addr) { in fixed_phy_del()
175 ida_simple_remove(&phy_fixed_ida, phy_addr); in fixed_phy_del()
188 int phy_addr; in fixed_phy_register() local
195 phy_addr = ida_simple_get(&phy_fixed_ida, 0, PHY_MAX_ADDR, GFP_KERNEL); in fixed_phy_register()
196 if (phy_addr < 0) in fixed_phy_register()
197 return ERR_PTR(phy_addr); in fixed_phy_register()
199 ret = fixed_phy_add(irq, phy_addr, status, link_gpio); in fixed_phy_register()
201 ida_simple_remove(&phy_fixed_ida, phy_addr); in fixed_phy_register()
205 phy = get_phy_device(fmb->mii_bus, phy_addr, false); in fixed_phy_register()
207 fixed_phy_del(phy_addr); in fixed_phy_register()
240 fixed_phy_del(phy_addr); in fixed_phy_register()