/linux/drivers/net/phy/ |
A D | mdio_device.c | 27 put_device(&mdiodev->dev); in mdio_device_free() 49 struct mdio_device *mdiodev; in mdio_device_create() local 52 mdiodev = kzalloc(sizeof(*mdiodev), GFP_KERNEL); in mdio_device_create() 53 if (!mdiodev) in mdio_device_create() 61 mdiodev->bus = bus; in mdio_device_create() 62 mdiodev->addr = addr; in mdio_device_create() 68 return mdiodev; in mdio_device_create() 111 device_del(&mdiodev->dev); in mdio_device_remove() 120 if (!mdiodev->reset_gpio && !mdiodev->reset_ctrl) in mdio_device_reset() 123 if (mdiodev->reset_gpio) in mdio_device_reset() [all …]
|
A D | mdio_bus.c | 46 mdiodev->reset_gpio = gpiod_get_optional(&mdiodev->dev, in mdiobus_register_gpiod() 74 if (mdiodev->bus->mdio_map[mdiodev->addr]) in mdiobus_register_device() 90 mdiodev->bus->mdio_map[mdiodev->addr] = mdiodev; in mdiobus_register_device() 98 if (mdiodev->bus->mdio_map[mdiodev->addr] != mdiodev) in mdiobus_unregister_device() 103 mdiodev->bus->mdio_map[mdiodev->addr] = NULL; in mdiobus_unregister_device() 113 if (!mdiodev) in mdiobus_get_phy() 603 if (!mdiodev) in __mdiobus_register() 606 mdiodev->device_remove(mdiodev); in __mdiobus_register() 607 mdiodev->device_free(mdiodev); in __mdiobus_register() 636 mdiodev->device_remove(mdiodev); in mdiobus_unregister() [all …]
|
A D | phy_device.c | 573 struct mdio_device *mdiodev; in phy_device_create() local 581 mdiodev = &dev->mdio; in phy_device_create() 582 mdiodev->dev.parent = &bus->dev; in phy_device_create() 583 mdiodev->dev.bus = &mdio_bus_type; in phy_device_create() 585 mdiodev->bus = bus; in phy_device_create() 587 mdiodev->addr = addr; in phy_device_create() 609 device_initialize(&mdiodev->dev); in phy_device_create() 644 put_device(&mdiodev->dev); in phy_device_create() 2945 struct mdio_device *mdiodev; in fwnode_phy_find_device() local 2948 if (!mdiodev) in fwnode_phy_find_device() [all …]
|
A D | xilinx_gmii2rgmii.c | 83 static int xgmiitorgmii_probe(struct mdio_device *mdiodev) in xgmiitorgmii_probe() argument 85 struct device *dev = &mdiodev->dev; in xgmiitorgmii_probe() 111 priv->mdio = mdiodev; in xgmiitorgmii_probe()
|
/linux/drivers/net/dsa/xrs700x/ |
A D | xrs700x_mdio.c | 27 struct mdio_device *mdiodev = context; in xrs700x_mdio_reg_read() local 28 struct device *dev = &mdiodev->dev; in xrs700x_mdio_reg_read() 34 ret = mdiodev_write(mdiodev, XRS_MDIO_IBA1, uval); in xrs700x_mdio_reg_read() 48 ret = mdiodev_read(mdiodev, XRS_MDIO_IBD); in xrs700x_mdio_reg_read() 62 struct mdio_device *mdiodev = context; in xrs700x_mdio_reg_write() local 63 struct device *dev = &mdiodev->dev; in xrs700x_mdio_reg_write() 112 priv = xrs700x_switch_alloc(&mdiodev->dev, mdiodev); in xrs700x_mdio_probe() 116 priv->regmap = devm_regmap_init(&mdiodev->dev, NULL, mdiodev, in xrs700x_mdio_probe() 124 dev_set_drvdata(&mdiodev->dev, priv); in xrs700x_mdio_probe() 144 dev_set_drvdata(&mdiodev->dev, NULL); in xrs700x_mdio_remove() [all …]
|
/linux/include/linux/ |
A D | mdio.h | 41 void (*device_free)(struct mdio_device *mdiodev); 42 void (*device_remove)(struct mdio_device *mdiodev); 79 int (*probe)(struct mdio_device *mdiodev); 82 void (*remove)(struct mdio_device *mdiodev); 85 void (*shutdown)(struct mdio_device *mdiodev); 106 void mdio_device_free(struct mdio_device *mdiodev); 109 void mdio_device_remove(struct mdio_device *mdiodev); 357 return mdiobus_read(mdiodev->bus, mdiodev->addr, regnum); in mdiodev_read() 363 return mdiobus_write(mdiodev->bus, mdiodev->addr, regnum, val); in mdiodev_write() 369 return mdiobus_modify(mdiodev->bus, mdiodev->addr, regnum, mask, set); in mdiodev_modify() [all …]
|
/linux/drivers/net/dsa/ |
A D | lan9303_mdio.c | 99 static int lan9303_mdio_probe(struct mdio_device *mdiodev) in lan9303_mdio_probe() argument 113 dev_err(&mdiodev->dev, "regmap init failed: %d\n", ret); in lan9303_mdio_probe() 118 sw_dev->device = mdiodev; in lan9303_mdio_probe() 119 dev_set_drvdata(&mdiodev->dev, sw_dev); in lan9303_mdio_probe() 120 sw_dev->chip.dev = &mdiodev->dev; in lan9303_mdio_probe() 124 ret = lan9303_probe(&sw_dev->chip, mdiodev->dev.of_node); in lan9303_mdio_probe() 133 static void lan9303_mdio_remove(struct mdio_device *mdiodev) in lan9303_mdio_remove() argument 135 struct lan9303_mdio *sw_dev = dev_get_drvdata(&mdiodev->dev); in lan9303_mdio_remove() 142 dev_set_drvdata(&mdiodev->dev, NULL); in lan9303_mdio_remove() 145 static void lan9303_mdio_shutdown(struct mdio_device *mdiodev) in lan9303_mdio_shutdown() argument [all …]
|
A D | dsa_loop.c | 298 static int dsa_loop_drv_probe(struct mdio_device *mdiodev) in dsa_loop_drv_probe() argument 300 struct dsa_loop_pdata *pdata = mdiodev->dev.platform_data; in dsa_loop_drv_probe() 312 ds->dev = &mdiodev->dev; in dsa_loop_drv_probe() 325 ds->dev = &mdiodev->dev; in dsa_loop_drv_probe() 328 ps->bus = mdiodev->bus; in dsa_loop_drv_probe() 330 dev_set_drvdata(&mdiodev->dev, ds); in dsa_loop_drv_probe() 334 dev_info(&mdiodev->dev, "%s: 0x%0x\n", in dsa_loop_drv_probe() 342 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev); in dsa_loop_drv_remove() 353 dev_set_drvdata(&mdiodev->dev, NULL); in dsa_loop_drv_remove() 358 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev); in dsa_loop_drv_shutdown() [all …]
|
A D | mv88e6060.c | 254 static int mv88e6060_probe(struct mdio_device *mdiodev) in mv88e6060_probe() argument 256 struct device *dev = &mdiodev->dev; in mv88e6060_probe() 265 priv->bus = mdiodev->bus; in mv88e6060_probe() 266 priv->sw_addr = mdiodev->addr; in mv88e6060_probe() 289 static void mv88e6060_remove(struct mdio_device *mdiodev) in mv88e6060_remove() argument 291 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev); in mv88e6060_remove() 298 dev_set_drvdata(&mdiodev->dev, NULL); in mv88e6060_remove() 301 static void mv88e6060_shutdown(struct mdio_device *mdiodev) in mv88e6060_shutdown() argument 303 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev); in mv88e6060_shutdown() 310 dev_set_drvdata(&mdiodev->dev, NULL); in mv88e6060_shutdown()
|
A D | mt7530.c | 3192 mt7530_probe(struct mdio_device *mdiodev) in mt7530_probe() argument 3197 dn = mdiodev->dev.of_node; in mt7530_probe() 3207 priv->ds->dev = &mdiodev->dev; in mt7530_probe() 3227 priv->info = of_device_get_match_data(&mdiodev->dev); in mt7530_probe() 3267 priv->bus = mdiodev->bus; in mt7530_probe() 3268 priv->dev = &mdiodev->dev; in mt7530_probe() 3272 dev_set_drvdata(&mdiodev->dev, priv); in mt7530_probe() 3278 mt7530_remove(struct mdio_device *mdiodev) in mt7530_remove() argument 3302 dev_set_drvdata(&mdiodev->dev, NULL); in mt7530_remove() 3305 static void mt7530_shutdown(struct mdio_device *mdiodev) in mt7530_shutdown() argument [all …]
|
A D | qca8k.c | 2059 qca8k_sw_probe(struct mdio_device *mdiodev) in qca8k_sw_probe() argument 2071 priv->bus = mdiodev->bus; in qca8k_sw_probe() 2072 priv->dev = &mdiodev->dev; in qca8k_sw_probe() 2097 priv->ds->dev = &mdiodev->dev; in qca8k_sw_probe() 2103 dev_set_drvdata(&mdiodev->dev, priv); in qca8k_sw_probe() 2109 qca8k_sw_remove(struct mdio_device *mdiodev) in qca8k_sw_remove() argument 2111 struct qca8k_priv *priv = dev_get_drvdata(&mdiodev->dev); in qca8k_sw_remove() 2122 dev_set_drvdata(&mdiodev->dev, NULL); in qca8k_sw_remove() 2125 static void qca8k_sw_shutdown(struct mdio_device *mdiodev) in qca8k_sw_shutdown() argument 2127 struct qca8k_priv *priv = dev_get_drvdata(&mdiodev->dev); in qca8k_sw_shutdown() [all …]
|
/linux/drivers/net/dsa/microchip/ |
A D | ksz8863_smi.c | 141 static int ksz8863_smi_probe(struct mdio_device *mdiodev) in ksz8863_smi_probe() argument 153 ksz8->priv = mdiodev; in ksz8863_smi_probe() 155 dev = ksz_switch_alloc(&mdiodev->dev, ksz8); in ksz8863_smi_probe() 162 dev->regmap[i] = devm_regmap_init(&mdiodev->dev, in ksz8863_smi_probe() 167 dev_err(&mdiodev->dev, in ksz8863_smi_probe() 174 if (mdiodev->dev.platform_data) in ksz8863_smi_probe() 175 dev->pdata = mdiodev->dev.platform_data; in ksz8863_smi_probe() 183 dev_set_drvdata(&mdiodev->dev, dev); in ksz8863_smi_probe() 190 struct ksz_device *dev = dev_get_drvdata(&mdiodev->dev); in ksz8863_smi_remove() 195 dev_set_drvdata(&mdiodev->dev, NULL); in ksz8863_smi_remove() [all …]
|
/linux/drivers/net/dsa/b53/ |
A D | b53_mdio.c | 290 static int b53_mdio_probe(struct mdio_device *mdiodev) in b53_mdio_probe() argument 299 if (mdiodev->addr != BRCM_PSEUDO_PHY_ADDR && mdiodev->addr != 0) { in b53_mdio_probe() 301 mdiodev->addr); in b53_mdio_probe() 306 phy_id = mdiobus_read(mdiodev->bus, 0, 2) << 16; in b53_mdio_probe() 307 phy_id |= mdiobus_read(mdiodev->bus, 0, 3); in b53_mdio_probe() 329 strcmp(mdiodev->bus->name, "sf2 slave mii")) in b53_mdio_probe() 332 dev = b53_switch_alloc(&mdiodev->dev, &b53_mdio_ops, mdiodev->bus); in b53_mdio_probe() 338 dev->bus = mdiodev->bus; in b53_mdio_probe() 340 dev_set_drvdata(&mdiodev->dev, dev); in b53_mdio_probe() 360 dev_set_drvdata(&mdiodev->dev, NULL); in b53_mdio_remove() [all …]
|
/linux/drivers/phy/broadcom/ |
A D | phy-bcm-ns2-pcie.c | 28 struct mdio_device *mdiodev = phy_get_drvdata(p); in ns2_pci_phy_init() local 32 rc = mdiodev_write(mdiodev, BLK_ADDR_REG_OFFSET, PLL_AFE1_100MHZ_BLK); in ns2_pci_phy_init() 37 rc = mdiodev_write(mdiodev, PLL_CLK_AMP_OFFSET, PLL_CLK_AMP_2P05V); in ns2_pci_phy_init() 44 dev_err(&mdiodev->dev, "Error %d writing to phy\n", rc); in ns2_pci_phy_init() 53 static int ns2_pci_phy_probe(struct mdio_device *mdiodev) in ns2_pci_phy_probe() argument 55 struct device *dev = &mdiodev->dev; in ns2_pci_phy_probe() 65 phy_set_drvdata(phy, mdiodev); in ns2_pci_phy_probe()
|
A D | phy-bcm-ns-usb3.c | 52 struct mdio_device *mdiodev; member 184 struct mdio_device *mdiodev = usb3->mdiodev; in bcm_ns_usb3_mdio_phy_write() local 186 return mdiodev_write(mdiodev, reg, value); in bcm_ns_usb3_mdio_phy_write() 189 static int bcm_ns_usb3_mdio_probe(struct mdio_device *mdiodev) in bcm_ns_usb3_mdio_probe() argument 191 struct device *dev = &mdiodev->dev; in bcm_ns_usb3_mdio_probe() 204 usb3->mdiodev = mdiodev; in bcm_ns_usb3_mdio_probe()
|
/linux/drivers/net/mdio/ |
A D | of_mdio.c | 55 struct mdio_device *mdiodev; in of_mdiobus_register_device() local 58 mdiodev = mdio_device_create(mdio, addr); in of_mdiobus_register_device() 59 if (IS_ERR(mdiodev)) in of_mdiobus_register_device() 60 return PTR_ERR(mdiodev); in of_mdiobus_register_device() 66 device_set_node(&mdiodev->dev, fwnode); in of_mdiobus_register_device() 69 rc = mdio_device_register(mdiodev); in of_mdiobus_register_device() 71 mdio_device_free(mdiodev); in of_mdiobus_register_device()
|
/linux/drivers/net/dsa/qca/ |
A D | ar9331.c | 1020 static int ar9331_sw_probe(struct mdio_device *mdiodev) in ar9331_sw_probe() argument 1034 dev_err(&mdiodev->dev, "regmap init failed: %d\n", ret); in ar9331_sw_probe() 1040 dev_err(&mdiodev->dev, "missing switch reset\n"); in ar9331_sw_probe() 1044 priv->sbus = mdiodev->bus; in ar9331_sw_probe() 1045 priv->dev = &mdiodev->dev; in ar9331_sw_probe() 1052 ds->dev = &mdiodev->dev; in ar9331_sw_probe() 1057 dev_set_drvdata(&mdiodev->dev, priv); in ar9331_sw_probe() 1079 static void ar9331_sw_remove(struct mdio_device *mdiodev) in ar9331_sw_remove() argument 1099 dev_set_drvdata(&mdiodev->dev, NULL); in ar9331_sw_remove() 1102 static void ar9331_sw_shutdown(struct mdio_device *mdiodev) in ar9331_sw_shutdown() argument [all …]
|
/linux/include/linux/pcs/ |
A D | pcs-xpcs.h | 24 struct mdio_device *mdiodev; member 38 struct dw_xpcs *xpcs_create(struct mdio_device *mdiodev,
|
/linux/drivers/net/dsa/sja1105/ |
A D | sja1105_mdio.c | 422 struct mdio_device *mdiodev; in sja1105_mdiobus_pcs_register() local 432 mdiodev = mdio_device_create(bus, port); in sja1105_mdiobus_pcs_register() 433 if (IS_ERR(mdiodev)) { in sja1105_mdiobus_pcs_register() 434 rc = PTR_ERR(mdiodev); in sja1105_mdiobus_pcs_register() 438 xpcs = xpcs_create(mdiodev, priv->phy_mode[port]); in sja1105_mdiobus_pcs_register() 456 mdio_device_free(priv->xpcs[port]->mdiodev); in sja1105_mdiobus_pcs_register() 479 mdio_device_free(priv->xpcs[port]->mdiodev); in sja1105_mdiobus_pcs_unregister()
|
/linux/drivers/net/ethernet/stmicro/stmmac/ |
A D | stmmac_mdio.c | 403 struct mdio_device *mdiodev; in stmmac_xpcs_setup() local 413 mdiodev = mdio_device_create(bus, addr); in stmmac_xpcs_setup() 414 if (IS_ERR(mdiodev)) in stmmac_xpcs_setup() 417 xpcs = xpcs_create(mdiodev, mode); in stmmac_xpcs_setup() 419 mdio_device_free(mdiodev); in stmmac_xpcs_setup() 564 mdio_device_free(priv->hw->xpcs->mdiodev); in stmmac_mdio_unregister()
|
/linux/drivers/net/ethernet/freescale/dpaa2/ |
A D | dpaa2-mac.c | 256 struct mdio_device *mdiodev; in dpaa2_pcs_create() local 272 mdiodev = fwnode_mdio_find_device(node); in dpaa2_pcs_create() 274 if (!mdiodev) in dpaa2_pcs_create() 277 mac->pcs = lynx_pcs_create(mdiodev); in dpaa2_pcs_create() 280 put_device(&mdiodev->dev); in dpaa2_pcs_create()
|
/linux/drivers/net/pcs/ |
A D | pcs-xpcs.c | 179 struct mii_bus *bus = xpcs->mdiodev->bus; in xpcs_read() 180 int addr = xpcs->mdiodev->addr; in xpcs_read() 188 struct mii_bus *bus = xpcs->mdiodev->bus; in xpcs_write() 189 int addr = xpcs->mdiodev->addr; in xpcs_write() 258 dev_warn(&(__xpcs)->mdiodev->dev, ##__args); \ 1114 struct dw_xpcs *xpcs_create(struct mdio_device *mdiodev, in xpcs_create() argument 1125 xpcs->mdiodev = mdiodev; in xpcs_create()
|
/linux/drivers/net/dsa/mv88e6xxx/ |
A D | chip.c | 6360 static int mv88e6xxx_probe(struct mdio_device *mdiodev) in mv88e6xxx_probe() argument 6362 struct dsa_mv88e6xxx_pdata *pdata = mdiodev->dev.platform_data; in mv88e6xxx_probe() 6364 struct device *dev = &mdiodev->dev; in mv88e6xxx_probe() 6403 err = mv88e6xxx_smi_init(chip, mdiodev->bus, mdiodev->addr); in mv88e6xxx_probe() 6510 static void mv88e6xxx_remove(struct mdio_device *mdiodev) in mv88e6xxx_remove() argument 6512 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev); in mv88e6xxx_remove() 6540 dev_set_drvdata(&mdiodev->dev, NULL); in mv88e6xxx_remove() 6543 static void mv88e6xxx_shutdown(struct mdio_device *mdiodev) in mv88e6xxx_shutdown() argument 6545 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev); in mv88e6xxx_shutdown() 6552 dev_set_drvdata(&mdiodev->dev, NULL); in mv88e6xxx_shutdown()
|