Restrict fan-curve copy to "v1" profile devices only

This commit is contained in:
Christoffer Sandberg 2021-11-11 22:31:12 +01:00
parent 4903b89239
commit bd56c1ecb9

View file

@ -811,12 +811,14 @@ static int uniwill_keyboard_probe(struct platform_device *dev)
// uw_ec_write_addr(0x51, 0x07, 0x00, 0x00, &reg_write_return);
uniwill_write_ec_ram(0x0751, 0x00);
if (uw_feats->uniwill_profile_v1) {
// Set manual-mode fan-curve in 0x0743 - 0x0747
// Some kind of default fan-curve is stored in 0x0786 - 0x078a: Using it to initialize manual-mode fan-curve
for (i = 0; i < 5; ++i) {
uniwill_read_ec_ram(0x0786 + i, &data);
uniwill_write_ec_ram(0x0743 + i, data);
}
}
// Enable manual mode
uniwill_write_ec_ram(0x0741, 0x01);