Lines Matching refs:phy_addr
75 static int fixed_mdio_read(struct mii_bus *bus, int phy_addr, int reg_num) in fixed_mdio_read() argument
81 if (fp->addr == phy_addr) { in fixed_mdio_read()
104 static int fixed_mdio_write(struct mii_bus *bus, int phy_addr, int reg_num, in fixed_mdio_write() argument
137 static int fixed_phy_add_gpiod(unsigned int irq, int phy_addr, in fixed_phy_add_gpiod() argument
156 fmb->mii_bus->irq[phy_addr] = irq; in fixed_phy_add_gpiod()
158 fp->addr = phy_addr; in fixed_phy_add_gpiod()
169 int fixed_phy_add(unsigned int irq, int phy_addr, in fixed_phy_add() argument
172 return fixed_phy_add_gpiod(irq, phy_addr, status, NULL); in fixed_phy_add()
178 static void fixed_phy_del(int phy_addr) in fixed_phy_del() argument
184 if (fp->addr == phy_addr) { in fixed_phy_del()
189 ida_simple_remove(&phy_fixed_ida, phy_addr); in fixed_phy_del()
242 int phy_addr; in __fixed_phy_register() local
256 phy_addr = ida_simple_get(&phy_fixed_ida, 0, PHY_MAX_ADDR, GFP_KERNEL); in __fixed_phy_register()
257 if (phy_addr < 0) in __fixed_phy_register()
258 return ERR_PTR(phy_addr); in __fixed_phy_register()
260 ret = fixed_phy_add_gpiod(irq, phy_addr, status, gpiod); in __fixed_phy_register()
262 ida_simple_remove(&phy_fixed_ida, phy_addr); in __fixed_phy_register()
266 phy = get_phy_device(fmb->mii_bus, phy_addr, false); in __fixed_phy_register()
268 fixed_phy_del(phy_addr); in __fixed_phy_register()
312 fixed_phy_del(phy_addr); in __fixed_phy_register()