acpi_mdio.h 819 B

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