diff --git a/drivers/ethernet/phy/phy_microchip_t1s.c b/drivers/ethernet/phy/phy_microchip_t1s.c index 48f789f0a091b..71d6de7b859c2 100644 --- a/drivers/ethernet/phy/phy_microchip_t1s.c +++ b/drivers/ethernet/phy/phy_microchip_t1s.c @@ -12,6 +12,8 @@ #include #include +#include "phy_oa_tc14_plca.h" + #define LOG_MODULE_NAME phy_mc_t1s #define LOG_LEVEL CONFIG_PHY_LOG_LEVEL #include diff --git a/drivers/ethernet/phy/phy_oa_tc14_plca.c b/drivers/ethernet/phy/phy_oa_tc14_plca.c index 1505bae8f78a1..5afe3a9658272 100644 --- a/drivers/ethernet/phy/phy_oa_tc14_plca.c +++ b/drivers/ethernet/phy/phy_oa_tc14_plca.c @@ -8,6 +8,8 @@ #include #include +#include "phy_oa_tc14_plca.h" + /* Open Alliance TC14 (10BASE-T1S) PLCA registers */ #define MDIO_OATC14_PLCA_IDVER 0xca00 /* PLCA ID and version */ #define MDIO_OATC14_PLCA_CTRL0 0xca01 /* PLCA Control register 0 */ diff --git a/drivers/ethernet/phy/phy_oa_tc14_plca.h b/drivers/ethernet/phy/phy_oa_tc14_plca.h new file mode 100644 index 0000000000000..77da517462155 --- /dev/null +++ b/drivers/ethernet/phy/phy_oa_tc14_plca.h @@ -0,0 +1,49 @@ +/* + * SPDX-FileCopyrightText: Copyright The Zephyr Project Contributors + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#ifndef ZEPHYR_DRIVERS_ETHERNET_PHY_OA_TC14_PLCA_H_ +#define ZEPHYR_DRIVERS_ETHERNET_PHY_OA_TC14_PLCA_H_ + +/** + * @brief Write PHY PLCA configuration + * + * This routine provides a generic interface to configure PHY PLCA settings. + * + * @param[in] dev PHY device structure + * @param[in] plca_cfg Pointer to plca configuration structure + * + * @retval 0 If successful. + * @retval -EIO If communication with PHY failed. + */ +int genphy_get_plca_cfg(const struct device *dev, struct phy_plca_cfg *plca_cfg); + +/** + * @brief Read PHY PLCA configuration + * + * This routine provides a generic interface to get PHY PLCA settings. + * + * @param[in] dev PHY device structure + * @param plca_cfg Pointer to plca configuration structure + * + * @retval 0 If successful. + * @retval -EIO If communication with PHY failed. + */ +int genphy_set_plca_cfg(const struct device *dev, struct phy_plca_cfg *plca_cfg); + +/** + * @brief Read PHY PLCA status + * + * This routine provides a generic interface to get PHY PLCA status. + * + * @param[in] dev PHY device structure + * @param plca_status Pointer to plca status + * + * @retval 0 If successful. + * @retval -EIO If communication with PHY failed. + */ +int genphy_get_plca_sts(const struct device *dev, bool *plca_status); + +#endif /* ZEPHYR_DRIVERS_ETHERNET_PHY_OA_TC14_PLCA_H_ */ diff --git a/include/zephyr/net/phy.h b/include/zephyr/net/phy.h index 81ca9c9515f4a..48a78905b959d 100644 --- a/include/zephyr/net/phy.h +++ b/include/zephyr/net/phy.h @@ -121,45 +121,6 @@ struct phy_plca_cfg { uint8_t to_timer; }; -/** - * @brief Write PHY PLCA configuration - * - * This routine provides a generic interface to configure PHY PLCA settings. - * - * @param[in] dev PHY device structure - * @param[in] plca_cfg Pointer to plca configuration structure - * - * @retval 0 If successful. - * @retval -EIO If communication with PHY failed. - */ -int genphy_get_plca_cfg(const struct device *dev, struct phy_plca_cfg *plca_cfg); - -/** - * @brief Read PHY PLCA configuration - * - * This routine provides a generic interface to get PHY PLCA settings. - * - * @param[in] dev PHY device structure - * @param plca_cfg Pointer to plca configuration structure - * - * @retval 0 If successful. - * @retval -EIO If communication with PHY failed. - */ -int genphy_set_plca_cfg(const struct device *dev, struct phy_plca_cfg *plca_cfg); - -/** - * @brief Read PHY PLCA status - * - * This routine provides a generic interface to get PHY PLCA status. - * - * @param[in] dev PHY device structure - * @param plca_status Pointer to plca status - * - * @retval 0 If successful. - * @retval -EIO If communication with PHY failed. - */ -int genphy_get_plca_sts(const struct device *dev, bool *plca_status); - /** * @typedef phy_callback_t * @brief Define the callback function signature for