mirror of
https://github.com/wessel-novacustom/clevo-keyboard.git
synced 2024-11-15 03:34:01 +01:00
Merge branch 'tf_new_fan_control_set_fans_auto' into 'master'
Tf new fan control set fans auto See merge request tuxedocomputers/development/packages/tuxedo-keyboard!32
This commit is contained in:
commit
35b9539728
|
@ -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