2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-15 00:34:10 +08:00
linux-next/include/linux/acpi_mdio.h
Calvin Johnson 803ca24d2f net: mdio: Add ACPI support code for mdio
Define acpi_mdiobus_register() to Register mii_bus and create PHYs for
each ACPI child node.

Signed-off-by: Calvin Johnson <calvin.johnson@oss.nxp.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Acked-by: Grant Likely <grant.likely@arm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-06-11 13:08:53 -07:00

27 lines
631 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* ACPI helper for the MDIO (Ethernet PHY) API
*/
#ifndef __LINUX_ACPI_MDIO_H
#define __LINUX_ACPI_MDIO_H
#include <linux/phy.h>
#if IS_ENABLED(CONFIG_ACPI_MDIO)
int acpi_mdiobus_register(struct mii_bus *mdio, struct fwnode_handle *fwnode);
#else /* CONFIG_ACPI_MDIO */
static inline int
acpi_mdiobus_register(struct mii_bus *mdio, struct fwnode_handle *fwnode)
{
/*
* Fall back to mdiobus_register() function to register a bus.
* This way, we don't have to keep compat bits around in drivers.
*/
return mdiobus_register(mdio);
}
#endif
#endif /* __LINUX_ACPI_MDIO_H */