• Home
  • Raw
  • Download

Lines Matching refs:fp

52 	struct fixed_phy *fp;  in fixed_phy_change_carrier()  local
57 list_for_each_entry(fp, &fmb->phys, node) { in fixed_phy_change_carrier()
58 if (fp->addr == phydev->mdio.addr) { in fixed_phy_change_carrier()
59 fp->no_carrier = !new_carrier; in fixed_phy_change_carrier()
67 static void fixed_phy_update(struct fixed_phy *fp) in fixed_phy_update() argument
69 if (!fp->no_carrier && fp->link_gpiod) in fixed_phy_update()
70 fp->status.link = !!gpiod_get_value_cansleep(fp->link_gpiod); in fixed_phy_update()
76 struct fixed_phy *fp; in fixed_mdio_read() local
78 list_for_each_entry(fp, &fmb->phys, node) { in fixed_mdio_read()
79 if (fp->addr == phy_addr) { in fixed_mdio_read()
82 fp->status.link = !fp->no_carrier; in fixed_mdio_read()
85 if (fp->link_update) in fixed_mdio_read()
86 fp->link_update(fp->phydev->attached_dev, in fixed_mdio_read()
87 &fp->status); in fixed_mdio_read()
90 fixed_phy_update(fp); in fixed_mdio_read()
91 state = fp->status; in fixed_mdio_read()
116 struct fixed_phy *fp; in fixed_phy_set_link_update() local
121 list_for_each_entry(fp, &fmb->phys, node) { in fixed_phy_set_link_update()
122 if (fp->addr == phydev->mdio.addr) { in fixed_phy_set_link_update()
123 fp->link_update = link_update; in fixed_phy_set_link_update()
124 fp->phydev = phydev; in fixed_phy_set_link_update()
139 struct fixed_phy *fp; in fixed_phy_add_gpiod() local
145 fp = kzalloc(sizeof(*fp), GFP_KERNEL); in fixed_phy_add_gpiod()
146 if (!fp) in fixed_phy_add_gpiod()
152 fp->addr = phy_addr; in fixed_phy_add_gpiod()
153 fp->status = *status; in fixed_phy_add_gpiod()
154 fp->link_gpiod = gpiod; in fixed_phy_add_gpiod()
156 fixed_phy_update(fp); in fixed_phy_add_gpiod()
158 list_add_tail(&fp->node, &fmb->phys); in fixed_phy_add_gpiod()
175 struct fixed_phy *fp, *tmp; in fixed_phy_del() local
177 list_for_each_entry_safe(fp, tmp, &fmb->phys, node) { in fixed_phy_del()
178 if (fp->addr == phy_addr) { in fixed_phy_del()
179 list_del(&fp->node); in fixed_phy_del()
180 if (fp->link_gpiod) in fixed_phy_del()
181 gpiod_put(fp->link_gpiod); in fixed_phy_del()
182 kfree(fp); in fixed_phy_del()
375 struct fixed_phy *fp, *tmp; in fixed_mdio_bus_exit() local
381 list_for_each_entry_safe(fp, tmp, &fmb->phys, node) { in fixed_mdio_bus_exit()
382 list_del(&fp->node); in fixed_mdio_bus_exit()
383 kfree(fp); in fixed_mdio_bus_exit()