mirror of
https://github.com/wessel-novacustom/clevo-keyboard.git
synced 2024-11-15 03:34:01 +01:00
Only set one bit required for full-fan-mode and not whole byte
This commit is contained in:
parent
4296f75372
commit
4306a80513
|
@ -308,9 +308,9 @@ static u32 uw_set_fan(u32 fan_index, u8 fan_speed)
|
|||
|
||||
// Check current mode
|
||||
uw_ec_read_addr(0x51, 0x07, ®_read_return);
|
||||
if (reg_read_return.bytes.data_low != 0x40) {
|
||||
// If not "full fan mode" (ie. 0x40) switch to it (required for fancontrol)
|
||||
uw_ec_write_addr(0x51, 0x07, 0x40, 0x00, ®_write_return);
|
||||
if (!(reg_read_return.bytes.data_low & 0x40)) {
|
||||
// If not "full fan mode" (ie. 0x40 bit set) switch to it (required for fancontrol)
|
||||
uw_ec_write_addr(0x51, 0x07, reg_read_return.bytes.data_low | 0x40, 0x00, ®_write_return);
|
||||
// Attempt to write both fans as quick as possible before complete ramp-up
|
||||
pr_debug("prevent ramp-up start\n");
|
||||
for (i = 0; i < 10; ++i) {
|
||||
|
|
Loading…
Reference in a new issue