Home
last modified time | relevance | path

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

/linux/drivers/net/phy/
H A Dmdio_device.c33 static int mdio_device_register_reset(struct mdio_device *mdiodev) in mdio_device_register_reset() argument
38 mdiodev->reset_gpio = gpiod_get_optional(&mdiodev->dev, in mdio_device_register_reset()
40 if (IS_ERR(mdiodev->reset_gpio)) in mdio_device_register_reset()
41 return PTR_ERR(mdiodev->reset_gpio); in mdio_device_register_reset()
43 if (mdiodev->reset_gpio) in mdio_device_register_reset()
44 gpiod_set_consumer_name(mdiodev->reset_gpio, "PHY reset"); in mdio_device_register_reset()
46 reset = reset_control_get_optional_exclusive(&mdiodev->dev, "phy"); in mdio_device_register_reset()
48 gpiod_put(mdiodev->reset_gpio); in mdio_device_register_reset()
49 mdiodev->reset_gpio = NULL; in mdio_device_register_reset()
53 mdiodev->reset_ctrl = reset; in mdio_device_register_reset()
[all …]
H A Dair_en8811h.c261 static int __air_pbus_reg_write(struct mdio_device *mdiodev, in __air_pbus_reg_write()
266 ret = __mdiobus_write(mdiodev->bus, mdiodev->addr, AIR_EXT_PAGE_ACCESS, in __air_pbus_reg_write()
271 ret = __mdiobus_write(mdiodev->bus, mdiodev->addr, AIR_PBUS_ADDR_HIGH, in __air_pbus_reg_write()
276 ret = __mdiobus_write(mdiodev->bus, mdiodev->addr, in __air_write_buf()
282 return __mdiobus_write(mdiodev->bus, mdiodev->addr, AIR_PBUS_DATA_HIGH, in __air_write_buf()
1133 struct mdio_device *mdiodev; in an8811hb_probe()
248 __air_pbus_reg_write(struct mdio_device * mdiodev,u32 pbus_reg,u32 pbus_data) __air_pbus_reg_write() argument
1076 struct mdio_device *mdiodev; an8811hb_probe() local
[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.c208 static void phy_mdio_device_free(struct mdio_device *mdiodev) in features_init()
212 phydev = container_of(mdiodev, struct phy_device, mdio); in phy_device_free()
222 static void phy_mdio_device_remove(struct mdio_device *mdiodev) in phy_mdio_device_free()
226 phydev = container_of(mdiodev, struct phy_device, mdio); in phy_device_release()
663 struct mdio_device *mdiodev;
671 mdiodev = &dev->mdio;
672 mdiodev->dev.parent = &bus->dev;
673 mdiodev->dev.bus = &mdio_bus_type;
674 mdiodev->dev.type = &mdio_bus_phy_type;
675 mdiodev
216 phy_mdio_device_free(struct mdio_device * mdiodev) phy_mdio_device_free() argument
230 phy_mdio_device_remove(struct mdio_device * mdiodev) phy_mdio_device_remove() argument
753 struct mdio_device *mdiodev; phy_device_create() local
3640 struct mdio_device *mdiodev; fwnode_phy_find_device() local
[all...]
/linux/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()
67 ret = mdiodev_write(mdiodev, XRS_MDIO_IBD, (u16)val); in xrs700x_mdio_reg_write()
75 ret = mdiodev_write(mdiodev, XRS_MDIO_IBA1, uval); in xrs700x_mdio_reg_write()
83 ret = mdiodev_write(mdiodev, XRS_MDIO_IBA0, uval); in xrs700x_mdio_reg_write()
[all …]
/linux/include/linux/
H A Dmdio.h33 void (*device_free)(struct mdio_device *mdiodev);
34 void (*device_remove)(struct mdio_device *mdiodev);
66 int (*probe)(struct mdio_device *mdiodev);
69 void (*remove)(struct mdio_device *mdiodev);
72 void (*shutdown)(struct mdio_device *mdiodev);
94 void mdio_device_free(struct mdio_device *mdiodev);
96 int mdio_device_register(struct mdio_device *mdiodev);
97 void mdio_device_remove(struct mdio_device *mdiodev);
98 void mdio_device_reset(struct mdio_device *mdiodev, int value);
102 static inline void mdio_device_get(struct mdio_device *mdiodev) in mdio_device_get() argument
[all …]
/linux/drivers/net/dsa/
H A Dmt7530-mdio.c31 ret = bus->write(bus, priv->mdiodev->addr, 0x1f, page); in mt7530_regmap_write()
35 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()
57 ret = bus->write(bus, priv->mdiodev->addr, 0x1f, page); in mt7530_regmap_read()
61 ret = bus->read(bus, priv->mdiodev->addr, r); in mt7530_regmap_read()
66 ret = bus->read(bus, priv->mdiodev->addr, 0x10); in mt7530_regmap_read()
158 mt7530_probe(struct mdio_device *mdiodev) in mt7530_probe()
165 dn = mdiodev->dev.of_node; in mt7530_probe()
167 priv = devm_kzalloc_obj(&mdiodev->dev, *priv); in mt7530_probe()
171 priv->bus = mdiodev in mt7530_probe()
155 mt7530_probe(struct mdio_device * mdiodev) mt7530_probe() argument
222 mt7530_remove(struct mdio_device * mdiodev) mt7530_remove() argument
248 mt7530_shutdown(struct mdio_device * mdiodev) mt7530_shutdown() argument
[all...]
H A Dlan9303_mdio.c99 static int lan9303_mdio_probe(struct mdio_device *mdiodev) in lan9303_mdio_probe() argument
104 sw_dev = devm_kzalloc_obj(&mdiodev->dev, struct lan9303_mdio); in lan9303_mdio_probe()
108 sw_dev->chip.regmap = devm_regmap_init(&mdiodev->dev, NULL, sw_dev, in lan9303_mdio_probe()
112 dev_err(&mdiodev->dev, "regmap init failed: %d\n", ret); in lan9303_mdio_probe()
117 sw_dev->device = mdiodev; in lan9303_mdio_probe()
118 dev_set_drvdata(&mdiodev->dev, sw_dev); in lan9303_mdio_probe()
119 sw_dev->chip.dev = &mdiodev->dev; in lan9303_mdio_probe()
123 ret = lan9303_probe(&sw_dev->chip, mdiodev->dev.of_node); in lan9303_mdio_probe()
127 dev_info(&mdiodev->dev, "LAN9303 MDIO driver loaded successfully\n"); in lan9303_mdio_probe()
132 static void lan9303_mdio_remove(struct mdio_device *mdiodev)
133 lan9303_mdio_remove(struct mdio_device * mdiodev) lan9303_mdio_remove() argument
143 lan9303_mdio_shutdown(struct mdio_device * mdiodev) lan9303_mdio_shutdown() argument
[all...]
H A Dmt7530.c72 ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr), in core_write()
78 ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr), in core_write()
84 ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr), in core_write()
90 ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr), in core_write()
109 ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr), in core_rmw()
115 ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr), in core_rmw()
121 ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr), in core_rmw()
127 ret = bus->read(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr), in core_rmw()
136 ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr), in core_rmw()
2741 MT753X_CTRL_PHY_ADDR(priv->mdiodev in mt7531_setup_common()
[all...]
H A Dmt7530.h905 * @mdiodev: The pointer to the MDIO device structure
933 struct mdio_device *mdiodev;
908 struct mdio_device *mdiodev; global() member
/linux/drivers/net/dsa/microchip/
H A Dksz8863_smi.c133 static int ksz8863_smi_probe(struct mdio_device *mdiodev) in ksz8863_smi_probe() argument
135 struct device *ddev = &mdiodev->dev; in ksz8863_smi_probe()
146 dev = ksz_switch_alloc(&mdiodev->dev, chip, mdiodev); in ksz8863_smi_probe()
155 dev->regmap[i] = devm_regmap_init(&mdiodev->dev, in ksz8863_smi_probe()
159 return dev_err_probe(&mdiodev->dev, in ksz8863_smi_probe()
166 if (mdiodev->dev.platform_data) in ksz8863_smi_probe()
167 dev->pdata = mdiodev->dev.platform_data; in ksz8863_smi_probe()
175 dev_set_drvdata(&mdiodev->dev, dev); in ksz8863_smi_probe()
180 static void ksz8863_smi_remove(struct mdio_device *mdiodev) in ksz8863_smi_remove() argument
182 struct ksz_device *dev = dev_get_drvdata(&mdiodev->dev); in ksz8863_smi_remove()
[all …]
/linux/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()
302 dev_err(&mdiodev->dev, "leaving address %d to PHY\n", 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()
320 dev_err(&mdiodev->dev, "Unsupported device: 0x%08x\n", phy_id); in b53_mdio_probe()
332 strcmp(mdiodev->bus->name, "sf2 user mii")) in b53_mdio_probe()
335 dev = b53_switch_alloc(&mdiodev in b53_mdio_probe()
353 b53_mdio_remove(struct mdio_device * mdiodev) b53_mdio_remove() argument
363 b53_mdio_shutdown(struct mdio_device * mdiodev) b53_mdio_shutdown() argument
[all...]
/linux/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/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()
/linux/drivers/net/pcs/
H A Dpcs-xpcs.c214 return mdiodev_c45_read(xpcs->mdiodev, dev, reg); in xpcs_read()
219 return mdiodev_c45_write(xpcs->mdiodev, dev, reg, val); in xpcs_write()
224 return mdiodev_c45_modify(xpcs->mdiodev, dev, reg, mask, set); in xpcs_modify()
230 return mdiodev_c45_modify_changed(xpcs->mdiodev, dev, reg, mask, set); in xpcs_modify_changed()
307 dev_warn(&(__xpcs)->mdiodev->dev, ##__args); \
403 dev_err(&xpcs->mdiodev->dev, "%s: XPCS access returned %pe\n", in xpcs_link_up_usxgmii()
729 dev_err(&xpcs->mdiodev->dev, "switch interface failed: %pe\n", in xpcs_pre_config()
737 dev_err(&xpcs->mdiodev->dev, "unsupported interface %s\n", in xpcs_pre_config()
744 dev_err(&xpcs->mdiodev->dev, "soft reset failed: %pe\n", in xpcs_pre_config()
1197 phylink_mii_c45_pcs_get_state(xpcs->mdiodev, stat in xpcs_get_state()
1509 xpcs_create_data(struct mdio_device * mdiodev) xpcs_create_data() argument
1578 xpcs_create(struct mdio_device * mdiodev) xpcs_create() argument
1625 struct mdio_device *mdiodev; xpcs_create_mdiodev() local
1670 struct mdio_device *mdiodev; xpcs_create_fwnode() local
[all...]
H A Dpcs-xpcs.h111 struct mdio_device *mdiodev; member
/linux/drivers/net/dsa/mxl862xx/
H A Dmxl862xx-host.c46 dev_warn(&priv->mdiodev->dev, in mxl862xx_crc_err_work_fn()
193 return __mdiodev_c45_read(priv->mdiodev, MDIO_MMD_VEND1, addr); in mxl862xx_reg_read()
198 return __mdiodev_c45_write(priv->mdiodev, MDIO_MMD_VEND1, addr, data); in mxl862xx_reg_write()
322 dev_err(&priv->mdiodev->dev, in mxl862xx_send_cmd()
339 dev_dbg(&priv->mdiodev->dev, "CMD %04x DATA %*ph\n", cmd, size, data); in mxl862xx_api_wrap()
341 mutex_lock_nested(&priv->mdiodev->bus->mdio_lock, MDIO_MUTEX_NESTED); in mxl862xx_api_wrap()
472 dev_dbg(&priv->mdiodev->dev, "RET %d DATA %*ph\n", ret, size, data); in mxl862xx_api_wrap()
475 mutex_unlock(&priv->mdiodev->bus->mdio_lock); in mxl862xx_api_wrap()
484 mutex_lock_nested(&priv->mdiodev->bus->mdio_lock, MDIO_MUTEX_NESTED); in mxl862xx_reset()
493 mutex_unlock(&priv->mdiodev->bus->mdio_lock); in mxl862xx_reset()
H A Dmxl862xx.c2102 static int mxl862xx_probe(struct mdio_device *mdiodev) in mxl862xx_probe() argument
2104 struct device *dev = &mdiodev->dev; in mxl862xx_probe()
2113 priv->mdiodev = mdiodev; in mxl862xx_probe()
2153 static void mxl862xx_remove(struct mdio_device *mdiodev) in mxl862xx_remove() argument
2155 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev); in mxl862xx_remove()
2179 static void mxl862xx_shutdown(struct mdio_device *mdiodev) in mxl862xx_shutdown() argument
2181 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev); in mxl862xx_shutdown()
2200 dev_set_drvdata(&mdiodev->dev, NULL); in mxl862xx_shutdown()
/linux/drivers/net/dsa/qca/
H A Dar9331.c1031 static int ar9331_sw_probe(struct mdio_device *mdiodev) in ar9331_sw_probe() argument
1037 priv = devm_kzalloc_obj(&mdiodev->dev, *priv); in ar9331_sw_probe()
1041 priv->regmap = devm_regmap_init(&mdiodev->dev, &ar9331_sw_bus, priv, in ar9331_sw_probe()
1045 dev_err(&mdiodev->dev, "regmap init failed: %d\n", ret); in ar9331_sw_probe()
1049 priv->sw_reset = devm_reset_control_get(&mdiodev->dev, "switch"); 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 in ar9331_sw_probe()
1091 ar9331_sw_remove(struct mdio_device * mdiodev) ar9331_sw_remove() argument
1111 ar9331_sw_shutdown(struct mdio_device * mdiodev) ar9331_sw_shutdown() argument
[all...]
/linux/drivers/net/dsa/lantiq/
H A Dmxl-gsw1xx.c719 static int gsw1xx_probe(struct mdio_device *mdiodev) in gsw1xx_probe()
721 struct device *dev = &mdiodev->dev; in gsw1xx_probe()
732 priv->mdio_dev = mdiodev; in gsw1xx_probe()
821 static void gsw1xx_remove(struct mdio_device *mdiodev)
823 struct gswip_priv *priv = dev_get_drvdata(&mdiodev->dev);
835 static void gsw1xx_shutdown(struct mdio_device *mdiodev)
837 struct gswip_priv *priv = dev_get_drvdata(&mdiodev->dev);
845 dev_set_drvdata(&mdiodev->dev, NULL);
687 gsw1xx_probe(struct mdio_device * mdiodev) gsw1xx_probe() argument
789 gsw1xx_remove(struct mdio_device * mdiodev) gsw1xx_remove() argument
803 gsw1xx_shutdown(struct mdio_device * mdiodev) gsw1xx_shutdown() argument
/linux/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()
/linux/drivers/net/dsa/mv88e6xxx/
H A Dchip.c6671 struct mdio_device *mdiodev) in mv88e6xxx_single_chip_detect()
6686 if (mdiodev->addr != 16) in mv88e6xxx_single_chip_detect()
6689 err = mv88e6xxx_smi_init(chip, mdiodev->bus, 0); in mv88e6xxx_single_chip_detect()
7382 static int mv88e6xxx_probe(struct mdio_device *mdiodev) in mv88e6xxx_probe()
7384 struct dsa_mv88e6xxx_pdata *pdata = mdiodev->dev.platform_data; in mv88e6xxx_probe()
7386 struct device *dev = &mdiodev->dev; in mv88e6xxx_probe()
7436 err = mv88e6xxx_single_chip_detect(chip, mdiodev); in mv88e6xxx_probe()
7438 err = mv88e6xxx_smi_init(chip, mdiodev->bus, mdiodev->addr); in mv88e6xxx_probe()
7534 static void mv88e6xxx_remove(struct mdio_device *mdiodev) in mv88e6xxx_remove()
6670 mv88e6xxx_single_chip_detect(struct mv88e6xxx_chip * chip,struct mdio_device * mdiodev) mv88e6xxx_single_chip_detect() argument
7381 mv88e6xxx_probe(struct mdio_device * mdiodev) mv88e6xxx_probe() argument
7533 mv88e6xxx_remove(struct mdio_device * mdiodev) mv88e6xxx_remove() argument
7559 mv88e6xxx_shutdown(struct mdio_device * mdiodev) mv88e6xxx_shutdown() argument
[all...]