sw_dev 35 drivers/net/dsa/lan9303_i2c.c struct lan9303_i2c *sw_dev; sw_dev 38 drivers/net/dsa/lan9303_i2c.c sw_dev = devm_kzalloc(&client->dev, sizeof(struct lan9303_i2c), sw_dev 40 drivers/net/dsa/lan9303_i2c.c if (!sw_dev) sw_dev 43 drivers/net/dsa/lan9303_i2c.c sw_dev->chip.regmap = devm_regmap_init_i2c(client, sw_dev 45 drivers/net/dsa/lan9303_i2c.c if (IS_ERR(sw_dev->chip.regmap)) { sw_dev 46 drivers/net/dsa/lan9303_i2c.c ret = PTR_ERR(sw_dev->chip.regmap); sw_dev 53 drivers/net/dsa/lan9303_i2c.c sw_dev->device = client; sw_dev 54 drivers/net/dsa/lan9303_i2c.c i2c_set_clientdata(client, sw_dev); sw_dev 55 drivers/net/dsa/lan9303_i2c.c sw_dev->chip.dev = &client->dev; sw_dev 57 drivers/net/dsa/lan9303_i2c.c sw_dev->chip.ops = &lan9303_indirect_phy_ops; sw_dev 59 drivers/net/dsa/lan9303_i2c.c ret = lan9303_probe(&sw_dev->chip, client->dev.of_node); sw_dev 70 drivers/net/dsa/lan9303_i2c.c struct lan9303_i2c *sw_dev; sw_dev 72 drivers/net/dsa/lan9303_i2c.c sw_dev = i2c_get_clientdata(client); sw_dev 73 drivers/net/dsa/lan9303_i2c.c if (!sw_dev) sw_dev 76 drivers/net/dsa/lan9303_i2c.c return lan9303_remove(&sw_dev->chip); sw_dev 32 drivers/net/dsa/lan9303_mdio.c struct lan9303_mdio *sw_dev = (struct lan9303_mdio *)ctx; sw_dev 35 drivers/net/dsa/lan9303_mdio.c mutex_lock(&sw_dev->device->bus->mdio_lock); sw_dev 36 drivers/net/dsa/lan9303_mdio.c lan9303_mdio_real_write(sw_dev->device, reg, val & 0xffff); sw_dev 37 drivers/net/dsa/lan9303_mdio.c lan9303_mdio_real_write(sw_dev->device, reg + 2, (val >> 16) & 0xffff); sw_dev 38 drivers/net/dsa/lan9303_mdio.c mutex_unlock(&sw_dev->device->bus->mdio_lock); sw_dev 50 drivers/net/dsa/lan9303_mdio.c struct lan9303_mdio *sw_dev = (struct lan9303_mdio *)ctx; sw_dev 53 drivers/net/dsa/lan9303_mdio.c mutex_lock(&sw_dev->device->bus->mdio_lock); sw_dev 54 drivers/net/dsa/lan9303_mdio.c *val = lan9303_mdio_real_read(sw_dev->device, reg); sw_dev 55 drivers/net/dsa/lan9303_mdio.c *val |= (lan9303_mdio_real_read(sw_dev->device, reg + 2) << 16); sw_dev 56 drivers/net/dsa/lan9303_mdio.c mutex_unlock(&sw_dev->device->bus->mdio_lock); sw_dev 64 drivers/net/dsa/lan9303_mdio.c struct lan9303_mdio *sw_dev = dev_get_drvdata(chip->dev); sw_dev 66 drivers/net/dsa/lan9303_mdio.c return mdiobus_write_nested(sw_dev->device->bus, phy, reg, val); sw_dev 71 drivers/net/dsa/lan9303_mdio.c struct lan9303_mdio *sw_dev = dev_get_drvdata(chip->dev); sw_dev 73 drivers/net/dsa/lan9303_mdio.c return mdiobus_read_nested(sw_dev->device->bus, phy, reg); sw_dev 101 drivers/net/dsa/lan9303_mdio.c struct lan9303_mdio *sw_dev; sw_dev 104 drivers/net/dsa/lan9303_mdio.c sw_dev = devm_kzalloc(&mdiodev->dev, sizeof(struct lan9303_mdio), sw_dev 106 drivers/net/dsa/lan9303_mdio.c if (!sw_dev) sw_dev 109 drivers/net/dsa/lan9303_mdio.c sw_dev->chip.regmap = devm_regmap_init(&mdiodev->dev, NULL, sw_dev, sw_dev 111 drivers/net/dsa/lan9303_mdio.c if (IS_ERR(sw_dev->chip.regmap)) { sw_dev 112 drivers/net/dsa/lan9303_mdio.c ret = PTR_ERR(sw_dev->chip.regmap); sw_dev 118 drivers/net/dsa/lan9303_mdio.c sw_dev->device = mdiodev; sw_dev 119 drivers/net/dsa/lan9303_mdio.c dev_set_drvdata(&mdiodev->dev, sw_dev); sw_dev 120 drivers/net/dsa/lan9303_mdio.c sw_dev->chip.dev = &mdiodev->dev; sw_dev 122 drivers/net/dsa/lan9303_mdio.c sw_dev->chip.ops = &lan9303_mdio_phy_ops; sw_dev 124 drivers/net/dsa/lan9303_mdio.c ret = lan9303_probe(&sw_dev->chip, mdiodev->dev.of_node); sw_dev 135 drivers/net/dsa/lan9303_mdio.c struct lan9303_mdio *sw_dev = dev_get_drvdata(&mdiodev->dev); sw_dev 137 drivers/net/dsa/lan9303_mdio.c if (!sw_dev) sw_dev 140 drivers/net/dsa/lan9303_mdio.c lan9303_remove(&sw_dev->chip); sw_dev 736 drivers/staging/fsl-dpaa2/ethsw/ethsw.c static int ethsw_setup_irqs(struct fsl_mc_device *sw_dev) sw_dev 738 drivers/staging/fsl-dpaa2/ethsw/ethsw.c struct device *dev = &sw_dev->dev; sw_dev 744 drivers/staging/fsl-dpaa2/ethsw/ethsw.c err = fsl_mc_allocate_irqs(sw_dev); sw_dev 750 drivers/staging/fsl-dpaa2/ethsw/ethsw.c if (WARN_ON(sw_dev->obj_desc.irq_count != DPSW_IRQ_NUM)) { sw_dev 762 drivers/staging/fsl-dpaa2/ethsw/ethsw.c irq = sw_dev->irqs[DPSW_IRQ_INDEX_IF]; sw_dev 793 drivers/staging/fsl-dpaa2/ethsw/ethsw.c fsl_mc_free_irqs(sw_dev); sw_dev 797 drivers/staging/fsl-dpaa2/ethsw/ethsw.c static void ethsw_teardown_irqs(struct fsl_mc_device *sw_dev) sw_dev 799 drivers/staging/fsl-dpaa2/ethsw/ethsw.c struct device *dev = &sw_dev->dev; sw_dev 808 drivers/staging/fsl-dpaa2/ethsw/ethsw.c fsl_mc_free_irqs(sw_dev); sw_dev 1360 drivers/staging/fsl-dpaa2/ethsw/ethsw.c static int ethsw_init(struct fsl_mc_device *sw_dev) sw_dev 1362 drivers/staging/fsl-dpaa2/ethsw/ethsw.c struct device *dev = &sw_dev->dev; sw_dev 1368 drivers/staging/fsl-dpaa2/ethsw/ethsw.c ethsw->dev_id = sw_dev->obj_desc.id; sw_dev 1514 drivers/staging/fsl-dpaa2/ethsw/ethsw.c static void ethsw_takedown(struct fsl_mc_device *sw_dev) sw_dev 1516 drivers/staging/fsl-dpaa2/ethsw/ethsw.c struct device *dev = &sw_dev->dev; sw_dev 1527 drivers/staging/fsl-dpaa2/ethsw/ethsw.c static int ethsw_remove(struct fsl_mc_device *sw_dev) sw_dev 1534 drivers/staging/fsl-dpaa2/ethsw/ethsw.c dev = &sw_dev->dev; sw_dev 1537 drivers/staging/fsl-dpaa2/ethsw/ethsw.c ethsw_teardown_irqs(sw_dev); sw_dev 1550 drivers/staging/fsl-dpaa2/ethsw/ethsw.c ethsw_takedown(sw_dev); sw_dev 1611 drivers/staging/fsl-dpaa2/ethsw/ethsw.c static int ethsw_probe(struct fsl_mc_device *sw_dev) sw_dev 1613 drivers/staging/fsl-dpaa2/ethsw/ethsw.c struct device *dev = &sw_dev->dev; sw_dev 1626 drivers/staging/fsl-dpaa2/ethsw/ethsw.c err = fsl_mc_portal_allocate(sw_dev, FSL_MC_IO_ATOMIC_CONTEXT_PORTAL, sw_dev 1636 drivers/staging/fsl-dpaa2/ethsw/ethsw.c err = ethsw_init(sw_dev); sw_dev 1666 drivers/staging/fsl-dpaa2/ethsw/ethsw.c err = ethsw_setup_irqs(sw_dev); sw_dev 1685 drivers/staging/fsl-dpaa2/ethsw/ethsw.c ethsw_takedown(sw_dev);