platform/x86: asus-wmi: Read EC fan RPM on ASUS TUF Gaming F15 FX506LH
PATCH 1/1 platform/x86: asus-wmi: Read EC fan RPM on ASUS TUF Gaming F15 FX506LH
On the ASUS TUF Gaming F15 (FX506LH), the WMI fan interface reports 0 RPM for the CPU fan and does not expose the GPU fan speed.
Read both fan speeds directly from the Embedded Controller (EC) tachometer registers (0x66/0x67 for CPU fan, 0x68/0x69 for GPU fan) using the standard tachometer period conversion (2156220 / raw).
Add a read-only FAN_TYPE_EC fan type so that pwm*_enable controls remain hidden, and enable it via a DMI quirk for the FX506LH.
Signed-off-by nima <[email protected]>
--- drivers/platform/x86/asus-nb-wmi.c | 13 +++++++ drivers/platform/x86/asus-wmi.c | 57 +++++++++++++++++++++++++++--- drivers/platform/x86/asus-wmi.h | 1 + 3 files changed, 67 insertions(+), 4 deletions(-)
drivers/platform/x86/asus-nb-wmi.c +13 -0
@@ -150,6 +150,10 @@ static struct quirk_entry quirk_asus_ignore_fan = { .wmi_ignore_fan = true, }; +static struct quirk_entry quirk_asus_ec_fan_rpm = { + .ec_fan_rpm = true, +}; +static struct quirk_entry quirk_asus_zenbook_duo_kbd = { .key_wlan_event =ASUS_WMI_KEY_IGNORE , };
@@ -167,6 +171,15 @@ static int dmi_matched(const struct dmi_system_id *dmi) }static const struct dmi_system_id asus_quirks[] = { + { + .callback = dmi_matched, + .ident ="ASUSTeK COMPUTER INC. ASUS TUF Gaming F15 FX506LH" , + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), +DMI_MATCH (DMI_PRODUCT_NAME ,"ASUS TUF Gaming F15 FX506LH" ), + }, + .driver_data = &quirk_asus_ec_fan_rpm, + }, { .callback = dmi_matched, .ident ="ASUSTeK COMPUTER INC. Q500A" ,
drivers/platform/x86/asus-wmi.c +53 -4
101 lines not on this page · raw message
drivers/platform/x86/asus-wmi.h +1 -0
@@ -40,6 +40,7 @@ struct quirk_entry {bool wmi_backlight_set_devstate;bool wmi_force_als_set;bool wmi_ignore_fan; +bool ec_fan_rpm;bool filter_i8042_e1_extended_codes;int key_wlan_event;enum asus_wmi_tablet_switch_mode tablet_switch_mode;
Signature · 1 line
2.56.1