public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v1 0/5] net: mdiobus: HIde ACPI implementation
@ 2026-05-04  7:29 Andy Shevchenko
  2026-05-04  7:29 ` [PATCH net-next v1 1/5] net: mdiobus: Provide fwnode_mdiobus_register() Andy Shevchenko
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Andy Shevchenko @ 2026-05-04  7:29 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel, netdev
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Heiner Kallweit, Russell King

This mini-series is dedicated to hiding ACPI implementation details
from the wider users as they (as of today) do not need to know that.
That also introduces the agnostic API that is preferred over OF /
ACPI / et cetera one.

I haven't tried to unify __*_mdiobus_register() as it seems using
something that may differ in ACPI vs. OF cases, it can be done later
on, if one knows how to do that with all the details.

The change has been compile tested (including configurations with
CONFIG_ACPI=n).

Andy Shevchenko (5):
  net: mdiobus: Provide fwnode_mdiobus_register()
  net: mvmdio: Switch to using fwnode_mdiobus_register()
  net/fsl: xgmac_mdio: Switch to using fwnode_mdiobus_register()
  net/fsl: xgmac_mdio: Reuse existing pointer to fwnode
  net: mdiobus: Hide acpi_mdio.h

 drivers/net/ethernet/freescale/xgmac_mdio.c | 23 +++++---------
 drivers/net/ethernet/marvell/mvmdio.c       | 11 ++-----
 drivers/net/mdio/acpi_mdio.c                |  3 +-
 drivers/net/mdio/fwnode_mdio.c              | 16 ++++++++++
 drivers/net/mdio/mdio.h                     |  4 +++
 include/linux/acpi_mdio.h                   | 33 ---------------------
 include/linux/fwnode_mdio.h                 | 17 +++++++++++
 7 files changed, 49 insertions(+), 58 deletions(-)
 create mode 100644 drivers/net/mdio/mdio.h
 delete mode 100644 include/linux/acpi_mdio.h

-- 
2.50.1


^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [PATCH net-next v1 1/5] net: mdiobus: Provide fwnode_mdiobus_register()
@ 2026-05-04 14:16 Victor Nogueira
  2026-05-04 14:41 ` Andy Shevchenko
  0 siblings, 1 reply; 12+ messages in thread
From: Victor Nogueira @ 2026-05-04 14:16 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel, Linux Kernel Network Developers
  Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Heiner Kallweit, Russell King

Hi!

On 04/05/2026 04:29, Andy Shevchenko wrote:
> Provide an agnostic helper to register MDIO bus independently on
> the firmware node provider.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> [...]
> @@ -187,3 +189,16 @@ int fwnode_mdiobus_register_phy(struct mii_bus *bus,
>       return rc;
>   }
>   EXPORT_SYMBOL(fwnode_mdiobus_register_phy);
> +
> +int __fwnode_mdiobus_register(struct mii_bus *mdio, struct fwnode_handle *fwnode,
> +                           struct module *owner)
> +{
> +     if (is_of_node(fwnode))
> +             return __of_mdiobus_register(mdio, to_of_node(fwnode), owner);

Build seems to break when CONFIG_OF_MDIO is not defined:

drivers/net/mdio/fwnode_mdio.c: In function ‘__fwnode_mdiobus_register’:
drivers/net/mdio/fwnode_mdio.c:198:24: error: implicit declaration of
function ‘__of_mdiobus_register’; did you mean ‘of_mdiobus_register’?
[-Wimplicit-function-declaration]
  198 |                 return __of_mdiobus_register(mdio,
to_of_node(fwnode), owner);

cheers,
Victor

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-05-05  4:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-04  7:29 [PATCH net-next v1 0/5] net: mdiobus: HIde ACPI implementation Andy Shevchenko
2026-05-04  7:29 ` [PATCH net-next v1 1/5] net: mdiobus: Provide fwnode_mdiobus_register() Andy Shevchenko
2026-05-04  7:29 ` [PATCH net-next v1 2/5] net: mvmdio: Switch to using fwnode_mdiobus_register() Andy Shevchenko
2026-05-04  7:29 ` [PATCH net-next v1 3/5] net/fsl: xgmac_mdio: " Andy Shevchenko
2026-05-04  7:29 ` [PATCH net-next v1 4/5] net/fsl: xgmac_mdio: Reuse existing pointer to fwnode Andy Shevchenko
2026-05-04  7:29 ` [PATCH net-next v1 5/5] net: mdiobus: Hide acpi_mdio.h Andy Shevchenko
2026-05-04 13:02 ` [PATCH net-next v1 0/5] net: mdiobus: HIde ACPI implementation Andrew Lunn
2026-05-04 13:49   ` Andy Shevchenko
2026-05-04 15:16     ` Andrew Lunn
2026-05-05  4:54       ` Andy Shevchenko
  -- strict thread matches above, loose matches on Subject: below --
2026-05-04 14:16 [PATCH net-next v1 1/5] net: mdiobus: Provide fwnode_mdiobus_register() Victor Nogueira
2026-05-04 14:41 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox