summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2017-03-21 13:05:07 +0000
committerRussell King <rmk+kernel@armlinux.org.uk>2017-05-05 18:42:38 +0100
commit6a343c42be2584a86a6574976515cc24b6e81390 (patch)
tree6924e3b325624a9563eb883ca608194de0c3caf1 /include
parent3adb28a8b86aad1f6a193e8a38816bf6335b6a5a (diff)
net: phy: deprecate indirect MMD read/write methods
Prepare to remove the indirect MMD accessors; code them in terms of the simpler accessors, and mark the indirect ones deprecated to avoid new users. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/phy.h31
1 files changed, 10 insertions, 21 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 324e921cb5a1..3d40b9b2bf7c 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -611,24 +611,6 @@ struct phy_driver {
int (*write_mmd)(struct phy_device *dev, int devnum, u16 regnum,
u16 val);
- /* A function provided by a phy specific driver to override the
- * the PHY driver framework support for reading a MMD register
- * from the PHY. If not supported, return -1. This function is
- * optional for PHY specific drivers, if not provided then the
- * default MMD read function is used by the PHY framework.
- */
- int (*read_mmd_indirect)(struct phy_device *dev, int ptrad,
- int devnum, int regnum);
-
- /* A function provided by a phy specific driver to override the
- * the PHY driver framework support for writing a MMD register
- * from the PHY. This function is optional for PHY specific drivers,
- * if not provided then the default MMD read function is used by
- * the PHY framework.
- */
- void (*write_mmd_indirect)(struct phy_device *dev, int ptrad,
- int devnum, int regnum, u32 val);
-
/* Get the size and type of the eeprom contained within a plug-in
* module */
int (*module_info)(struct phy_device *dev,
@@ -686,7 +668,11 @@ int phy_read_mmd(struct phy_device *phydev, int devad, u32 regnum);
* 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);
+static inline __deprecated int phy_read_mmd_indirect(struct phy_device *phydev,
+ int prtad, int devad)
+{
+ return phy_read_mmd(phydev, devad, prtad);
+}
/**
* phy_read - Convenience function for reading a given PHY register
@@ -781,8 +767,11 @@ int phy_write_mmd(struct phy_device *phydev, int devad, u32 regnum, u16 val);
* 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, u32 data);
+static inline __deprecated void phy_write_mmd_indirect(
+ struct phy_device *phydev, int prtad, int devad, u32 data)
+{
+ phy_write_mmd(phydev, devad, prtad, data);
+}
struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id,
bool is_c45,