Commit 3ab72fe8075b137c238665008c356239d1e6bc54

Authored by Dan Murphy
Committed by Joe Hershberger
1 parent 085445ca41

net: phy: Move is_rgmii helper to phy.h

Move the phy_interface_is_rgmii to the phy.h
file for all phy's to be able to use the API.

This now aligns with the Linux kernel based on
commit e463d88c36d42211aa72ed76d32fb8bf37820ef1

Signed-off-by: Dan Murphy <dmurphy@ti.com>
Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Mugunthan V N <mugunthanvnm@ti.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>

Showing 2 changed files with 11 additions and 11 deletions Side-by-side Diff

drivers/net/phy/ti.c
... ... @@ -156,17 +156,6 @@
156 156 phy_write(phydev, addr, MII_MMD_DATA, data);
157 157 }
158 158  
159   -/**
160   - * phy_interface_is_rgmii - Convenience function for testing if a PHY interface
161   - * is RGMII (all variants)
162   - * @phydev: the phy_device struct
163   - */
164   -static inline bool phy_interface_is_rgmii(struct phy_device *phydev)
165   -{
166   - return phydev->interface >= PHY_INTERFACE_MODE_RGMII &&
167   - phydev->interface <= PHY_INTERFACE_MODE_RGMII_TXID;
168   -}
169   -
170 159 #if defined(CONFIG_DM_ETH)
171 160 /**
172 161 * dp83867_data_init - Convenience function for setting PHY specific data
... ... @@ -278,6 +278,17 @@
278 278 */
279 279 int phy_get_interface_by_name(const char *str);
280 280  
  281 +/**
  282 + * phy_interface_is_rgmii - Convenience function for testing if a PHY interface
  283 + * is RGMII (all variants)
  284 + * @phydev: the phy_device struct
  285 + */
  286 +static inline bool phy_interface_is_rgmii(struct phy_device *phydev)
  287 +{
  288 + return phydev->interface >= PHY_INTERFACE_MODE_RGMII &&
  289 + phydev->interface <= PHY_INTERFACE_MODE_RGMII_TXID;
  290 +}
  291 +
281 292 /* PHY UIDs for various PHYs that are referenced in external code */
282 293 #define PHY_UID_CS4340 0x13e51002
283 294 #define PHY_UID_TN2020 0x00a19410