From f01f9279bfc6c7fa082880541c0fa0c83f78cf03 Mon Sep 17 00:00:00 2001 From: Winston Hoy Date: Mon, 17 Oct 2022 11:09:24 -0400 Subject: [PATCH] add ACPI methods for setting fan speeds Change-Id: Ib6548c571de300cec476f06f526d4c032e438f34 --- src/ec/system76/ec/acpi/s76.asl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/ec/system76/ec/acpi/s76.asl b/src/ec/system76/ec/acpi/s76.asl index 8db49df543e..1a1af0323d6 100644 --- a/src/ec/system76/ec/acpi/s76.asl +++ b/src/ec/system76/ec/acpi/s76.asl @@ -145,6 +145,24 @@ Device (S76D) { Return ((Local1 << 8) | Local0) } + // Set Fan speed + Method (SFD0, 1, Serialized) { + If (^^PCI0.LPCB.EC0.ECOK) { + ^^PCI0.LPCB.EC0.FDAT = Zero + ^^PCI0.LPCB.EC0.FBUF = Arg0 + ^^PCI0.LPCB.EC0.FCMD = 0xCE + } + } +#if CONFIG(EC_SYSTEM76_EC_DGPU) + Method (SFD1, 1, Serialized) { + If (^^PCI0.LPCB.EC0.ECOK) { + ^^PCI0.LPCB.EC0.FDAT = Zero + ^^PCI0.LPCB.EC0.FBUF = Arg0 + ^^PCI0.LPCB.EC0.FCMD = 0xCF + } + } +#endif // CONFIG(EC_SYSTEM76_EC_DGPU) + // Temperature names Method (NTMP, 0, Serialized) { Return (Package() {