drivers: ethernet: phy: remove unused/wrong cfg_link
if we can't use cfg_link to (re-)configure the link, we don't need it and shouldn't have it. Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
This commit is contained in:
parent
c47cc3abda
commit
b051c7e550
5 changed files with 0 additions and 60 deletions
|
@ -348,18 +348,6 @@ static int phy_adin2111_get_link_state(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int phy_adin2111_cfg_link(const struct device *dev,
|
||||
enum phy_link_speed adv_speeds)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
if (!!(adv_speeds & LINK_FULL_10BASE)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
static int phy_adin2111_reset(const struct device *dev)
|
||||
{
|
||||
int ret;
|
||||
|
@ -624,7 +612,6 @@ static int phy_adin2111_link_cb_set(const struct device *dev, phy_callback_t cb,
|
|||
|
||||
static DEVICE_API(ethphy, phy_adin2111_api) = {
|
||||
.get_link = phy_adin2111_get_link_state,
|
||||
.cfg_link = phy_adin2111_cfg_link,
|
||||
.link_cb_set = phy_adin2111_link_cb_set,
|
||||
.read = phy_adin2111_reg_read,
|
||||
.write = phy_adin2111_reg_write,
|
||||
|
|
|
@ -420,17 +420,6 @@ static int lan86xx_config_collision_detection(const struct device *dev, bool plc
|
|||
return phy_mc_t1s_c45_write(dev, MDIO_MMD_VENDOR_SPECIFIC2, LAN86XX_REG_COL_DET_CTRL0, new);
|
||||
}
|
||||
|
||||
static int phy_mc_t1s_cfg_link(const struct device *dev, enum phy_link_speed speeds)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
if (speeds & LINK_HALF_10BASE) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
static int phy_mc_t1s_id(const struct device *dev, uint32_t *phy_id)
|
||||
{
|
||||
uint32_t value;
|
||||
|
@ -533,7 +522,6 @@ static int phy_mc_t1s_init(const struct device *dev)
|
|||
|
||||
static DEVICE_API(ethphy, mc_t1s_phy_api) = {
|
||||
.get_link = phy_mc_t1s_get_link,
|
||||
.cfg_link = phy_mc_t1s_cfg_link,
|
||||
.link_cb_set = phy_mc_t1s_link_cb_set,
|
||||
.set_plca_cfg = phy_mc_t1s_set_plca_cfg,
|
||||
.get_plca_cfg = genphy_get_plca_cfg,
|
||||
|
|
|
@ -399,16 +399,6 @@ static int phy_mc_vsc8541_get_link(const struct device *dev, struct phy_link_sta
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Reconfigure the link speed; currently unused
|
||||
*
|
||||
*/
|
||||
static int phy_mc_vsc8541_cfg_link(const struct device *dev, enum phy_link_speed speeds)
|
||||
{
|
||||
/* the initial version does not support reconfiguration */
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set callback which is used to announce link status changes
|
||||
*
|
||||
|
@ -542,7 +532,6 @@ static int phy_mc_vsc8541_write(const struct device *dev, uint16_t reg_addr, uin
|
|||
|
||||
static DEVICE_API(ethphy, mc_vsc8541_phy_api) = {
|
||||
.get_link = phy_mc_vsc8541_get_link,
|
||||
.cfg_link = phy_mc_vsc8541_cfg_link,
|
||||
.link_cb_set = phy_mc_vsc8541_link_cb_set,
|
||||
.read = phy_mc_vsc8541_read,
|
||||
.write = phy_mc_vsc8541_write,
|
||||
|
|
|
@ -338,17 +338,6 @@ static void phy_tja1103_cfg_irq_poll(const struct device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
static int phy_tja1103_cfg_link(const struct device *dev, enum phy_link_speed adv_speeds)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
if (adv_speeds & LINK_FULL_100BASE) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
static int phy_tja1103_init(const struct device *dev)
|
||||
{
|
||||
const struct phy_tja1103_config *const cfg = dev->config;
|
||||
|
@ -437,7 +426,6 @@ static int phy_tja1103_link_cb_set(const struct device *dev, phy_callback_t cb,
|
|||
|
||||
static DEVICE_API(ethphy, phy_tja1103_api) = {
|
||||
.get_link = phy_tja1103_get_link_state,
|
||||
.cfg_link = phy_tja1103_cfg_link,
|
||||
.link_cb_set = phy_tja1103_link_cb_set,
|
||||
.read = phy_tja1103_reg_read,
|
||||
.write = phy_tja1103_reg_write,
|
||||
|
|
|
@ -171,17 +171,6 @@ static void phy_tja11xx_cfg_irq_poll(const struct device *dev)
|
|||
monitor_work_handler(&data->monitor_work.work);
|
||||
}
|
||||
|
||||
static int phy_tja11xx_cfg_link(const struct device *dev, enum phy_link_speed adv_speeds)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
if (adv_speeds & LINK_FULL_100BASE) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
static int phy_tja11xx_init(const struct device *dev)
|
||||
{
|
||||
struct phy_tja11xx_data *const data = dev->data;
|
||||
|
@ -233,7 +222,6 @@ static int phy_tja11xx_link_cb_set(const struct device *dev, phy_callback_t cb,
|
|||
|
||||
static const struct ethphy_driver_api phy_tja11xx_api = {
|
||||
.get_link = phy_tja11xx_get_link_state,
|
||||
.cfg_link = phy_tja11xx_cfg_link,
|
||||
.link_cb_set = phy_tja11xx_link_cb_set,
|
||||
.read = phy_tja11xx_reg_read,
|
||||
.write = phy_tja11xx_reg_write,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue