mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
phy: phy_{read|write}_mmd_indirect: get addr from phydev
The address of the device can be determined from the phydev structure, rather than passing it as a parameter. Signed-off-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:
parent
04521bf840
commit
053e7e1692
5 changed files with 25 additions and 37 deletions
|
@ -629,14 +629,12 @@ static inline int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum)
|
|||
* phy_read_mmd_indirect - reads data from the MMD registers
|
||||
* @phydev: The PHY device bus
|
||||
* @prtad: MMD Address
|
||||
* @devad: MMD DEVAD
|
||||
* @addr: PHY address on the MII bus
|
||||
*
|
||||
* Description: it reads data from the MMD registers (clause 22 to access to
|
||||
* clause 45) of the specified phy address.
|
||||
*/
|
||||
int phy_read_mmd_indirect(struct phy_device *phydev, int prtad,
|
||||
int devad, int addr);
|
||||
int phy_read_mmd_indirect(struct phy_device *phydev, int prtad, int devad);
|
||||
|
||||
/**
|
||||
* phy_read - Convenience function for reading a given PHY register
|
||||
|
@ -735,14 +733,13 @@ static inline int phy_write_mmd(struct phy_device *phydev, int devad,
|
|||
* @phydev: The PHY device
|
||||
* @prtad: MMD Address
|
||||
* @devad: MMD DEVAD
|
||||
* @addr: PHY address on the MII bus
|
||||
* @data: data to write in the MMD register
|
||||
*
|
||||
* Description: Write data from the MMD registers of the specified
|
||||
* phy address.
|
||||
*/
|
||||
void phy_write_mmd_indirect(struct phy_device *phydev, int prtad,
|
||||
int devad, int addr, u32 data);
|
||||
int devad, u32 data);
|
||||
|
||||
struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id,
|
||||
bool is_c45,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue