diff options
author | Michael Walle <michael@walle.cc> | 2020-05-13 18:35:22 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-13 21:52:38 +0200 |
commit | e184a9072f8995e78ad6cef48bfeab2b987945ec (patch) | |
tree | a4e43061d3f7918bae8e0ee9f05edc159f7c3466 /drivers/net/phy/bcm-phy-lib.h | |
parent | net: phy: broadcom: add exp register access methods without buslock (diff) | |
download | linux-e184a9072f8995e78ad6cef48bfeab2b987945ec.tar.xz linux-e184a9072f8995e78ad6cef48bfeab2b987945ec.zip |
net: phy: broadcom: add bcm_phy_modify_exp()
Add the convenience function to do a read-modify-write. This has the
additional benefit of saving one write to the selection register.
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/phy/bcm-phy-lib.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/phy/bcm-phy-lib.h b/drivers/net/phy/bcm-phy-lib.h index 0eb5333cda39..b35d880220b9 100644 --- a/drivers/net/phy/bcm-phy-lib.h +++ b/drivers/net/phy/bcm-phy-lib.h @@ -29,8 +29,10 @@ int __bcm_phy_write_exp(struct phy_device *phydev, u16 reg, u16 val); int __bcm_phy_read_exp(struct phy_device *phydev, u16 reg); +int __bcm_phy_modify_exp(struct phy_device *phydev, u16 reg, u16 mask, u16 set); int bcm_phy_write_exp(struct phy_device *phydev, u16 reg, u16 val); int bcm_phy_read_exp(struct phy_device *phydev, u16 reg); +int bcm_phy_modify_exp(struct phy_device *phydev, u16 reg, u16 mask, u16 set); static inline int bcm_phy_write_exp_sel(struct phy_device *phydev, u16 reg, u16 val) |