Home
last modified time | relevance | path

Searched refs:sw_dev (Results 1 – 3 of 3) sorted by relevance

/Linux-v5.10/drivers/net/dsa/
Dlan9303_mdio.c32 struct lan9303_mdio *sw_dev = (struct lan9303_mdio *)ctx; in lan9303_mdio_write() local
35 mutex_lock(&sw_dev->device->bus->mdio_lock); in lan9303_mdio_write()
36 lan9303_mdio_real_write(sw_dev->device, reg, val & 0xffff); in lan9303_mdio_write()
37 lan9303_mdio_real_write(sw_dev->device, reg + 2, (val >> 16) & 0xffff); in lan9303_mdio_write()
38 mutex_unlock(&sw_dev->device->bus->mdio_lock); in lan9303_mdio_write()
50 struct lan9303_mdio *sw_dev = (struct lan9303_mdio *)ctx; in lan9303_mdio_read() local
53 mutex_lock(&sw_dev->device->bus->mdio_lock); in lan9303_mdio_read()
54 *val = lan9303_mdio_real_read(sw_dev->device, reg); in lan9303_mdio_read()
55 *val |= (lan9303_mdio_real_read(sw_dev->device, reg + 2) << 16); in lan9303_mdio_read()
56 mutex_unlock(&sw_dev->device->bus->mdio_lock); in lan9303_mdio_read()
[all …]
Dlan9303_i2c.c35 struct lan9303_i2c *sw_dev; in lan9303_i2c_probe() local
38 sw_dev = devm_kzalloc(&client->dev, sizeof(struct lan9303_i2c), in lan9303_i2c_probe()
40 if (!sw_dev) in lan9303_i2c_probe()
43 sw_dev->chip.regmap = devm_regmap_init_i2c(client, in lan9303_i2c_probe()
45 if (IS_ERR(sw_dev->chip.regmap)) { in lan9303_i2c_probe()
46 ret = PTR_ERR(sw_dev->chip.regmap); in lan9303_i2c_probe()
53 sw_dev->device = client; in lan9303_i2c_probe()
54 i2c_set_clientdata(client, sw_dev); in lan9303_i2c_probe()
55 sw_dev->chip.dev = &client->dev; in lan9303_i2c_probe()
57 sw_dev->chip.ops = &lan9303_indirect_phy_ops; in lan9303_i2c_probe()
[all …]
/Linux-v5.10/drivers/staging/fsl-dpaa2/ethsw/
Dethsw.c828 static int dpaa2_switch_setup_irqs(struct fsl_mc_device *sw_dev) in dpaa2_switch_setup_irqs() argument
830 struct device *dev = &sw_dev->dev; in dpaa2_switch_setup_irqs()
836 err = fsl_mc_allocate_irqs(sw_dev); in dpaa2_switch_setup_irqs()
842 if (WARN_ON(sw_dev->obj_desc.irq_count != DPSW_IRQ_NUM)) { in dpaa2_switch_setup_irqs()
854 irq = sw_dev->irqs[DPSW_IRQ_INDEX_IF]; in dpaa2_switch_setup_irqs()
885 fsl_mc_free_irqs(sw_dev); in dpaa2_switch_setup_irqs()
889 static void dpaa2_switch_teardown_irqs(struct fsl_mc_device *sw_dev) in dpaa2_switch_teardown_irqs() argument
891 struct device *dev = &sw_dev->dev; in dpaa2_switch_teardown_irqs()
900 fsl_mc_free_irqs(sw_dev); in dpaa2_switch_teardown_irqs()
1481 static int dpaa2_switch_init(struct fsl_mc_device *sw_dev) in dpaa2_switch_init() argument
[all …]