1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
2 | /* |
3 | * ACPI helper for the MDIO (Ethernet PHY) API |
4 | */ |
5 | |
6 | #ifndef __LINUX_ACPI_MDIO_H |
7 | #define __LINUX_ACPI_MDIO_H |
8 | |
9 | #include <linux/phy.h> |
10 | |
11 | #if IS_ENABLED(CONFIG_ACPI_MDIO) |
12 | int __acpi_mdiobus_register(struct mii_bus *mdio, struct fwnode_handle *fwnode, |
13 | struct module *owner); |
14 | |
15 | static inline int |
16 | acpi_mdiobus_register(struct mii_bus *mdio, struct fwnode_handle *handle) |
17 | { |
18 | return __acpi_mdiobus_register(mdio, fwnode: handle, THIS_MODULE); |
19 | } |
20 | #else /* CONFIG_ACPI_MDIO */ |
21 | static inline int |
22 | acpi_mdiobus_register(struct mii_bus *mdio, struct fwnode_handle *fwnode) |
23 | { |
24 | /* |
25 | * Fall back to mdiobus_register() function to register a bus. |
26 | * This way, we don't have to keep compat bits around in drivers. |
27 | */ |
28 | |
29 | return mdiobus_register(mdio); |
30 | } |
31 | #endif |
32 | |
33 | #endif /* __LINUX_ACPI_MDIO_H */ |
34 | |