Home
last modified time | relevance | path

Searched refs:mdiodev (Results 1 – 14 of 14) sorted by relevance

/drivers/net/phy/
Dmdio_device.c25 void mdio_device_free(struct mdio_device *mdiodev) in mdio_device_free() argument
27 put_device(&mdiodev->dev); in mdio_device_free()
38 struct mdio_device *mdiodev = to_mdio_device(dev); in mdio_device_bus_match() local
44 return strcmp(mdiodev->modalias, drv->name) == 0; in mdio_device_bus_match()
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()
56 mdiodev->dev.release = mdio_device_release; in mdio_device_create()
57 mdiodev->dev.parent = &bus->dev; in mdio_device_create()
58 mdiodev->dev.bus = &mdio_bus_type; in mdio_device_create()
[all …]
Dmdio_bus.c43 static int mdiobus_register_gpiod(struct mdio_device *mdiodev) in mdiobus_register_gpiod() argument
48 mdiodev->reset_gpio = gpiod_get_optional(&mdiodev->dev, in mdiobus_register_gpiod()
50 error = PTR_ERR_OR_ZERO(mdiodev->reset_gpio); in mdiobus_register_gpiod()
54 if (mdiodev->reset_gpio) in mdiobus_register_gpiod()
55 gpiod_set_consumer_name(mdiodev->reset_gpio, "PHY reset"); in mdiobus_register_gpiod()
60 static int mdiobus_register_reset(struct mdio_device *mdiodev) in mdiobus_register_reset() argument
64 if (mdiodev->dev.of_node) in mdiobus_register_reset()
65 reset = of_reset_control_get_exclusive(mdiodev->dev.of_node, in mdiobus_register_reset()
74 mdiodev->reset_ctrl = reset; in mdiobus_register_reset()
79 int mdiobus_register_device(struct mdio_device *mdiodev) in mdiobus_register_device() argument
[all …]
Dxilinx_gmii2rgmii.c60 static int xgmiitorgmii_probe(struct mdio_device *mdiodev) in xgmiitorgmii_probe() argument
62 struct device *dev = &mdiodev->dev; in xgmiitorgmii_probe()
88 priv->mdio = mdiodev; in xgmiitorgmii_probe()
Dphy_device.c206 static void phy_mdio_device_free(struct mdio_device *mdiodev) in phy_mdio_device_free() argument
210 phydev = container_of(mdiodev, struct phy_device, mdio); in phy_mdio_device_free()
219 static void phy_mdio_device_remove(struct mdio_device *mdiodev) in phy_mdio_device_remove() argument
223 phydev = container_of(mdiodev, struct phy_device, mdio); in phy_mdio_device_remove()
580 struct mdio_device *mdiodev; in phy_device_create() local
588 mdiodev = &dev->mdio; in phy_device_create()
589 mdiodev->dev.parent = &bus->dev; in phy_device_create()
590 mdiodev->dev.bus = &mdio_bus_type; in phy_device_create()
591 mdiodev->dev.type = &mdio_bus_phy_type; in phy_device_create()
592 mdiodev->bus = bus; in phy_device_create()
[all …]
/drivers/phy/broadcom/
Dphy-bcm-ns2-pcie.c28 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()
Dphy-bcm-ns-usb3.c54 struct mdio_device *mdiodev; member
192 struct mdio_device *mdiodev = usb3->mdiodev; in bcm_ns_usb3_mdiodev_phy_write() local
194 return mdiobus_write(mdiodev->bus, mdiodev->addr, reg, value); in bcm_ns_usb3_mdiodev_phy_write()
197 static int bcm_ns_usb3_mdio_probe(struct mdio_device *mdiodev) in bcm_ns_usb3_mdio_probe() argument
199 struct device *dev = &mdiodev->dev; in bcm_ns_usb3_mdio_probe()
212 usb3->mdiodev = mdiodev; in bcm_ns_usb3_mdio_probe()
/drivers/net/dsa/
Dlan9303_mdio.c99 static int lan9303_mdio_probe(struct mdio_device *mdiodev) in lan9303_mdio_probe() argument
104 sw_dev = devm_kzalloc(&mdiodev->dev, sizeof(struct lan9303_mdio), in lan9303_mdio_probe()
109 sw_dev->chip.regmap = devm_regmap_init(&mdiodev->dev, NULL, sw_dev, in lan9303_mdio_probe()
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()
128 dev_info(&mdiodev->dev, "LAN9303 MDIO driver loaded successfully\n"); in lan9303_mdio_probe()
133 static void lan9303_mdio_remove(struct mdio_device *mdiodev) in lan9303_mdio_remove() argument
[all …]
Ddsa_loop.c277 static int dsa_loop_drv_probe(struct mdio_device *mdiodev) in dsa_loop_drv_probe() argument
279 struct dsa_loop_pdata *pdata = mdiodev->dev.platform_data; in dsa_loop_drv_probe()
286 dev_info(&mdiodev->dev, "%s: 0x%0x\n", in dsa_loop_drv_probe()
289 ds = dsa_switch_alloc(&mdiodev->dev, DSA_MAX_PORTS); in dsa_loop_drv_probe()
293 ps = devm_kzalloc(&mdiodev->dev, sizeof(*ps), GFP_KERNEL); in dsa_loop_drv_probe()
303 ds->dev = &mdiodev->dev; in dsa_loop_drv_probe()
306 ps->bus = mdiodev->bus; in dsa_loop_drv_probe()
308 dev_set_drvdata(&mdiodev->dev, ds); in dsa_loop_drv_probe()
313 static void dsa_loop_drv_remove(struct mdio_device *mdiodev) in dsa_loop_drv_remove() argument
315 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev); in dsa_loop_drv_remove()
Dmv88e6060.c253 static int mv88e6060_probe(struct mdio_device *mdiodev) in mv88e6060_probe() argument
255 struct device *dev = &mdiodev->dev; in mv88e6060_probe()
264 priv->bus = mdiodev->bus; in mv88e6060_probe()
265 priv->sw_addr = mdiodev->addr; in mv88e6060_probe()
286 static void mv88e6060_remove(struct mdio_device *mdiodev) in mv88e6060_remove() argument
288 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev); in mv88e6060_remove()
Dmt7530.c1624 mt7530_probe(struct mdio_device *mdiodev) in mt7530_probe() argument
1629 dn = mdiodev->dev.of_node; in mt7530_probe()
1631 priv = devm_kzalloc(&mdiodev->dev, sizeof(*priv), GFP_KERNEL); in mt7530_probe()
1635 priv->ds = dsa_switch_alloc(&mdiodev->dev, DSA_MAX_PORTS); in mt7530_probe()
1644 dev_info(&mdiodev->dev, "MT7530 adapts as multi-chip module\n"); in mt7530_probe()
1646 priv->rstc = devm_reset_control_get(&mdiodev->dev, "mcm"); in mt7530_probe()
1648 dev_err(&mdiodev->dev, "Couldn't get our reset line\n"); in mt7530_probe()
1657 of_device_get_match_data(&mdiodev->dev); in mt7530_probe()
1660 priv->core_pwr = devm_regulator_get(&mdiodev->dev, "core"); in mt7530_probe()
1664 priv->io_pwr = devm_regulator_get(&mdiodev->dev, "io"); in mt7530_probe()
[all …]
Dqca8k.c1044 qca8k_sw_probe(struct mdio_device *mdiodev) in qca8k_sw_probe() argument
1052 priv = devm_kzalloc(&mdiodev->dev, sizeof(*priv), GFP_KERNEL); in qca8k_sw_probe()
1056 priv->bus = mdiodev->bus; in qca8k_sw_probe()
1057 priv->dev = &mdiodev->dev; in qca8k_sw_probe()
1080 priv->ds = dsa_switch_alloc(&mdiodev->dev, QCA8K_NUM_PORTS); in qca8k_sw_probe()
1088 dev_set_drvdata(&mdiodev->dev, priv); in qca8k_sw_probe()
1094 qca8k_sw_remove(struct mdio_device *mdiodev) in qca8k_sw_remove() argument
1096 struct qca8k_priv *priv = dev_get_drvdata(&mdiodev->dev); in qca8k_sw_remove()
/drivers/net/dsa/b53/
Db53_mdio.c290 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 …]
/drivers/of/
Dof_mdio.c106 struct mdio_device *mdiodev; in of_mdiobus_register_device() local
109 mdiodev = mdio_device_create(mdio, addr); in of_mdiobus_register_device()
110 if (IS_ERR(mdiodev)) in of_mdiobus_register_device()
111 return PTR_ERR(mdiodev); in of_mdiobus_register_device()
117 mdiodev->dev.of_node = child; in of_mdiobus_register_device()
118 mdiodev->dev.fwnode = of_fwnode_handle(child); in of_mdiobus_register_device()
121 rc = mdio_device_register(mdiodev); in of_mdiobus_register_device()
123 mdio_device_free(mdiodev); in of_mdiobus_register_device()
293 struct mdio_device *mdiodev; in of_phy_find_device() local
300 mdiodev = to_mdio_device(d); in of_phy_find_device()
[all …]
/drivers/net/dsa/mv88e6xxx/
Dchip.c5033 static int mv88e6xxx_probe(struct mdio_device *mdiodev) in mv88e6xxx_probe() argument
5035 struct dsa_mv88e6xxx_pdata *pdata = mdiodev->dev.platform_data; in mv88e6xxx_probe()
5037 struct device *dev = &mdiodev->dev; in mv88e6xxx_probe()
5076 err = mv88e6xxx_smi_init(chip, mdiodev->bus, mdiodev->addr); in mv88e6xxx_probe()
5178 static void mv88e6xxx_remove(struct mdio_device *mdiodev) in mv88e6xxx_remove() argument
5180 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev); in mv88e6xxx_remove()