mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 17:13:52 +02:00
net: phy: Add helper for getting MAC termination resistance
Add helper which returns the MAC termination resistance value. Modifying the resistance to an appropriate value can reduce signal reflections and therefore improve signal quality. Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Dimitri Fedrau <dimitri.fedrau@liebherr.com> Link: https://patch.msgid.link/20250416-dp83822-mac-impedance-v3-3-028ac426cddb@liebherr.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
1de1390ee0
commit
145436ae01
|
|
@ -2975,6 +2975,21 @@ int phy_get_tx_amplitude_gain(struct phy_device *phydev, struct device *dev,
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(phy_get_tx_amplitude_gain);
|
||||
|
||||
/**
|
||||
* phy_get_mac_termination - stores MAC termination in @val
|
||||
* @phydev: phy_device struct
|
||||
* @dev: pointer to the devices device struct
|
||||
* @val: MAC termination
|
||||
*
|
||||
* Returns: 0 on success, < 0 on failure
|
||||
*/
|
||||
int phy_get_mac_termination(struct phy_device *phydev, struct device *dev,
|
||||
u32 *val)
|
||||
{
|
||||
return phy_get_u32_property(dev, "mac-termination-ohms", val);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(phy_get_mac_termination);
|
||||
|
||||
static int phy_led_set_brightness(struct led_classdev *led_cdev,
|
||||
enum led_brightness value)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2040,6 +2040,9 @@ int phy_get_tx_amplitude_gain(struct phy_device *phydev, struct device *dev,
|
|||
enum ethtool_link_mode_bit_indices linkmode,
|
||||
u32 *val);
|
||||
|
||||
int phy_get_mac_termination(struct phy_device *phydev, struct device *dev,
|
||||
u32 *val);
|
||||
|
||||
void phy_resolve_pause(unsigned long *local_adv, unsigned long *partner_adv,
|
||||
bool *tx_pause, bool *rx_pause);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user