Lines Matching refs:cphy

7 static int my3126_reset(struct cphy *cphy, int wait)  in my3126_reset()  argument
16 static int my3126_interrupt_enable(struct cphy *cphy) in my3126_interrupt_enable() argument
18 schedule_delayed_work(&cphy->phy_update, HZ/30); in my3126_interrupt_enable()
19 t1_tpi_read(cphy->adapter, A_ELMER0_GPO, &cphy->elmer_gpo); in my3126_interrupt_enable()
23 static int my3126_interrupt_disable(struct cphy *cphy) in my3126_interrupt_disable() argument
25 cancel_delayed_work_sync(&cphy->phy_update); in my3126_interrupt_disable()
29 static int my3126_interrupt_clear(struct cphy *cphy) in my3126_interrupt_clear() argument
36 static int my3126_interrupt_handler(struct cphy *cphy) in my3126_interrupt_handler() argument
43 adapter = cphy->adapter; in my3126_interrupt_handler()
45 if (cphy->count == 50) { in my3126_interrupt_handler()
46 cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_STAT1, &val); in my3126_interrupt_handler()
48 status = cphy->bmsr ^ val16; in my3126_interrupt_handler()
52 cphy->bmsr = val16; in my3126_interrupt_handler()
57 cphy->count = 0; in my3126_interrupt_handler()
70 cphy->elmer_gpo = val; in my3126_interrupt_handler()
73 (cphy->act_count == act_count) || cphy->act_on ) { in my3126_interrupt_handler()
78 cphy->act_on = 0; in my3126_interrupt_handler()
84 cphy->act_on = 1; in my3126_interrupt_handler()
89 cphy->elmer_gpo = val; in my3126_interrupt_handler()
90 cphy->act_count = act_count; in my3126_interrupt_handler()
91 cphy->count++; in my3126_interrupt_handler()
98 struct cphy *cphy = container_of(work, struct cphy, phy_update.work); in my3216_poll() local
100 my3126_interrupt_handler(cphy); in my3216_poll()
103 static int my3126_set_loopback(struct cphy *cphy, int on) in my3126_set_loopback() argument
109 static int my3126_get_link_status(struct cphy *cphy, in my3126_get_link_status() argument
116 adapter = cphy->adapter; in my3126_get_link_status()
117 cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_STAT1, &val); in my3126_get_link_status()
122 cphy->elmer_gpo = val; in my3126_get_link_status()
141 cphy->elmer_gpo = val; in my3126_get_link_status()
152 static void my3126_destroy(struct cphy *cphy) in my3126_destroy() argument
154 kfree(cphy); in my3126_destroy()
170 static struct cphy *my3126_phy_create(struct net_device *dev, in my3126_phy_create()
173 struct cphy *cphy = kzalloc(sizeof (*cphy), GFP_KERNEL); in my3126_phy_create() local
175 if (!cphy) in my3126_phy_create()
178 cphy_init(cphy, dev, phy_addr, &my3126_ops, mdio_ops); in my3126_phy_create()
179 INIT_DELAYED_WORK(&cphy->phy_update, my3216_poll); in my3126_phy_create()
180 cphy->bmsr = 0; in my3126_phy_create()
182 return cphy; in my3126_phy_create()