/Linux-v4.19/drivers/net/phy/ |
D | mdio_device.c | 29 void mdio_device_free(struct mdio_device *mdiodev) in mdio_device_free() argument 31 put_device(&mdiodev->dev); in mdio_device_free() 42 struct mdio_device *mdiodev = to_mdio_device(dev); in mdio_device_bus_match() local 48 return strcmp(mdiodev->modalias, drv->name) == 0; in mdio_device_bus_match() 53 struct mdio_device *mdiodev; in mdio_device_create() local 56 mdiodev = kzalloc(sizeof(*mdiodev), GFP_KERNEL); in mdio_device_create() 57 if (!mdiodev) in mdio_device_create() 60 mdiodev->dev.release = mdio_device_release; in mdio_device_create() 61 mdiodev->dev.parent = &bus->dev; in mdio_device_create() 62 mdiodev->dev.bus = &mdio_bus_type; in mdio_device_create() [all …]
|
D | mdio_bus.c | 50 static int mdiobus_register_gpiod(struct mdio_device *mdiodev) in mdiobus_register_gpiod() argument 55 if (mdiodev->dev.of_node) in mdiobus_register_gpiod() 56 gpiod = fwnode_get_named_gpiod(&mdiodev->dev.of_node->fwnode, in mdiobus_register_gpiod() 65 mdiodev->reset = gpiod; in mdiobus_register_gpiod() 68 mdio_device_reset(mdiodev, 1); in mdiobus_register_gpiod() 73 int mdiobus_register_device(struct mdio_device *mdiodev) in mdiobus_register_device() argument 77 if (mdiodev->bus->mdio_map[mdiodev->addr]) in mdiobus_register_device() 80 if (mdiodev->flags & MDIO_DEVICE_FLAG_PHY) { in mdiobus_register_device() 81 err = mdiobus_register_gpiod(mdiodev); in mdiobus_register_device() 86 mdiodev->bus->mdio_map[mdiodev->addr] = mdiodev; in mdiobus_register_device() [all …]
|
D | xilinx_gmii2rgmii.c | 66 static int xgmiitorgmii_probe(struct mdio_device *mdiodev) in xgmiitorgmii_probe() argument 68 struct device *dev = &mdiodev->dev; in xgmiitorgmii_probe() 94 priv->mdio = mdiodev; in xgmiitorgmii_probe()
|
D | phy_device.c | 51 static void phy_mdio_device_free(struct mdio_device *mdiodev) in phy_mdio_device_free() argument 55 phydev = container_of(mdiodev, struct phy_device, mdio); in phy_mdio_device_free() 64 static void phy_mdio_device_remove(struct mdio_device *mdiodev) in phy_mdio_device_remove() argument 68 phydev = container_of(mdiodev, struct phy_device, mdio); in phy_mdio_device_remove() 408 struct mdio_device *mdiodev; in phy_device_create() local 415 mdiodev = &dev->mdio; in phy_device_create() 416 mdiodev->dev.parent = &bus->dev; in phy_device_create() 417 mdiodev->dev.bus = &mdio_bus_type; in phy_device_create() 418 mdiodev->dev.type = &mdio_bus_phy_type; in phy_device_create() 419 mdiodev->bus = bus; in phy_device_create() [all …]
|
/Linux-v4.19/drivers/phy/broadcom/ |
D | phy-bcm-ns2-pcie.c | 28 struct mdio_device *mdiodev = phy_get_drvdata(p); in ns2_pci_phy_init() local 32 rc = mdiobus_write(mdiodev->bus, mdiodev->addr, in ns2_pci_phy_init() 38 rc = mdiobus_write(mdiodev->bus, mdiodev->addr, in ns2_pci_phy_init() 46 dev_err(&mdiodev->dev, "Error %d writing to phy\n", rc); in ns2_pci_phy_init() 55 static int ns2_pci_phy_probe(struct mdio_device *mdiodev) in ns2_pci_phy_probe() argument 57 struct device *dev = &mdiodev->dev; in ns2_pci_phy_probe() 67 phy_set_drvdata(phy, mdiodev); in ns2_pci_phy_probe()
|
D | phy-bcm-ns-usb3.c | 57 struct mdio_device *mdiodev; member 195 struct mdio_device *mdiodev = usb3->mdiodev; in bcm_ns_usb3_mdiodev_phy_write() local 197 return mdiobus_write(mdiodev->bus, mdiodev->addr, reg, value); in bcm_ns_usb3_mdiodev_phy_write() 200 static int bcm_ns_usb3_mdio_probe(struct mdio_device *mdiodev) in bcm_ns_usb3_mdio_probe() argument 202 struct device *dev = &mdiodev->dev; in bcm_ns_usb3_mdio_probe() 215 usb3->mdiodev = mdiodev; in bcm_ns_usb3_mdio_probe()
|
/Linux-v4.19/drivers/net/dsa/ |
D | lan9303_mdio.c | 108 static int lan9303_mdio_probe(struct mdio_device *mdiodev) in lan9303_mdio_probe() argument 113 sw_dev = devm_kzalloc(&mdiodev->dev, sizeof(struct lan9303_mdio), in lan9303_mdio_probe() 118 sw_dev->chip.regmap = devm_regmap_init(&mdiodev->dev, NULL, sw_dev, in lan9303_mdio_probe() 122 dev_err(&mdiodev->dev, "regmap init failed: %d\n", ret); in lan9303_mdio_probe() 127 sw_dev->device = mdiodev; in lan9303_mdio_probe() 128 dev_set_drvdata(&mdiodev->dev, sw_dev); in lan9303_mdio_probe() 129 sw_dev->chip.dev = &mdiodev->dev; in lan9303_mdio_probe() 133 ret = lan9303_probe(&sw_dev->chip, mdiodev->dev.of_node); in lan9303_mdio_probe() 137 dev_info(&mdiodev->dev, "LAN9303 MDIO driver loaded successfully\n"); in lan9303_mdio_probe() 142 static void lan9303_mdio_remove(struct mdio_device *mdiodev) in lan9303_mdio_remove() argument [all …]
|
D | dsa_loop.c | 281 static int dsa_loop_drv_probe(struct mdio_device *mdiodev) in dsa_loop_drv_probe() argument 283 struct dsa_loop_pdata *pdata = mdiodev->dev.platform_data; in dsa_loop_drv_probe() 290 dev_info(&mdiodev->dev, "%s: 0x%0x\n", in dsa_loop_drv_probe() 293 ds = dsa_switch_alloc(&mdiodev->dev, DSA_MAX_PORTS); in dsa_loop_drv_probe() 297 ps = devm_kzalloc(&mdiodev->dev, sizeof(*ps), GFP_KERNEL); in dsa_loop_drv_probe() 307 ds->dev = &mdiodev->dev; in dsa_loop_drv_probe() 310 ps->bus = mdiodev->bus; in dsa_loop_drv_probe() 312 dev_set_drvdata(&mdiodev->dev, ds); in dsa_loop_drv_probe() 317 static void dsa_loop_drv_remove(struct mdio_device *mdiodev) in dsa_loop_drv_remove() argument 319 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev); in dsa_loop_drv_remove()
|
D | mt7530.c | 1334 mt7530_probe(struct mdio_device *mdiodev) in mt7530_probe() argument 1339 dn = mdiodev->dev.of_node; in mt7530_probe() 1341 priv = devm_kzalloc(&mdiodev->dev, sizeof(*priv), GFP_KERNEL); in mt7530_probe() 1345 priv->ds = dsa_switch_alloc(&mdiodev->dev, DSA_MAX_PORTS); in mt7530_probe() 1354 dev_info(&mdiodev->dev, "MT7530 adapts as multi-chip module\n"); in mt7530_probe() 1356 priv->rstc = devm_reset_control_get(&mdiodev->dev, "mcm"); in mt7530_probe() 1358 dev_err(&mdiodev->dev, "Couldn't get our reset line\n"); in mt7530_probe() 1363 priv->core_pwr = devm_regulator_get(&mdiodev->dev, "core"); in mt7530_probe() 1367 priv->io_pwr = devm_regulator_get(&mdiodev->dev, "io"); in mt7530_probe() 1377 priv->reset = devm_gpiod_get_optional(&mdiodev->dev, "reset", in mt7530_probe() [all …]
|
D | qca8k.c | 896 qca8k_sw_probe(struct mdio_device *mdiodev) in qca8k_sw_probe() argument 904 priv = devm_kzalloc(&mdiodev->dev, sizeof(*priv), GFP_KERNEL); in qca8k_sw_probe() 908 priv->bus = mdiodev->bus; in qca8k_sw_probe() 909 priv->dev = &mdiodev->dev; in qca8k_sw_probe() 918 priv->ds = dsa_switch_alloc(&mdiodev->dev, DSA_MAX_PORTS); in qca8k_sw_probe() 925 dev_set_drvdata(&mdiodev->dev, priv); in qca8k_sw_probe() 931 qca8k_sw_remove(struct mdio_device *mdiodev) in qca8k_sw_remove() argument 933 struct qca8k_priv *priv = dev_get_drvdata(&mdiodev->dev); in qca8k_sw_remove()
|
/Linux-v4.19/drivers/net/dsa/b53/ |
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() 300 dev_err(&mdiodev->dev, "leaving address %d to PHY\n", 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() 317 dev_err(&mdiodev->dev, "Unsupported device: 0x%08x\n", phy_id); 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() [all …]
|
/Linux-v4.19/include/linux/ |
D | mdio.h | 36 void (*device_free)(struct mdio_device *mdiodev); 37 void (*device_remove)(struct mdio_device *mdiodev); 65 int (*probe)(struct mdio_device *mdiodev); 68 void (*remove)(struct mdio_device *mdiodev); 73 void mdio_device_free(struct mdio_device *mdiodev); 75 int mdio_device_register(struct mdio_device *mdiodev); 76 void mdio_device_remove(struct mdio_device *mdiodev); 77 void mdio_device_reset(struct mdio_device *mdiodev, int value); 272 int mdiobus_register_device(struct mdio_device *mdiodev); 273 int mdiobus_unregister_device(struct mdio_device *mdiodev);
|
/Linux-v4.19/drivers/of/ |
D | of_mdio.c | 108 struct mdio_device *mdiodev; in of_mdiobus_register_device() local 111 mdiodev = mdio_device_create(mdio, addr); in of_mdiobus_register_device() 112 if (IS_ERR(mdiodev)) in of_mdiobus_register_device() 113 return PTR_ERR(mdiodev); in of_mdiobus_register_device() 119 mdiodev->dev.of_node = child; in of_mdiobus_register_device() 120 mdiodev->dev.fwnode = of_fwnode_handle(child); in of_mdiobus_register_device() 123 rc = mdio_device_register(mdiodev); in of_mdiobus_register_device() 125 mdio_device_free(mdiodev); in of_mdiobus_register_device() 301 struct mdio_device *mdiodev; in of_phy_find_device() local 308 mdiodev = to_mdio_device(d); in of_phy_find_device() [all …]
|
/Linux-v4.19/drivers/net/dsa/mv88e6xxx/ |
D | chip.c | 4620 static int mv88e6xxx_probe(struct mdio_device *mdiodev) in mv88e6xxx_probe() argument 4622 struct dsa_mv88e6xxx_pdata *pdata = mdiodev->dev.platform_data; in mv88e6xxx_probe() 4624 struct device *dev = &mdiodev->dev; in mv88e6xxx_probe() 4663 err = mv88e6xxx_smi_init(chip, mdiodev->bus, mdiodev->addr); in mv88e6xxx_probe() 4758 static void mv88e6xxx_remove(struct mdio_device *mdiodev) in mv88e6xxx_remove() argument 4760 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev); in mv88e6xxx_remove()
|