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(int phy_addr, const struct fixed_phy_status *status) in fixed_phy_add() argument
165 return fixed_phy_add_gpiod(PHY_POLL, phy_addr, status, NULL); in fixed_phy_add()
171 static void fixed_phy_del(int phy_addr) in fixed_phy_del() argument
177 if (fp->addr == phy_addr) { in fixed_phy_del()
182 ida_free(&phy_fixed_ida, phy_addr); in fixed_phy_del()
231 int phy_addr; in fixed_phy_register() local
243 phy_addr = ida_alloc_max(&phy_fixed_ida, PHY_MAX_ADDR - 1, GFP_KERNEL); in fixed_phy_register()
244 if (phy_addr < 0) in fixed_phy_register()
245 return ERR_PTR(phy_addr); in fixed_phy_register()
247 ret = fixed_phy_add_gpiod(PHY_POLL, phy_addr, status, gpiod); in fixed_phy_register()
249 ida_free(&phy_fixed_ida, phy_addr); in fixed_phy_register()
253 phy = get_phy_device(fmb->mii_bus, phy_addr, false); in fixed_phy_register()
255 fixed_phy_del(phy_addr); in fixed_phy_register()
299 fixed_phy_del(phy_addr); in fixed_phy_register()