return b53_switch_reset(dev);
}
-struct b53_device *b53_switch_alloc(struct device *base, struct b53_io_ops *ops,
- void *priv)
+struct b53_device *b53_swconfig_switch_alloc(struct device *base, struct b53_io_ops *ops,
+ void *priv)
{
struct b53_device *dev;
return dev;
}
-EXPORT_SYMBOL(b53_switch_alloc);
+EXPORT_SYMBOL(b53_swconfig_switch_alloc);
-int b53_switch_detect(struct b53_device *dev)
+int b53_swconfig_switch_detect(struct b53_device *dev)
{
u32 id32;
u16 tmp;
return b53_read8(dev, B53_MGMT_PAGE, B53_REV_ID,
&dev->core_rev);
}
-EXPORT_SYMBOL(b53_switch_detect);
+EXPORT_SYMBOL(b53_swconfig_switch_detect);
-int b53_switch_register(struct b53_device *dev)
+int b53_swconfig_switch_register(struct b53_device *dev)
{
int ret;
dev->sw_dev.alias = dev->pdata->alias;
}
- if (!dev->chip_id && b53_switch_detect(dev))
+ if (!dev->chip_id && b53_swconfig_switch_detect(dev))
return -EINVAL;
ret = b53_switch_init(dev);
return register_switch(&dev->sw_dev, NULL);
}
-EXPORT_SYMBOL(b53_switch_register);
+EXPORT_SYMBOL(b53_swconfig_switch_register);
MODULE_AUTHOR("Jonas Gorski <jogo@openwrt.org>");
MODULE_DESCRIPTION("B53 switch library");
if (phydev->mdio.addr != B53_PSEUDO_PHY && phydev->mdio.addr != 0)
return -ENODEV;
- dev = b53_switch_alloc(&phydev->mdio.dev, &b53_mdio_ops, phydev->mdio.bus);
+ dev = b53_swconfig_switch_alloc(&phydev->mdio.dev, &b53_mdio_ops, phydev->mdio.bus);
if (!dev)
return -ENOMEM;
dev->pdata = NULL;
mutex_init(&dev->reg_mutex);
- ret = b53_switch_detect(dev);
+ ret = b53_swconfig_switch_detect(dev);
if (ret)
return ret;
linkmode_copy(phydev->advertising, phydev->supported);
- ret = b53_switch_register(dev);
+ ret = b53_swconfig_switch_register(dev);
if (ret) {
dev_err(dev->dev, "failed to register switch: %i\n", ret);
return ret;
if (!pdata)
return -EINVAL;
- dev = b53_switch_alloc(&pdev->dev, &b53_mmap_ops, pdata->regs);
+ dev = b53_swconfig_switch_alloc(&pdev->dev, &b53_mmap_ops, pdata->regs);
if (!dev)
return -ENOMEM;
platform_set_drvdata(pdev, dev);
- return b53_switch_register(dev);
+ return b53_swconfig_switch_register(dev);
}
static int b53_mmap_remove(struct platform_device *pdev)
return container_of(sw, struct b53_device, sw_dev);
}
-struct b53_device *b53_switch_alloc(struct device *base, struct b53_io_ops *ops,
- void *priv);
+struct b53_device *b53_swconfig_switch_alloc(struct device *base, struct b53_io_ops *ops,
+ void *priv);
-int b53_switch_detect(struct b53_device *dev);
+int b53_swconfig_switch_detect(struct b53_device *dev);
-int b53_switch_register(struct b53_device *dev);
+int b53_swconfig_switch_register(struct b53_device *dev);
static inline void b53_switch_remove(struct b53_device *dev)
{
struct b53_device *dev;
int ret;
- dev = b53_switch_alloc(&spi->dev, &b53_spi_ops, spi);
+ dev = b53_swconfig_switch_alloc(&spi->dev, &b53_spi_ops, spi);
if (!dev)
return -ENOMEM;
if (spi->dev.platform_data)
dev->pdata = spi->dev.platform_data;
- ret = b53_switch_register(dev);
+ ret = b53_swconfig_switch_register(dev);
if (ret)
return ret;
if (!pdata)
return -EINVAL;
- dev = b53_switch_alloc(&pdev->dev, &b53_srab_ops, pdata->regs);
+ dev = b53_swconfig_switch_alloc(&pdev->dev, &b53_srab_ops, pdata->regs);
if (!dev)
return -ENOMEM;
platform_set_drvdata(pdev, dev);
- return b53_switch_register(dev);
+ return b53_swconfig_switch_register(dev);
}
static int b53_srab_remove(struct platform_device *pdev)