diff options
author | Patrick Rudolph <siro@das-labor.org> | 2017-08-13 12:55:41 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2018-07-19 16:43:08 +0000 |
commit | 60eca531df7d13272d9d8b41c7992d18fad75a16 (patch) | |
tree | eb95ec1e6df0cdf978dea2aa9a93b3440febf43d /src/ec/lenovo/h8/acpi | |
parent | 94d79a338bb7f035257d3e3137c315eb1b9ea3ae (diff) |
ec/lenovo/h8/acpi: Add WWAN ACPI methods
Implement GWAN and SWAN for thinkpad_acpi kernel module.
Both methods allow power control of the WWAN module.
Change-Id: I5550c78e0d36884eca7a8d8ece19b64aaee44045
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/20986
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/ec/lenovo/h8/acpi')
-rw-r--r-- | src/ec/lenovo/h8/acpi/thinkpad.asl | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/ec/lenovo/h8/acpi/thinkpad.asl b/src/ec/lenovo/h8/acpi/thinkpad.asl index de2fe68192..d0e4234ed9 100644 --- a/src/ec/lenovo/h8/acpi/thinkpad.asl +++ b/src/ec/lenovo/h8/acpi/thinkpad.asl @@ -18,6 +18,7 @@ Device (HKEY) { /* Generated by ssdt.c */ External (\HBDC, IntObj) + External (\HWAN, IntObj) Name (_HID, EisaId ("IBM0068")) @@ -190,4 +191,41 @@ Device (HKEY) /* FIXME: Store state at resume */ } } + + /* + * Returns the current state: + * Bit 0: WWAN HW present + * Bit 1: WWAN radio enabled + * Bit 2: WWAN state at resume + */ + Method (GWAN, 0) + { + If (HWAN) { + Store(One, Local0) + If(\_SB.PCI0.LPCB.EC.WWEB) + { + Or(Local0, 2, Local0) + } + /* FIXME: Implement state at resume, for now Enabled */ + Or(Local0, 4, Local0) + Return (Local0) + } Else { + Return (0) + } + } + + /* + * Set the current state: + * Bit 1: WWAN radio enabled + * Bit 2: WWAN state at resume + */ + Method (SWAN, 1) + { + If (HWAN) { + ShiftRight (And(Arg0, 2), 1, Local0) + Store (Local0, \_SB.PCI0.LPCB.EC.WWEB) + + /* FIXME: Store state at resume */ + } + } } |