Lines Matching defs:cphy
3 #include "cphy.h"
8 static int my3126_reset(struct cphy *cphy, int wait)
17 static int my3126_interrupt_enable(struct cphy *cphy)
19 schedule_delayed_work(&cphy->phy_update, HZ/30);
20 t1_tpi_read(cphy->adapter, A_ELMER0_GPO, &cphy->elmer_gpo);
24 static int my3126_interrupt_disable(struct cphy *cphy)
26 cancel_delayed_work_sync(&cphy->phy_update);
30 static int my3126_interrupt_clear(struct cphy *cphy)
37 static int my3126_interrupt_handler(struct cphy *cphy)
44 adapter = cphy->adapter;
46 if (cphy->count == 50) {
47 cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_STAT1, &val);
49 status = cphy->bmsr ^ val16;
53 cphy->bmsr = val16;
58 cphy->count = 0;
71 cphy->elmer_gpo = val;
74 (cphy->act_count == act_count) || cphy->act_on ) {
79 cphy->act_on = 0;
85 cphy->act_on = 1;
90 cphy->elmer_gpo = val;
91 cphy->act_count = act_count;
92 cphy->count++;
99 struct cphy *cphy = container_of(work, struct cphy, phy_update.work);
101 my3126_interrupt_handler(cphy);
104 static int my3126_set_loopback(struct cphy *cphy, int on)
110 static int my3126_get_link_status(struct cphy *cphy,
117 adapter = cphy->adapter;
118 cphy_mdio_read(cphy, MDIO_MMD_PMAPMD, MDIO_STAT1, &val);
123 cphy->elmer_gpo = val;
142 cphy->elmer_gpo = val;
153 static void my3126_destroy(struct cphy *cphy)
155 kfree(cphy);
171 static struct cphy *my3126_phy_create(struct net_device *dev,
174 struct cphy *cphy = kzalloc(sizeof (*cphy), GFP_KERNEL);
176 if (!cphy)
179 cphy_init(cphy, dev, phy_addr, &my3126_ops, mdio_ops);
180 INIT_DELAYED_WORK(&cphy->phy_update, my3126_poll);
181 cphy->bmsr = 0;
183 return cphy;