mirror of
https://github.com/wessel-novacustom/clevo-keyboard.git
synced 2024-11-15 03:34:01 +01:00
Add missing set fans auto implementation
This commit is contained in:
parent
493541f81c
commit
ab675b1475
|
@ -407,6 +407,21 @@ static u32 uw_set_fan_auto(void)
|
|||
u8 mode_data;
|
||||
|
||||
if (has_universal_ec_fan_control() == 1) {
|
||||
u16 addr_use_custom_fan_table_0 = 0x07c5; // use different tables for both fans (0x0f00-0x0f2f and 0x0f30-0x0f5f respectivly)
|
||||
u16 addr_use_custom_fan_table_1 = 0x07c6; // enable 0x0fxx fantables
|
||||
u8 offset_use_custom_fan_table_0 = 7;
|
||||
u8 offset_use_custom_fan_table_1 = 2;
|
||||
u8 value_use_custom_fan_table_0;
|
||||
u8 value_use_custom_fan_table_1;
|
||||
uniwill_read_ec_ram(addr_use_custom_fan_table_1, &value_use_custom_fan_table_1);
|
||||
if ((value_use_custom_fan_table_1 >> offset_use_custom_fan_table_1) & 1) {
|
||||
uniwill_write_ec_ram_with_retry(addr_use_custom_fan_table_1, value_use_custom_fan_table_1 - (1 << offset_use_custom_fan_table_1), 3);
|
||||
}
|
||||
uniwill_read_ec_ram(addr_use_custom_fan_table_0, &value_use_custom_fan_table_0);
|
||||
if ((value_use_custom_fan_table_0 >> offset_use_custom_fan_table_0) & 1) {
|
||||
uniwill_write_ec_ram_with_retry(addr_use_custom_fan_table_0, value_use_custom_fan_table_0 - (1 << offset_use_custom_fan_table_0), 3);
|
||||
}
|
||||
fans_initialized = false;
|
||||
}
|
||||
else {
|
||||
// Get current mode
|
||||
|
|
Loading…
Reference in a new issue