/linux-master/drivers/net/dsa/realtek/ |
H A D | realtek-mdio.h | 18 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) argument 38 static inline void realtek_mdio_remove(struct mdio_device *mdiodev) argument 42 static inline void realtek_mdio_shutdown(struct mdio_device *mdiodev) argument
|
H A D | realtek-mdio.c | 111 * @mdiodev: mdio_device to probe on. 121 int realtek_mdio_probe(struct mdio_device *mdiodev) argument 123 struct device *dev = &mdiodev->dev; 131 priv->bus = mdiodev->bus; 132 priv->mdio_addr = mdiodev->addr; 147 * @mdiodev: mdio_device to be removed. 155 void realtek_mdio_remove(struct mdio_device *mdiodev) argument 157 struct realtek_priv *priv = dev_get_drvdata(&mdiodev->dev); 170 * @mdiodev: mdio_device shutting down. 178 void realtek_mdio_shutdown(struct mdio_device *mdiodev) argument [all...] |
/linux-master/drivers/net/phy/ |
H A D | mdio_device.c | 26 void mdio_device_free(struct mdio_device *mdiodev) argument 28 put_device(&mdiodev->dev); 40 struct mdio_device *mdiodev = to_mdio_device(dev); local 46 return strcmp(mdiodev->modalias, drv->name) == 0; 51 struct mdio_device *mdiodev; local 54 mdiodev = kzalloc(sizeof(*mdiodev), GFP_KERNEL); 55 if (!mdiodev) 58 mdiodev->dev.release = mdio_device_release; 59 mdiodev 79 mdio_device_register(struct mdio_device *mdiodev) argument 112 mdio_device_remove(struct mdio_device *mdiodev) argument 119 mdio_device_reset(struct mdio_device *mdiodev, int value) argument 156 struct mdio_device *mdiodev = to_mdio_device(dev); local 177 struct mdio_device *mdiodev = to_mdio_device(dev); local 192 struct mdio_device *mdiodev = to_mdio_device(dev); local [all...] |
H A D | mdio_bus.c | 42 static int mdiobus_register_gpiod(struct mdio_device *mdiodev) argument 45 mdiodev->reset_gpio = gpiod_get_optional(&mdiodev->dev, 47 if (IS_ERR(mdiodev->reset_gpio)) 48 return PTR_ERR(mdiodev->reset_gpio); 50 if (mdiodev->reset_gpio) 51 gpiod_set_consumer_name(mdiodev->reset_gpio, "PHY reset"); 56 static int mdiobus_register_reset(struct mdio_device *mdiodev) argument 60 reset = reset_control_get_optional_exclusive(&mdiodev->dev, "phy"); 64 mdiodev 69 mdiobus_register_device(struct mdio_device *mdiodev) argument 95 mdiobus_unregister_device(struct mdio_device *mdiodev) argument 120 struct mdio_device *mdiodev; local 256 struct mdio_device *mdiodev = to_mdio_device(dev); local 462 of_mdiobus_find_phy(struct device *dev, struct mdio_device *mdiodev, struct device_node *np) argument 504 of_mdiobus_link_mdiodev(struct mii_bus *bus, struct mdio_device *mdiodev) argument 515 of_mdiobus_link_mdiodev(struct mii_bus *mdio, struct mdio_device *mdiodev) argument 532 struct mdio_device *mdiodev; local 687 struct mdio_device *mdiodev; local 805 struct mdio_device *mdiodev; local [all...] |
H A D | xilinx_gmii2rgmii.c | 83 static int xgmiitorgmii_probe(struct mdio_device *mdiodev) argument 85 struct device *dev = &mdiodev->dev; 112 priv->mdio = mdiodev;
|
H A D | phy_device.c | 255 static void phy_mdio_device_free(struct mdio_device *mdiodev) argument 259 phydev = container_of(mdiodev, struct phy_device, mdio); 269 static void phy_mdio_device_remove(struct mdio_device *mdiodev) argument 273 phydev = container_of(mdiodev, struct phy_device, mdio); 650 struct mdio_device *mdiodev; local 658 mdiodev = &dev->mdio; 659 mdiodev->dev.parent = &bus->dev; 660 mdiodev->dev.bus = &mdio_bus_type; 661 mdiodev->dev.type = &mdio_bus_phy_type; 662 mdiodev 3390 struct mdio_device *mdiodev; local [all...] |
/linux-master/drivers/net/dsa/xrs700x/ |
H A D | xrs700x_mdio.c | 27 struct mdio_device *mdiodev = context; local 28 struct device *dev = &mdiodev->dev; 34 ret = mdiodev_write(mdiodev, XRS_MDIO_IBA1, uval); 42 ret = mdiodev_write(mdiodev, XRS_MDIO_IBA0, uval); 48 ret = mdiodev_read(mdiodev, XRS_MDIO_IBD); 62 struct mdio_device *mdiodev = context; local 63 struct device *dev = &mdiodev->dev; 67 ret = mdiodev_write(mdiodev, XRS_MDIO_IBD, (u16)val); 75 ret = mdiodev_write(mdiodev, XRS_MDIO_IBA1, uval); 83 ret = mdiodev_write(mdiodev, XRS_MDIO_IBA 107 xrs700x_mdio_probe(struct mdio_device *mdiodev) argument 135 xrs700x_mdio_remove(struct mdio_device *mdiodev) argument 145 xrs700x_mdio_shutdown(struct mdio_device *mdiodev) argument [all...] |
/linux-master/drivers/phy/broadcom/ |
H A D | phy-bcm-ns2-pcie.c | 18 struct mdio_device *mdiodev = phy_get_drvdata(p); local 22 rc = mdiodev_write(mdiodev, BLK_ADDR_REG_OFFSET, PLL_AFE1_100MHZ_BLK); 27 rc = mdiodev_write(mdiodev, PLL_CLK_AMP_OFFSET, PLL_CLK_AMP_2P05V); 34 dev_err(&mdiodev->dev, "Error %d writing to phy\n", rc); 43 static int ns2_pci_phy_probe(struct mdio_device *mdiodev) argument 45 struct device *dev = &mdiodev->dev; 55 phy_set_drvdata(phy, mdiodev);
|
H A D | phy-bcm-ns-usb3.c | 53 struct mdio_device *mdiodev; member in struct:bcm_ns_usb3 185 struct mdio_device *mdiodev = usb3->mdiodev; local 187 return mdiodev_write(mdiodev, reg, value); 190 static int bcm_ns_usb3_mdio_probe(struct mdio_device *mdiodev) argument 192 struct device *dev = &mdiodev->dev; 204 usb3->mdiodev = mdiodev;
|
/linux-master/drivers/net/dsa/microchip/ |
H A D | ksz8863_smi.c | 134 static int ksz8863_smi_probe(struct mdio_device *mdiodev) argument 136 struct device *ddev = &mdiodev->dev; 143 dev = ksz_switch_alloc(&mdiodev->dev, mdiodev); 156 dev->regmap[i] = devm_regmap_init(&mdiodev->dev, 160 return dev_err_probe(&mdiodev->dev, 167 if (mdiodev->dev.platform_data) 168 dev->pdata = mdiodev->dev.platform_data; 176 dev_set_drvdata(&mdiodev->dev, dev); 181 static void ksz8863_smi_remove(struct mdio_device *mdiodev) argument 189 ksz8863_smi_shutdown(struct mdio_device *mdiodev) argument [all...] |
/linux-master/drivers/net/dsa/ |
H A D | lan9303_mdio.c | 99 static int lan9303_mdio_probe(struct mdio_device *mdiodev) argument 104 sw_dev = devm_kzalloc(&mdiodev->dev, sizeof(struct lan9303_mdio), 109 sw_dev->chip.regmap = devm_regmap_init(&mdiodev->dev, NULL, sw_dev, 113 dev_err(&mdiodev->dev, "regmap init failed: %d\n", ret); 118 sw_dev->device = mdiodev; 119 dev_set_drvdata(&mdiodev->dev, sw_dev); 120 sw_dev->chip.dev = &mdiodev->dev; 124 ret = lan9303_probe(&sw_dev->chip, mdiodev->dev.of_node); 128 dev_info(&mdiodev->dev, "LAN9303 MDIO driver loaded successfully\n"); 133 static void lan9303_mdio_remove(struct mdio_device *mdiodev) argument 143 lan9303_mdio_shutdown(struct mdio_device *mdiodev) argument [all...] |
H A D | mt7530-mdio.c | 141 mt7530_probe(struct mdio_device *mdiodev) argument 148 dn = mdiodev->dev.of_node; 150 priv = devm_kzalloc(&mdiodev->dev, sizeof(*priv), GFP_KERNEL); 154 priv->bus = mdiodev->bus; 155 priv->dev = &mdiodev->dev; 170 dev_info(&mdiodev->dev, "MT7530 adapts as multi-chip module\n"); 172 priv->rstc = devm_reset_control_get(&mdiodev->dev, "mcm"); 174 dev_err(&mdiodev->dev, "Couldn't get our reset line\n"); 178 priv->reset = devm_gpiod_get_optional(&mdiodev->dev, "reset", 181 dev_err(&mdiodev 218 mt7530_remove(struct mdio_device *mdiodev) argument 242 mt7530_shutdown(struct mdio_device *mdiodev) argument [all...] |
H A D | dsa_loop.c | 309 static int dsa_loop_drv_probe(struct mdio_device *mdiodev) argument 311 struct dsa_loop_pdata *pdata = mdiodev->dev.platform_data; 319 ds = devm_kzalloc(&mdiodev->dev, sizeof(*ds), GFP_KERNEL); 323 ds->dev = &mdiodev->dev; 326 ps = devm_kzalloc(&mdiodev->dev, sizeof(*ps), GFP_KERNEL); 336 ds->dev = &mdiodev->dev; 339 ps->bus = mdiodev->bus; 341 dev_set_drvdata(&mdiodev->dev, ds); 345 dev_info(&mdiodev->dev, "%s: 0x%0x\n", 351 static void dsa_loop_drv_remove(struct mdio_device *mdiodev) argument 365 dsa_loop_drv_shutdown(struct mdio_device *mdiodev) argument [all...] |
H A D | mv88e6060.c | 302 static int mv88e6060_probe(struct mdio_device *mdiodev) argument 304 struct device *dev = &mdiodev->dev; 313 priv->bus = mdiodev->bus; 314 priv->sw_addr = mdiodev->addr; 337 static void mv88e6060_remove(struct mdio_device *mdiodev) argument 339 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev); 347 static void mv88e6060_shutdown(struct mdio_device *mdiodev) argument 349 struct dsa_switch *ds = dev_get_drvdata(&mdiodev->dev); 356 dev_set_drvdata(&mdiodev->dev, NULL);
|
/linux-master/include/linux/ |
H A D | mdio.h | 35 void (*device_free)(struct mdio_device *mdiodev); 36 void (*device_remove)(struct mdio_device *mdiodev); 74 int (*probe)(struct mdio_device *mdiodev); 77 void (*remove)(struct mdio_device *mdiodev); 80 void (*shutdown)(struct mdio_device *mdiodev); 101 void mdio_device_free(struct mdio_device *mdiodev); 103 int mdio_device_register(struct mdio_device *mdiodev); 104 void mdio_device_remove(struct mdio_device *mdiodev); 105 void mdio_device_reset(struct mdio_device *mdiodev, int value); 110 static inline void mdio_device_get(struct mdio_device *mdiodev) argument 115 mdio_device_put(struct mdio_device *mdiodev) argument 633 __mdiodev_read(struct mdio_device *mdiodev, u32 regnum) argument 638 __mdiodev_write(struct mdio_device *mdiodev, u32 regnum, u16 val) argument 644 __mdiodev_modify(struct mdio_device *mdiodev, u32 regnum, u16 mask, u16 set) argument 650 __mdiodev_modify_changed(struct mdio_device *mdiodev, u32 regnum, u16 mask, u16 set) argument 657 mdiodev_read(struct mdio_device *mdiodev, u32 regnum) argument 662 mdiodev_write(struct mdio_device *mdiodev, u32 regnum, u16 val) argument 668 mdiodev_modify(struct mdio_device *mdiodev, u32 regnum, u16 mask, u16 set) argument 674 mdiodev_modify_changed(struct mdio_device *mdiodev, u32 regnum, u16 mask, u16 set) argument 681 mdiodev_c45_modify(struct mdio_device *mdiodev, int devad, u32 regnum, u16 mask, u16 set) argument 688 mdiodev_c45_modify_changed(struct mdio_device *mdiodev, int devad, u32 regnum, u16 mask, u16 set) argument 696 mdiodev_c45_read(struct mdio_device *mdiodev, int devad, u16 regnum) argument 702 mdiodev_c45_write(struct mdio_device *mdiodev, u32 devad, u16 regnum, u16 val) argument [all...] |
/linux-master/drivers/net/dsa/b53/ |
H A D | b53_mdio.c | 292 static int b53_mdio_probe(struct mdio_device *mdiodev) argument 301 if (mdiodev->addr != BRCM_PSEUDO_PHY_ADDR && mdiodev->addr != 0) { 302 dev_err(&mdiodev->dev, "leaving address %d to PHY\n", 303 mdiodev->addr); 308 phy_id = mdiobus_read(mdiodev->bus, 0, 2) << 16; 309 phy_id |= mdiobus_read(mdiodev->bus, 0, 3); 320 dev_err(&mdiodev->dev, "Unsupported device: 0x%08x\n", phy_id); 332 strcmp(mdiodev->bus->name, "sf2 user mii")) 335 dev = b53_switch_alloc(&mdiodev 354 b53_mdio_remove(struct mdio_device *mdiodev) argument 364 b53_mdio_shutdown(struct mdio_device *mdiodev) argument [all...] |
/linux-master/include/linux/pcs/ |
H A D | pcs-xpcs.h | 32 struct mdio_device *mdiodev; member in struct:dw_xpcs
|
/linux-master/drivers/net/mdio/ |
H A D | of_mdio.c | 56 struct mdio_device *mdiodev; local 59 mdiodev = mdio_device_create(mdio, addr); 60 if (IS_ERR(mdiodev)) 61 return PTR_ERR(mdiodev); 67 device_set_node(&mdiodev->dev, fwnode); 69 /* All data is now stored in the mdiodev struct; register it. */ 70 rc = mdio_device_register(mdiodev); 72 device_set_node(&mdiodev->dev, NULL); 74 mdio_device_free(mdiodev);
|
/linux-master/drivers/net/pcs/ |
H A D | pcs-xpcs.c | 205 return mdiodev_c45_read(xpcs->mdiodev, dev, reg); 210 return mdiodev_c45_write(xpcs->mdiodev, dev, reg, val); 216 return mdiodev_c45_modify_changed(xpcs->mdiodev, dev, reg, mask, set); 308 dev_warn(&(__xpcs)->mdiodev->dev, ##__args); \ 1127 phylink_mii_c45_pcs_get_state(xpcs->mdiodev, state); 1368 static struct dw_xpcs *xpcs_create(struct mdio_device *mdiodev, argument 1379 mdio_device_get(mdiodev); 1380 xpcs->mdiodev = mdiodev; 1420 mdio_device_put(mdiodev); 1437 struct mdio_device *mdiodev; local [all...] |
H A D | pcs-xpcs-wx.c | 137 dev_err(&xpcs->mdiodev->dev, "xpcs power-up timeout\n"); 153 dev_err(&xpcs->mdiodev->dev, "xpcs pma initialization timeout\n");
|
/linux-master/drivers/net/dsa/qca/ |
H A D | ar9331.c | 1025 static int ar9331_sw_probe(struct mdio_device *mdiodev) argument 1031 priv = devm_kzalloc(&mdiodev->dev, sizeof(*priv), GFP_KERNEL); 1035 priv->regmap = devm_regmap_init(&mdiodev->dev, &ar9331_sw_bus, priv, 1039 dev_err(&mdiodev->dev, "regmap init failed: %d\n", ret); 1043 priv->sw_reset = devm_reset_control_get(&mdiodev->dev, "switch"); 1045 dev_err(&mdiodev->dev, "missing switch reset\n"); 1049 priv->sbus = mdiodev->bus; 1050 priv->dev = &mdiodev->dev; 1057 ds->dev = &mdiodev->dev; 1062 dev_set_drvdata(&mdiodev 1084 ar9331_sw_remove(struct mdio_device *mdiodev) argument 1104 ar9331_sw_shutdown(struct mdio_device *mdiodev) argument [all...] |
H A D | qca8k-8xxx.c | 2036 qca8k_sw_probe(struct mdio_device *mdiodev) argument 2044 priv = devm_kzalloc(&mdiodev->dev, sizeof(*priv), GFP_KERNEL); 2048 priv->bus = mdiodev->bus; 2049 priv->dev = &mdiodev->dev; 2066 priv->regmap = devm_regmap_init(&mdiodev->dev, NULL, priv, 2080 priv->ds = devm_kzalloc(&mdiodev->dev, sizeof(*priv->ds), GFP_KERNEL); 2090 priv->ds->dev = &mdiodev->dev; 2095 dev_set_drvdata(&mdiodev->dev, priv); 2101 qca8k_sw_remove(struct mdio_device *mdiodev) argument 2103 struct qca8k_priv *priv = dev_get_drvdata(&mdiodev 2115 qca8k_sw_shutdown(struct mdio_device *mdiodev) argument [all...] |
/linux-master/drivers/net/dsa/mv88e6xxx/ |
H A D | chip.c | 6405 struct mdio_device *mdiodev) 6420 if (mdiodev->addr != 16) 6423 err = mv88e6xxx_smi_init(chip, mdiodev->bus, 0); 7102 static int mv88e6xxx_probe(struct mdio_device *mdiodev) 7104 struct dsa_mv88e6xxx_pdata *pdata = mdiodev->dev.platform_data; 7106 struct device *dev = &mdiodev->dev; 7156 err = mv88e6xxx_single_chip_detect(chip, mdiodev); 7158 err = mv88e6xxx_smi_init(chip, mdiodev->bus, mdiodev->addr); 7252 static void mv88e6xxx_remove(struct mdio_device *mdiodev) 6356 mv88e6xxx_single_chip_detect(struct mv88e6xxx_chip *chip, struct mdio_device *mdiodev) argument 7054 mv88e6xxx_probe(struct mdio_device *mdiodev) argument 7204 mv88e6xxx_remove(struct mdio_device *mdiodev) argument 7234 mv88e6xxx_shutdown(struct mdio_device *mdiodev) argument [all...] |