Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for CentOS-7 #29

Open
dd1dd1 opened this issue Jul 21, 2019 · 1 comment
Open

Fixes for CentOS-7 #29

dd1dd1 opened this issue Jul 21, 2019 · 1 comment

Comments

@dd1dd1
Copy link

dd1dd1 commented Jul 21, 2019

Hi, your driver works just fine with the el7 kernel 3.10.0-957.21.3.el7.x86_64 on ASUS PRIME X399-A fw 1002, but it needs the following changes:

@@ -90,10 +90,10 @@ static enum hwmon_sensor_types asus_data_types[] = {
 
 static u32 hwmon_attributes[] = {
 	[hwmon_chip] = HWMON_C_REGISTER_TZ,
-	[hwmon_temp] = HWMON_T_INPUT | HWMON_T_LABEL,
-	[hwmon_in] = HWMON_I_INPUT | HWMON_I_LABEL,
-	[hwmon_curr] = HWMON_C_INPUT | HWMON_C_LABEL,
-	[hwmon_fan] = HWMON_F_INPUT | HWMON_F_LABEL,
+	[hwmon_temp] = HWMON_T_INPUT, // | HWMON_T_LABEL,
+	[hwmon_in] = HWMON_I_INPUT, // | HWMON_I_LABEL,
+	[hwmon_curr] = HWMON_C_INPUT, // | HWMON_C_LABEL,
+	[hwmon_fan] = HWMON_F_INPUT, // | HWMON_F_LABEL,
 };
 
 struct asus_wmi_sensor_info {
@@ -394,7 +394,7 @@ static int asus_wmi_hwmon_add_chan_info(struct hwmon_channel_info *asus_wmi_hwmo
 static const struct hwmon_ops asus_wmi_hwmon_ops = {
 	.is_visible = asus_wmi_hwmon_is_visible,
 	.read = asus_wmi_hwmon_read,
-	.read_string = asus_wmi_hwmon_read_string,
+	//.read_string = asus_wmi_hwmon_read_string,
 };
 
 static struct hwmon_chip_info asus_wmi_chip_info = {

Please consider adding this to your sources plus a note in the README file stating that your driver works on CentOS-7. (3.10 kernels vs 4.x as you say now).

K.O.

@electrified
Copy link
Owner

Centos must have backported the WMI interface, as in mainline kernels it isn't present before 4.12.

https://elixir.bootlin.com/linux/latest/source/include/linux/wmi.h

I will have a look at what the implications of removing the labels from the attributes is, I guess it could be put within a conditional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants