
bfc17c1658353 net: phy: realtek: disable PHY-mode EEE fabcfd6d10999 net: phy: realtek: add defines for shadowed c45 standard registers 8af2136e77989 net: phy: realtek: add helper RTL822X_VND2_C22_REG 02d3b306ac2f0 net: phy: realtek: switch from paged to MMD ops in rtl822x functions da681ed73fb98 net: phy: realtek: improve mmd register access for internal PHY's 0bea93fdbaf86 net: phy: realtek: use string choices helpers 51773846fab24 net: phy: realtek: make HWMON support a user-visible Kconfig symbol Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> (cherry picked from commit 7673a165a955269773eb604d3678d86d0bb7f49c)
55 lines
1.9 KiB
Diff
55 lines
1.9 KiB
Diff
From 0bea93fdbaf8675b7e8124bdcaf51497dcc8bcfa Mon Sep 17 00:00:00 2001
|
|
From: Heiner Kallweit <hkallweit1@gmail.com>
|
|
Date: Mon, 3 Feb 2025 21:41:36 +0100
|
|
Subject: [PATCH] net: phy: realtek: use string choices helpers
|
|
|
|
Use string choices helpers to simplify the code.
|
|
|
|
Reported-by: kernel test robot <lkp@intel.com>
|
|
Closes: https://lore.kernel.org/oe-kbuild-all/202501190707.qQS8PGHW-lkp@intel.com/
|
|
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
|
|
Reviewed-by: Simon Horman <horms@kernel.org>
|
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
---
|
|
drivers/net/phy/realtek/realtek_main.c | 9 +++++----
|
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
|
|
|
--- a/drivers/net/phy/realtek/realtek_main.c
|
|
+++ b/drivers/net/phy/realtek/realtek_main.c
|
|
@@ -13,6 +13,7 @@
|
|
#include <linux/module.h>
|
|
#include <linux/delay.h>
|
|
#include <linux/clk.h>
|
|
+#include <linux/string_choices.h>
|
|
|
|
#include "realtek.h"
|
|
|
|
@@ -422,11 +423,11 @@ static int rtl8211f_config_init(struct p
|
|
} else if (ret) {
|
|
dev_dbg(dev,
|
|
"%s 2ns TX delay (and changing the value from pin-strapping RXD1 or the bootloader)\n",
|
|
- val_txdly ? "Enabling" : "Disabling");
|
|
+ str_enable_disable(val_txdly));
|
|
} else {
|
|
dev_dbg(dev,
|
|
"2ns TX delay was already %s (by pin-strapping RXD1 or bootloader configuration)\n",
|
|
- val_txdly ? "enabled" : "disabled");
|
|
+ str_enabled_disabled(val_txdly));
|
|
}
|
|
|
|
ret = phy_modify_paged_changed(phydev, 0xd08, 0x15, RTL8211F_RX_DELAY,
|
|
@@ -437,11 +438,11 @@ static int rtl8211f_config_init(struct p
|
|
} else if (ret) {
|
|
dev_dbg(dev,
|
|
"%s 2ns RX delay (and changing the value from pin-strapping RXD0 or the bootloader)\n",
|
|
- val_rxdly ? "Enabling" : "Disabling");
|
|
+ str_enable_disable(val_rxdly));
|
|
} else {
|
|
dev_dbg(dev,
|
|
"2ns RX delay was already %s (by pin-strapping RXD0 or bootloader configuration)\n",
|
|
- val_rxdly ? "enabled" : "disabled");
|
|
+ str_enabled_disabled(val_rxdly));
|
|
}
|
|
|
|
if (priv->has_phycr2) {
|