Move uw manual mode set/remove

This commit is contained in:
Christoffer Sandberg 2021-09-17 19:15:11 +02:00
parent 64c47a6943
commit 56b5c5461d
2 changed files with 3 additions and 5 deletions

View file

@ -291,9 +291,6 @@ static void uniwill_init(void)
uw_ec_write_addr(0x43 + i, 0x07, reg_read_return.bytes.data_low, 0x00, &reg_write_return); uw_ec_write_addr(0x43 + i, 0x07, reg_read_return.bytes.data_low, 0x00, &reg_write_return);
} }
// Enable manual mode
uw_ec_write_addr(0x41, 0x07, 0x01, 0x00, &reg_write_return);
// Zero second fan temp for detection // Zero second fan temp for detection
uw_ec_write_addr(0x4f, 0x04, 0x00, 0x00, &reg_write_return); uw_ec_write_addr(0x4f, 0x04, 0x00, 0x00, &reg_write_return);
} }
@ -302,8 +299,6 @@ static void uniwill_exit(void)
{ {
union uw_ec_write_return reg_write_return; union uw_ec_write_return reg_write_return;
// Disable manual mode
uw_ec_write_addr(0x41, 0x07, 0x00, 0x00, &reg_write_return);
} }
static u32 uw_set_fan(u32 fan_index, u8 fan_speed) static u32 uw_set_fan(u32 fan_index, u8 fan_speed)

View file

@ -876,6 +876,9 @@ static int uniwill_keyboard_remove(struct platform_device *dev)
if (uw_lightbar_loaded) if (uw_lightbar_loaded)
uw_lightbar_remove(dev); uw_lightbar_remove(dev);
// Disable manual mode
uniwill_write_ec_ram(0x0741, 0x00);
return 0; return 0;
} }