From b830386e807629b64a91531bc585ec99eb42e037 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 12 Feb 2020 14:36:56 -0700 Subject: [PATCH] Add ECOS --- src/board/system76/lemp9/acpi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/board/system76/lemp9/acpi.c b/src/board/system76/lemp9/acpi.c index af20aad..bd9e345 100644 --- a/src/board/system76/lemp9/acpi.c +++ b/src/board/system76/lemp9/acpi.c @@ -8,6 +8,8 @@ extern uint8_t sci_extra; +uint8_t ecos = 0; + static uint8_t fcmd = 0; static uint8_t fdat = 0; static uint8_t fbuf[4] = { 0, 0, 0, 0 }; @@ -81,6 +83,8 @@ uint8_t acpi_read(uint8_t addr) { ACPI_16(0x2E, battery_remaining_capacity); ACPI_16(0x32, battery_voltage); + ACPI_8(0x68, ecos); + ACPI_8(0xCC, sci_extra); // Set size of flash (from old firmware) @@ -108,6 +112,10 @@ void acpi_write(uint8_t addr, uint8_t data) { lid_wake = (bool)(data & (1 << 2)); break; + case 0x68: + ecos = data; + break; + case 0xF8: fcmd = data; fcommand();