Lines Matching +full:polarity +full:- +full:supported

1 // SPDX-License-Identifier: GPL-2.0+
70 #define QCA808X_MMD7_LED_CTRL(x) (0x8078 - ((x) * 2))
73 #define QCA808X_MMD7_LED_FORCE_CTRL(x) (0x8079 - ((x) * 2))
151 return (phydev->master_slave_get == MASTER_SLAVE_CFG_MASTER_FORCE) || in qca808x_is_prefer_master()
152 (phydev->master_slave_get == MASTER_SLAVE_CFG_MASTER_PREFERRED); in qca808x_is_prefer_master()
157 return linkmode_test_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT, phydev->supported); in qca808x_has_fast_retrain_or_slave_seed()
173 unsigned long *possible = phydev->possible_interfaces; in qca808x_fill_possible_interfaces()
183 struct device *dev = &phydev->mdio.dev; in qca808x_probe()
188 return -ENOMEM; in qca808x_probe()
190 /* Init LED polarity mode to -1 */ in qca808x_probe()
191 priv->led_polarity_mode = -1; in qca808x_probe()
193 phydev->priv = priv; in qca808x_probe()
200 struct qca808x_priv *priv = phydev->priv; in qca808x_config_init()
203 /* Default to LED Active High if active-low not in DT */ in qca808x_config_init()
204 if (priv->led_polarity_mode == -1) { in qca808x_config_init()
266 linkmode_mod_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT, phydev->lp_advertising, in qca808x_read_status()
280 if (phydev->link) { in qca808x_read_status()
281 if (phydev->speed == SPEED_2500) in qca808x_read_status()
282 phydev->interface = PHY_INTERFACE_MODE_2500BASEX; in qca808x_read_status()
284 phydev->interface = PHY_INTERFACE_MODE_SGMII; in qca808x_read_status()
296 if (phydev->master_slave_state == MASTER_SLAVE_STATE_ERR || in qca808x_read_status()
341 /* Force 1000base-T needs to configure PMA/PMD and MII_BMCR */ in qca808x_cable_test_start()
342 phydev->duplex = DUPLEX_FULL; in qca808x_cable_test_start()
343 phydev->speed = SPEED_1000; in qca808x_cable_test_start()
372 * but it is supported by qca808x PHY, so we add it here in qca808x_get_features()
375 linkmode_set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, phydev->supported); in qca808x_get_features()
382 linkmode_clear_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT, phydev->supported); in qca808x_get_features()
399 if (phydev->autoneg == AUTONEG_DISABLE) in qca808x_config_aneg()
402 if (linkmode_test_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT, phydev->advertising)) in qca808x_config_aneg()
418 mdiobus_c45_modify_changed(phydev->mdio.bus, phydev->mdio.addr + 1, in qca808x_link_change_notify()
421 phydev->link ? QCA8081_PHY_FIFO_RSTN : 0); in qca808x_link_change_notify()
446 return -EOPNOTSUPP; in qca808x_led_parse_netdev()
461 return -EINVAL; in qca808x_led_hw_control_enable()
473 return -EINVAL; in qca808x_led_hw_is_supported()
485 return -EINVAL; in qca808x_led_hw_control_set()
520 return -EINVAL; in qca808x_led_hw_control_get()
524 return -EINVAL; in qca808x_led_hw_control_get()
554 return -EINVAL; in qca808x_led_hw_control_reset()
569 return -EINVAL; in qca808x_led_brightness_set()
588 return -EINVAL; in qca808x_led_blink_set()
597 struct qca808x_priv *priv = phydev->priv; in qca808x_led_polarity_set()
607 return -EINVAL; in qca808x_led_polarity_set()
611 /* PHY polarity is global and can't be set per LED. in qca808x_led_polarity_set()
612 * To detect this, check if last requested polarity mode in qca808x_led_polarity_set()
615 if (priv->led_polarity_mode >= 0 && in qca808x_led_polarity_set()
616 priv->led_polarity_mode != active_low) { in qca808x_led_polarity_set()
617 phydev_err(phydev, "PHY polarity is global. Mismatched polarity on different LED\n"); in qca808x_led_polarity_set()
618 return -EINVAL; in qca808x_led_polarity_set()
621 /* Save the last PHY polarity mode */ in qca808x_led_polarity_set()
622 priv->led_polarity_mode = active_low; in qca808x_led_polarity_set()
632 struct qca808x_priv *priv = phydev->priv; in qca808x_update_stats()
634 return qcom_phy_update_stats(phydev, &priv->hw_stats); in qca808x_update_stats()
641 struct qca808x_priv *priv = phydev->priv; in qca808x_get_phy_stats()
643 qcom_phy_get_stats(stats, priv->hw_stats); in qca808x_get_phy_stats()