Lines Matching refs:mdiodev
27 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()
107 static int xrs700x_mdio_probe(struct mdio_device *mdiodev) in xrs700x_mdio_probe() argument
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()
120 dev_err(&mdiodev->dev, "Failed to initialize regmap: %d\n", ret); in xrs700x_mdio_probe()
124 dev_set_drvdata(&mdiodev->dev, priv); in xrs700x_mdio_probe()
135 static void xrs700x_mdio_remove(struct mdio_device *mdiodev) in xrs700x_mdio_remove() argument
137 struct xrs700x *priv = dev_get_drvdata(&mdiodev->dev); in xrs700x_mdio_remove()
145 static void xrs700x_mdio_shutdown(struct mdio_device *mdiodev) in xrs700x_mdio_shutdown() argument
147 struct xrs700x *priv = dev_get_drvdata(&mdiodev->dev); in xrs700x_mdio_shutdown()
154 dev_set_drvdata(&mdiodev->dev, NULL); in xrs700x_mdio_shutdown()