Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
ethphy_driver_api Struct Reference

@def_driverbackendgroup{Ethernet PHY,ethernet_phy} More...

#include <phy.h>

Data Fields

int(* get_link )(const struct device *dev, struct phy_link_state *state)
 @driver_ops_optional Get PHY link state.
int(* cfg_link )(const struct device *dev, enum phy_link_speed adv_speeds, enum phy_cfg_link_flag flags)
 @driver_ops_optional Configure PHY link.
int(* link_cb_set )(const struct device *dev, phy_callback_t cb, void *user_data)
 @driver_ops_optional Set link state change callback.
int(* read )(const struct device *dev, uint16_t reg_addr, uint32_t *data)
 @driver_ops_optional Read PHY registers.
int(* write )(const struct device *dev, uint16_t reg_addr, uint32_t data)
 @driver_ops_optional Write PHY register.
int(* read_c45 )(const struct device *dev, uint8_t devad, uint16_t regad, uint16_t *data)
 @driver_ops_optional Read PHY C45 register.
int(* write_c45 )(const struct device *dev, uint8_t devad, uint16_t regad, uint16_t data)
 @driver_ops_optional Write PHY C45 register.
int(* set_plca_cfg )(const struct device *dev, struct phy_plca_cfg *plca_cfg)
 @driver_ops_optional Write PHY PLCA configuration.
int(* get_plca_cfg )(const struct device *dev, struct phy_plca_cfg *plca_cfg)
 @driver_ops_optional Read PHY PLCA configuration.
int(* get_plca_sts )(const struct device *dev, bool *plca_sts)
 @driver_ops_optional Read PHY PLCA status.

Detailed Description

@def_driverbackendgroup{Ethernet PHY,ethernet_phy}

@driver_ops{Ethernet PHY}

Field Documentation

◆ cfg_link

int(* ethphy_driver_api::cfg_link) (const struct device *dev, enum phy_link_speed adv_speeds, enum phy_cfg_link_flag flags)

@driver_ops_optional Configure PHY link.

◆ get_link

int(* ethphy_driver_api::get_link) (const struct device *dev, struct phy_link_state *state)

@driver_ops_optional Get PHY link state.

◆ get_plca_cfg

int(* ethphy_driver_api::get_plca_cfg) (const struct device *dev, struct phy_plca_cfg *plca_cfg)

@driver_ops_optional Read PHY PLCA configuration.

Attention
Available only when the following Kconfig option is enabled:
CONFIG_ETH_PHY_API_PLCA 
.

◆ get_plca_sts

int(* ethphy_driver_api::get_plca_sts) (const struct device *dev, bool *plca_sts)

@driver_ops_optional Read PHY PLCA status.

Attention
Available only when the following Kconfig option is enabled:
CONFIG_ETH_PHY_API_PLCA 
.

◆ link_cb_set

int(* ethphy_driver_api::link_cb_set) (const struct device *dev, phy_callback_t cb, void *user_data)

@driver_ops_optional Set link state change callback.

Important
Drivers must invoke the callback once after setting it, even if link state has not changed.

◆ read

int(* ethphy_driver_api::read) (const struct device *dev, uint16_t reg_addr, uint32_t *data)

@driver_ops_optional Read PHY registers.

◆ read_c45

int(* ethphy_driver_api::read_c45) (const struct device *dev, uint8_t devad, uint16_t regad, uint16_t *data)

@driver_ops_optional Read PHY C45 register.

◆ set_plca_cfg

int(* ethphy_driver_api::set_plca_cfg) (const struct device *dev, struct phy_plca_cfg *plca_cfg)

@driver_ops_optional Write PHY PLCA configuration.

Attention
Available only when the following Kconfig option is enabled:
CONFIG_ETH_PHY_API_PLCA 
.

◆ write

int(* ethphy_driver_api::write) (const struct device *dev, uint16_t reg_addr, uint32_t data)

@driver_ops_optional Write PHY register.

◆ write_c45

int(* ethphy_driver_api::write_c45) (const struct device *dev, uint8_t devad, uint16_t regad, uint16_t data)

@driver_ops_optional Write PHY C45 register.


The documentation for this struct was generated from the following file:
  • include/zephyr/net/phy.h