Home
last modified time | relevance | path

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

12

/linux-6.15/drivers/net/phy/
H A Dmdio_device.c28 put_device(&mdiodev->dev); in mdio_device_free()
54 mdiodev = kzalloc(sizeof(*mdiodev), GFP_KERNEL); in mdio_device_create()
55 if (!mdiodev) in mdio_device_create()
63 mdiodev->bus = bus; in mdio_device_create()
64 mdiodev->addr = addr; in mdio_device_create()
65 mdiodev->reset_state = -1; in mdio_device_create()
71 return mdiodev; in mdio_device_create()
114 device_del(&mdiodev->dev); in mdio_device_remove()
123 if (!mdiodev->reset_gpio && !mdiodev->reset_ctrl) in mdio_device_reset()
129 if (mdiodev->reset_gpio) in mdio_device_reset()
[all …]
H A Dmdio_bus.c45 mdiodev->reset_gpio = gpiod_get_optional(&mdiodev->dev, in mdiobus_register_gpiod()
73 if (mdiodev->bus->mdio_map[mdiodev->addr]) in mdiobus_register_device()
89 mdiodev->bus->mdio_map[mdiodev->addr] = mdiodev; in mdiobus_register_device()
97 if (mdiodev->bus->mdio_map[mdiodev->addr] != mdiodev) in mdiobus_unregister_device()
102 mdiodev->bus->mdio_map[mdiodev->addr] = NULL; in mdiobus_unregister_device()
123 if (!mdiodev) in mdiobus_get_phy()
801 if (!mdiodev) in __mdiobus_register()
804 mdiodev->device_remove(mdiodev); in __mdiobus_register()
805 mdiodev->device_free(mdiodev); in __mdiobus_register()
834 mdiodev->device_remove(mdiodev); in mdiobus_unregister()
[all …]
H A Dxilinx_gmii2rgmii.c85 static int xgmiitorgmii_probe(struct mdio_device *mdiodev) in xgmiitorgmii_probe() argument
87 struct device *dev = &mdiodev->dev; in xgmiitorgmii_probe()
120 priv->mdio = mdiodev; in xgmiitorgmii_probe()
H A Dphy_device.c660 struct mdio_device *mdiodev; in phy_device_create() local
668 mdiodev = &dev->mdio; in phy_device_create()
669 mdiodev->dev.parent = &bus->dev; in phy_device_create()
672 mdiodev->bus = bus; in phy_device_create()
674 mdiodev->addr = addr; in phy_device_create()
678 mdiodev->reset_state = -1; in phy_device_create()
698 device_initialize(&mdiodev->dev); in phy_device_create()
734 put_device(&mdiodev->dev); in phy_device_create()
3223 struct mdio_device *mdiodev; in fwnode_phy_find_device() local
3226 if (!mdiodev) in fwnode_phy_find_device()
[all …]
/linux-6.15/drivers/net/dsa/xrs700x/
H A Dxrs700x_mdio.c27 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()
42 ret = mdiodev_write(mdiodev, XRS_MDIO_IBA0, 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()
[all …]
/linux-6.15/include/linux/
H A Dmdio.h609 return __mdiobus_read(mdiodev->bus, mdiodev->addr, regnum); in __mdiodev_read()
615 return __mdiobus_write(mdiodev->bus, mdiodev->addr, regnum, val); in __mdiodev_write()
627 return __mdiobus_modify_changed(mdiodev->bus, mdiodev->addr, regnum, in __mdiodev_modify_changed()
633 return mdiobus_read(mdiodev->bus, mdiodev->addr, regnum); in mdiodev_read()
639 return mdiobus_write(mdiodev->bus, mdiodev->addr, regnum, val); in mdiodev_write()
645 return mdiobus_modify(mdiodev->bus, mdiodev->addr, regnum, mask, set); in mdiodev_modify()
651 return mdiobus_modify_changed(mdiodev->bus, mdiodev->addr, regnum, in mdiodev_modify_changed()
658 return mdiobus_c45_modify(mdiodev->bus, mdiodev->addr, devad, regnum, in mdiodev_c45_modify()
666 return mdiobus_c45_modify_changed(mdiodev->bus, mdiodev->addr, devad, in mdiodev_c45_modify_changed()
673 return mdiobus_c45_read(mdiodev->bus, mdiodev->addr, devad, regnum); in mdiodev_c45_read()
[all …]
/linux-6.15/drivers/net/dsa/
H A Dmt7530-mdio.c35 ret = bus->write(bus, priv->mdiodev->addr, r, lo); in mt7530_regmap_write()
39 ret = bus->write(bus, priv->mdiodev->addr, 0x10, hi); in mt7530_regmap_write()
58 lo = bus->read(bus, priv->mdiodev->addr, r); in mt7530_regmap_read()
59 hi = bus->read(bus, priv->mdiodev->addr, 0x10); in mt7530_regmap_read()
140 mt7530_probe(struct mdio_device *mdiodev) in mt7530_probe() argument
147 dn = mdiodev->dev.of_node; in mt7530_probe()
153 priv->bus = mdiodev->bus; in mt7530_probe()
154 priv->dev = &mdiodev->dev; in mt7530_probe()
155 priv->mdiodev = mdiodev; in mt7530_probe()
218 mt7530_remove(struct mdio_device *mdiodev) in mt7530_remove() argument
[all …]
H A Dlan9303_mdio.c99 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()
143 static void lan9303_mdio_shutdown(struct mdio_device *mdiodev) in lan9303_mdio_shutdown() argument
145 struct lan9303_mdio *sw_dev = dev_get_drvdata(&mdiodev->dev); in lan9303_mdio_shutdown()
[all …]
H A Ddsa_loop.c308 static int dsa_loop_drv_probe(struct mdio_device *mdiodev) in dsa_loop_drv_probe() argument
310 struct dsa_loop_pdata *pdata = mdiodev->dev.platform_data; in dsa_loop_drv_probe()
318 ds = devm_kzalloc(&mdiodev->dev, sizeof(*ds), GFP_KERNEL); in dsa_loop_drv_probe()
322 ds->dev = &mdiodev->dev; in dsa_loop_drv_probe()
335 ds->dev = &mdiodev->dev; in dsa_loop_drv_probe()
338 ps->bus = mdiodev->bus; in dsa_loop_drv_probe()
340 dev_set_drvdata(&mdiodev->dev, ds); in dsa_loop_drv_probe()
344 dev_info(&mdiodev->dev, "%s: 0x%0x\n", in dsa_loop_drv_probe()
352 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev); in dsa_loop_drv_remove()
366 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev); in dsa_loop_drv_shutdown()
[all …]
H A Dmv88e6060.c302 static int mv88e6060_probe(struct mdio_device *mdiodev) in mv88e6060_probe() argument
304 struct device *dev = &mdiodev->dev; in mv88e6060_probe()
313 priv->bus = mdiodev->bus; in mv88e6060_probe()
314 priv->sw_addr = mdiodev->addr; in mv88e6060_probe()
337 static void mv88e6060_remove(struct mdio_device *mdiodev) in mv88e6060_remove() argument
339 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev); in mv88e6060_remove()
347 static void mv88e6060_shutdown(struct mdio_device *mdiodev) in mv88e6060_shutdown() argument
349 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev); in mv88e6060_shutdown()
356 dev_set_drvdata(&mdiodev->dev, NULL); in mv88e6060_shutdown()
H A Dmt7530.c101 ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr), in core_write()
107 ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr), in core_write()
113 ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr), in core_write()
119 ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr), in core_write()
138 ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr), in core_rmw()
144 ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr), in core_rmw()
150 ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr), in core_rmw()
156 val = bus->read(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr), in core_rmw()
2557 MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr), in mt7531_setup()
2562 MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr), in mt7531_setup()
[all …]
/linux-6.15/drivers/net/dsa/microchip/
H A Dksz8863_smi.c134 static int ksz8863_smi_probe(struct mdio_device *mdiodev) in ksz8863_smi_probe() argument
136 struct device *ddev = &mdiodev->dev; in ksz8863_smi_probe()
143 dev = ksz_switch_alloc(&mdiodev->dev, mdiodev); in ksz8863_smi_probe()
156 dev->regmap[i] = devm_regmap_init(&mdiodev->dev, in ksz8863_smi_probe()
160 return dev_err_probe(&mdiodev->dev, in ksz8863_smi_probe()
167 if (mdiodev->dev.platform_data) in ksz8863_smi_probe()
168 dev->pdata = mdiodev->dev.platform_data; in ksz8863_smi_probe()
176 dev_set_drvdata(&mdiodev->dev, dev); in ksz8863_smi_probe()
183 struct ksz_device *dev = dev_get_drvdata(&mdiodev->dev); in ksz8863_smi_remove()
191 struct ksz_device *dev = dev_get_drvdata(&mdiodev->dev); in ksz8863_smi_shutdown()
[all …]
/linux-6.15/drivers/net/dsa/b53/
H A Db53_mdio.c292 static int b53_mdio_probe(struct mdio_device *mdiodev) in b53_mdio_probe() argument
301 if (mdiodev->addr != BRCM_PSEUDO_PHY_ADDR && mdiodev->addr != 0) { in b53_mdio_probe()
303 mdiodev->addr); in b53_mdio_probe()
308 phy_id = mdiobus_read(mdiodev->bus, 0, 2) << 16; in b53_mdio_probe()
309 phy_id |= mdiobus_read(mdiodev->bus, 0, 3); in b53_mdio_probe()
332 strcmp(mdiodev->bus->name, "sf2 user mii")) in b53_mdio_probe()
335 dev = b53_switch_alloc(&mdiodev->dev, &b53_mdio_ops, mdiodev->bus); in b53_mdio_probe()
341 dev->bus = mdiodev->bus; in b53_mdio_probe()
343 dev_set_drvdata(&mdiodev->dev, dev); in b53_mdio_probe()
347 return dev_err_probe(&mdiodev->dev, ret, in b53_mdio_probe()
[all …]
/linux-6.15/drivers/net/dsa/realtek/
H A Drealtek-mdio.h18 int realtek_mdio_probe(struct mdio_device *mdiodev);
19 void realtek_mdio_remove(struct mdio_device *mdiodev);
20 void realtek_mdio_shutdown(struct mdio_device *mdiodev);
33 static inline int realtek_mdio_probe(struct mdio_device *mdiodev) in realtek_mdio_probe() argument
38 static inline void realtek_mdio_remove(struct mdio_device *mdiodev) in realtek_mdio_remove() argument
42 static inline void realtek_mdio_shutdown(struct mdio_device *mdiodev) in realtek_mdio_shutdown() argument
H A Drealtek-mdio.c121 int realtek_mdio_probe(struct mdio_device *mdiodev) in realtek_mdio_probe() argument
123 struct device *dev = &mdiodev->dev; in realtek_mdio_probe()
131 priv->bus = mdiodev->bus; in realtek_mdio_probe()
132 priv->mdio_addr = mdiodev->addr; in realtek_mdio_probe()
155 void realtek_mdio_remove(struct mdio_device *mdiodev) in realtek_mdio_remove() argument
157 struct realtek_priv *priv = dev_get_drvdata(&mdiodev->dev); in realtek_mdio_remove()
178 void realtek_mdio_shutdown(struct mdio_device *mdiodev) in realtek_mdio_shutdown() argument
180 struct realtek_priv *priv = dev_get_drvdata(&mdiodev->dev); in realtek_mdio_shutdown()
/linux-6.15/drivers/phy/broadcom/
H A Dphy-bcm-ns2-pcie.c18 struct mdio_device *mdiodev = phy_get_drvdata(p); in ns2_pci_phy_init() local
22 rc = mdiodev_write(mdiodev, BLK_ADDR_REG_OFFSET, PLL_AFE1_100MHZ_BLK); in ns2_pci_phy_init()
27 rc = mdiodev_write(mdiodev, PLL_CLK_AMP_OFFSET, PLL_CLK_AMP_2P05V); in ns2_pci_phy_init()
34 dev_err(&mdiodev->dev, "Error %d writing to phy\n", rc); in ns2_pci_phy_init()
43 static int ns2_pci_phy_probe(struct mdio_device *mdiodev) in ns2_pci_phy_probe() argument
45 struct device *dev = &mdiodev->dev; in ns2_pci_phy_probe()
55 phy_set_drvdata(phy, mdiodev); in ns2_pci_phy_probe()
H A Dphy-bcm-ns-usb3.c53 struct mdio_device *mdiodev; member
185 struct mdio_device *mdiodev = usb3->mdiodev; in bcm_ns_usb3_mdio_phy_write() local
187 return mdiodev_write(mdiodev, reg, value); in bcm_ns_usb3_mdio_phy_write()
190 static int bcm_ns_usb3_mdio_probe(struct mdio_device *mdiodev) in bcm_ns_usb3_mdio_probe() argument
192 struct device *dev = &mdiodev->dev; in bcm_ns_usb3_mdio_probe()
204 usb3->mdiodev = mdiodev; in bcm_ns_usb3_mdio_probe()
/linux-6.15/drivers/net/pcs/
H A Dpcs-xpcs.c1420 mdio_device_get(mdiodev); in xpcs_create_data()
1421 xpcs->mdiodev = mdiodev; in xpcs_create_data()
1525 struct mdio_device *mdiodev; in xpcs_create_mdiodev() local
1529 if (IS_ERR(mdiodev)) in xpcs_create_mdiodev()
1530 return ERR_CAST(mdiodev); in xpcs_create_mdiodev()
1532 xpcs = xpcs_create(mdiodev); in xpcs_create_mdiodev()
1540 mdio_device_put(mdiodev); in xpcs_create_mdiodev()
1570 struct mdio_device *mdiodev; in xpcs_create_fwnode() local
1577 if (!mdiodev) in xpcs_create_fwnode()
1580 xpcs = xpcs_create(mdiodev); in xpcs_create_fwnode()
[all …]
H A Dpcs-xpcs-plat.c340 struct mdio_device *mdiodev; in xpcs_plat_init_dev() local
344 mdiodev = mdio_device_create(pxpcs->bus, 0); in xpcs_plat_init_dev()
345 if (IS_ERR(mdiodev)) in xpcs_plat_init_dev()
346 return PTR_ERR(mdiodev); in xpcs_plat_init_dev()
352 mdiodev->dev.of_node_reused = true; in xpcs_plat_init_dev()
355 mdiodev->dev.platform_data = (void *)device_get_match_data(dev); in xpcs_plat_init_dev()
357 ret = mdio_device_register(mdiodev); in xpcs_plat_init_dev()
366 mdiodev->dev.platform_data = NULL; in xpcs_plat_init_dev()
368 fwnode_handle_put(dev_fwnode(&mdiodev->dev)); in xpcs_plat_init_dev()
369 device_set_node(&mdiodev->dev, NULL); in xpcs_plat_init_dev()
[all …]
H A Dpcs-xpcs-wx.c126 dev_err(&xpcs->mdiodev->dev, "xpcs power-up timeout\n"); in txgbe_pcs_poll_power_up()
142 dev_err(&xpcs->mdiodev->dev, "xpcs pma initialization timeout\n"); in txgbe_pma_init_done()
H A Dpcs-xpcs.h111 struct mdio_device *mdiodev; member
/linux-6.15/drivers/net/mdio/
H A Dof_mdio.c56 struct mdio_device *mdiodev; in of_mdiobus_register_device() local
59 mdiodev = mdio_device_create(mdio, addr); in of_mdiobus_register_device()
60 if (IS_ERR(mdiodev)) in of_mdiobus_register_device()
61 return PTR_ERR(mdiodev); in of_mdiobus_register_device()
67 device_set_node(&mdiodev->dev, fwnode); in of_mdiobus_register_device()
70 rc = mdio_device_register(mdiodev); in of_mdiobus_register_device()
72 device_set_node(&mdiodev->dev, NULL); in of_mdiobus_register_device()
74 mdio_device_free(mdiodev); in of_mdiobus_register_device()
/linux-6.15/drivers/net/dsa/qca/
H A Dar9331.c1031 static int ar9331_sw_probe(struct mdio_device *mdiodev) in ar9331_sw_probe() argument
1045 dev_err(&mdiodev->dev, "regmap init failed: %d\n", ret); in ar9331_sw_probe()
1051 dev_err(&mdiodev->dev, "missing switch reset\n"); in ar9331_sw_probe()
1055 priv->sbus = mdiodev->bus; in ar9331_sw_probe()
1056 priv->dev = &mdiodev->dev; in ar9331_sw_probe()
1063 ds->dev = &mdiodev->dev; in ar9331_sw_probe()
1069 dev_set_drvdata(&mdiodev->dev, priv); in ar9331_sw_probe()
1091 static void ar9331_sw_remove(struct mdio_device *mdiodev) in ar9331_sw_remove() argument
1093 struct ar9331_sw_priv *priv = dev_get_drvdata(&mdiodev->dev); in ar9331_sw_remove()
1111 static void ar9331_sw_shutdown(struct mdio_device *mdiodev) in ar9331_sw_shutdown() argument
[all …]
H A Dqca8k-8xxx.c2049 qca8k_sw_probe(struct mdio_device *mdiodev) in qca8k_sw_probe() argument
2061 priv->bus = mdiodev->bus; in qca8k_sw_probe()
2062 priv->dev = &mdiodev->dev; in qca8k_sw_probe()
2079 priv->regmap = devm_regmap_init(&mdiodev->dev, NULL, priv, in qca8k_sw_probe()
2103 priv->ds->dev = &mdiodev->dev; in qca8k_sw_probe()
2109 dev_set_drvdata(&mdiodev->dev, priv); in qca8k_sw_probe()
2115 qca8k_sw_remove(struct mdio_device *mdiodev) in qca8k_sw_remove() argument
2117 struct qca8k_priv *priv = dev_get_drvdata(&mdiodev->dev); in qca8k_sw_remove()
2129 static void qca8k_sw_shutdown(struct mdio_device *mdiodev) in qca8k_sw_shutdown() argument
2131 struct qca8k_priv *priv = dev_get_drvdata(&mdiodev->dev); in qca8k_sw_shutdown()
[all …]
/linux-6.15/drivers/clk/qcom/
H A Dnsscc-qca8k.c2188 static int nss_cc_qca8k_probe(struct mdio_device *mdiodev) in nss_cc_qca8k_probe() argument
2193 ret = nss_cc_qca8k_clock_enable_and_reset(&mdiodev->dev); in nss_cc_qca8k_probe()
2195 return dev_err_probe(&mdiodev->dev, ret, "Fail to reset NSSCC\n"); in nss_cc_qca8k_probe()
2197 regmap = devm_regmap_init(&mdiodev->dev, NULL, mdiodev->bus, nss_cc_qca8k_desc.config); in nss_cc_qca8k_probe()
2199 return dev_err_probe(&mdiodev->dev, PTR_ERR(regmap), "Failed to init regmap\n"); in nss_cc_qca8k_probe()
2201 return qcom_cc_really_probe(&mdiodev->dev, &nss_cc_qca8k_desc, regmap); in nss_cc_qca8k_probe()

12