From 081c9c0265c91b8333165aa6230c20bcbc6f7cbf Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Thu, 10 Oct 2024 14:07:16 +0100
-Subject: [PATCH 3/5] net: phy: realtek: read duplex and gbit master from PHYSR
+Subject: [PATCH] net: phy: realtek: read duplex and gbit master from PHYSR
register
The PHYSR MMD register is present and defined equally for all RTL82xx
From 68d5cd09e8919679ce13b85950debea4b2e98e04 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Thu, 10 Oct 2024 14:07:26 +0100
-Subject: [PATCH 4/5] net: phy: realtek: change order of calls in C22
- read_status()
+Subject: [PATCH] net: phy: realtek: change order of calls in C22 read_status()
Always call rtlgen_read_status() first, so genphy_read_status() which
is called by it clears bits in case auto-negotiation has not completed.
From 5cb409b3960e75467cbb0a8e1e5596b4490570e3 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Thu, 10 Oct 2024 14:07:39 +0100
-Subject: [PATCH 5/5] net: phy: realtek: clear 1000Base-T link partner
+Subject: [PATCH] net: phy: realtek: clear 1000Base-T link partner
advertisement
Clear 1000Base-T link partner advertisement bits in Clause-45
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
-@@ -1023,23 +1023,20 @@ static int rtl822x_c45_read_status(struc
+@@ -1031,23 +1031,20 @@ static int rtl822x_c45_read_status(struc
{
int ret, val;
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
-@@ -1038,8 +1038,10 @@ static int rtl822x_c45_read_status(struc
+@@ -1046,8 +1046,10 @@ static int rtl822x_c45_read_status(struc
if (ret < 0)
return ret;
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
-@@ -952,15 +952,15 @@ static int rtl822x_read_status(struct ph
+@@ -960,15 +960,15 @@ static int rtl822x_read_status(struct ph
{
int lpadv, ret;
+#endif /* REALTEK_H */
--- /dev/null
+++ b/drivers/net/phy/realtek/realtek_hwmon.c
-@@ -0,0 +1,86 @@
+@@ -0,0 +1,79 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * HWMON support for Realtek PHY's
+#define RTL822X_VND2_TSRR 0xbd84
+#define RTL822X_VND2_TSSR 0xb54c
+
-+static umode_t rtl822x_hwmon_is_visible(const void *drvdata,
-+ enum hwmon_sensor_types type,
-+ u32 attr, int channel)
-+{
-+ return 0444;
-+}
-+
+static int rtl822x_hwmon_get_temp(int raw)
+{
+ if (raw >= 512)
+}
+
+static const struct hwmon_ops rtl822x_hwmon_ops = {
-+ .is_visible = rtl822x_hwmon_is_visible,
++ .visible = 0444,
+ .read = rtl822x_hwmon_read,
+};
+