1 /* 2 * Copyright (c) 2023 PHOENIX CONTACT Electronics GmbH 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef PHY_ADIN2111_PRIV_H__ 8 #define PHY_ADIN2111_PRIV_H__ 9 10 #include <zephyr/device.h> 11 #include <zephyr/net/phy.h> 12 13 /** 14 * @brief Handles PHY interrupt. 15 * 16 * @note Used internally by the ADIN offloaded ISR handler. 17 * The caller is responsible for device lock. 18 * Shall not be called from ISR. 19 * 20 * @param[in] dev PHY device. 21 * @param[out] state Output of the link state. 22 * 23 * @retval 0 Successful and link state changed. 24 * @retval -EAGAIN Successful but link state didn't change. 25 * @retval <0 MDIO error. 26 */ 27 int phy_adin2111_handle_phy_irq(const struct device *dev, 28 struct phy_link_state *state); 29 30 #endif /* PHY_ADIN2111_PRIV_H__ */ 31