[PATCH net-next v2 03/14] net: pcs: pcs-xpcs-regmap: support XPCS memory-mapped MDIO bus via regmap

Andrew Lunn andrew at lunn.ch
Sun Jun 7 10:47:25 PDT 2026


> +struct dw_xpcs *devm_xpcs_regmap_register(struct device *dev,
> +					  const struct xpcs_regmap_config *config)
> +{
> +	static atomic_t id = ATOMIC_INIT(-1);

...

> +	snprintf(pxpcs->bus->id, MII_BUS_ID_SIZE,
> +		 "dwxpcs-%x", atomic_inc_return(&id));

dev_name(dev) should be unique, and it also makes it easier to
associate the PCS to the MAC when looking in /sys.

	Andrew



More information about the linux-arm-kernel mailing list