Lines Matching refs:phy_addr
73 static int fixed_mdio_read(struct mii_bus *bus, int phy_addr, int reg_num) in fixed_mdio_read() argument
79 if (fp->addr == phy_addr) { in fixed_mdio_read()
100 static int fixed_mdio_write(struct mii_bus *bus, int phy_addr, int reg_num, in fixed_mdio_write() argument
133 static int fixed_phy_add_gpiod(unsigned int irq, int phy_addr, in fixed_phy_add_gpiod() argument
150 fmb->mii_bus->irq[phy_addr] = irq; in fixed_phy_add_gpiod()
152 fp->addr = phy_addr; in fixed_phy_add_gpiod()
163 int fixed_phy_add(unsigned int irq, int phy_addr, in fixed_phy_add() argument
166 return fixed_phy_add_gpiod(irq, phy_addr, status, NULL); in fixed_phy_add()
172 static void fixed_phy_del(int phy_addr) in fixed_phy_del() argument
178 if (fp->addr == phy_addr) { in fixed_phy_del()
183 ida_free(&phy_fixed_ida, phy_addr); in fixed_phy_del()
233 int phy_addr; in __fixed_phy_register() local
247 phy_addr = ida_alloc_max(&phy_fixed_ida, PHY_MAX_ADDR - 1, GFP_KERNEL); in __fixed_phy_register()
248 if (phy_addr < 0) in __fixed_phy_register()
249 return ERR_PTR(phy_addr); in __fixed_phy_register()
251 ret = fixed_phy_add_gpiod(irq, phy_addr, status, gpiod); in __fixed_phy_register()
253 ida_free(&phy_fixed_ida, phy_addr); in __fixed_phy_register()
257 phy = get_phy_device(fmb->mii_bus, phy_addr, false); in __fixed_phy_register()
259 fixed_phy_del(phy_addr); in __fixed_phy_register()
303 fixed_phy_del(phy_addr); in __fixed_phy_register()