Thread (14 messages) 14 messages, 3 authors, 15d ago

Re: [PATCH net-next v22 4/9] mfd: an8855: Add support for Airoha AN8855 Switch

flat view

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-09-21 20:44:21
Also in: linux-arm-kernel, linux-devicetree, linux-mediatek, lkml

On Tue, 15 Sep 2026 14:38:01 +0200 Christian Marangi wrote:
Add support for Airoha AN8855 Switch that provide support for a DSA
switch and a NVMEM provider.

Also make use of the mdio-regmap driver and register a regmap for each
internal PHY of the switch.
This is needed to handle the double usage of the PHYs as both PHY and
Switch accessor.
GCC spews warnings:

drivers/mfd/airoha-an8855.c: In function ‘an8855_mdio_register’:
drivers/mfd/airoha-an8855.c:438:48: warning: ‘-phy’ directive output may be truncated writing 4 bytes into a region of size between 1 and 61 [-Wformat-truncation=]
  438 |         snprintf(mrc.name, MII_BUS_ID_SIZE, "%s-phy%d", priv->bus->id, addr);
      |                                                ^~~~
In function ‘an8855_phy_bus_register’,
    inlined from ‘an8855_mdio_register’ at ../drivers/mfd/airoha-an8855.c:469:9:
drivers/mfd/airoha-an8855.c:438:45: note: using the range [-2147483648, 2147483647] for directive argument
  438 |         snprintf(mrc.name, MII_BUS_ID_SIZE, "%s-phy%d", priv->bus->id, addr);
      |                                             ^~~~~~~~~~
drivers/mfd/airoha-an8855.c:438:9: note: ‘snprintf’ output between 6 and 76 bytes into a destination of size 61
  438 |         snprintf(mrc.name, MII_BUS_ID_SIZE, "%s-phy%d", priv->bus->id, addr);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help