|
|
@@ -56,7 +56,7 @@ Signed-off-by: Jakub Kicinski <[email protected]>
|
|
|
+#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
|
|
|
@@ -73,13 +73,6 @@ Signed-off-by: Jakub Kicinski <[email protected]>
|
|
|
+#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)
|
|
|
@@ -112,7 +105,7 @@ Signed-off-by: Jakub Kicinski <[email protected]>
|
|
|
+}
|
|
|
+
|
|
|
+static const struct hwmon_ops rtl822x_hwmon_ops = {
|
|
|
-+ .is_visible = rtl822x_hwmon_is_visible,
|
|
|
++ .visible = 0444,
|
|
|
+ .read = rtl822x_hwmon_read,
|
|
|
+};
|
|
|
+
|