net: phy: add register modifying helpers returning 1 on change
When modifying registers there are scenarios where we need to know whether the register content actually changed. This patch adds new helpers to not break users of the current ones, phy_modify() etc. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
193dad2abb
commit
b8554d4f72
@@ -799,13 +799,21 @@ int phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val);
|
||||
*/
|
||||
int __phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val);
|
||||
|
||||
int __phy_modify_changed(struct phy_device *phydev, u32 regnum, u16 mask,
|
||||
u16 set);
|
||||
int phy_modify_changed(struct phy_device *phydev, u32 regnum, u16 mask,
|
||||
u16 set);
|
||||
int __phy_modify(struct phy_device *phydev, u32 regnum, u16 mask, u16 set);
|
||||
int phy_modify(struct phy_device *phydev, u32 regnum, u16 mask, u16 set);
|
||||
|
||||
int __phy_modify_mmd_changed(struct phy_device *phydev, int devad, u32 regnum,
|
||||
u16 mask, u16 set);
|
||||
int phy_modify_mmd_changed(struct phy_device *phydev, int devad, u32 regnum,
|
||||
u16 mask, u16 set);
|
||||
int __phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum,
|
||||
u16 mask, u16 set);
|
||||
u16 mask, u16 set);
|
||||
int phy_modify_mmd(struct phy_device *phydev, int devad, u32 regnum,
|
||||
u16 mask, u16 set);
|
||||
u16 mask, u16 set);
|
||||
|
||||
/**
|
||||
* __phy_set_bits - Convenience function for setting bits in a PHY register
|
||||
|
Reference in New Issue
Block a user