summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phy.c
diff options
context:
space:
mode:
authorMarco Felsch <m.felsch@pengutronix.de>2023-08-11 12:26:54 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2023-08-14 08:19:33 +0200
commitb3db2a73aca58f024f3328295cbb22ddc82140f7 (patch)
treed621513d7fc2c41e13ebc0c4da4a756d453162bc /drivers/net/phy/phy.c
parent5d720692e21ed37f6b2b675d527327eabc5325fb (diff)
downloadbarebox-b3db2a73aca58f024f3328295cbb22ddc82140f7.tar.gz
barebox-b3db2a73aca58f024f3328295cbb22ddc82140f7.tar.xz
net: phy: add deprecation warning to phy_{read,write,modify}_mmd_indirect
Add deprecation warnings and point to the new APIs user should use instead. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20230811102657.271931-8-m.felsch@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r--drivers/net/phy/phy.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 4cabb436e4..ad02732ff9 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -850,6 +850,9 @@ int phy_read_mmd_indirect(struct phy_device *phydev, int prtad, int devad)
{
u32 ret;
+ phydev_warn(phydev, "%s is deprectated use phy_read_mmd instead\n",
+ __func__);
+
mmd_phy_indirect(phydev, devad, prtad);
/* Read the content of the MMD's selected register */
@@ -876,6 +879,9 @@ int phy_read_mmd_indirect(struct phy_device *phydev, int prtad, int devad)
void phy_write_mmd_indirect(struct phy_device *phydev, int prtad, int devad,
u16 data)
{
+ phydev_warn(phydev, "%s is deprectated use phy_write_mmd instead\n",
+ __func__);
+
mmd_phy_indirect(phydev, devad, prtad);
/* Write the data into MMD's selected register */
@@ -896,6 +902,9 @@ int phy_modify_mmd_indirect(struct phy_device *phydev, int prtad, int devad,
{
int ret;
+ phydev_warn(phydev, "%s is deprectated use phy_modify_mmd instead\n",
+ __func__);
+
ret = phy_read_mmd_indirect(phydev, prtad, devad);
if (ret < 0)
return ret;