<p>Patrick Rudolph has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/22463">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ec/lenovo/h8/acpi: Move ACPI HKEY device to new file<br><br>Move the APCI HKEY device to a new file and include it.<br>The future commits will extend it and this way it keeps readable.<br><br>Change-Id: Ie59b59e5a4148807125c71a362161026f685a97e<br>Signed-off-by: Patrick Rudolph <siro@das-labor.org><br>---<br>M src/ec/lenovo/h8/acpi/ec.asl<br>A src/ec/lenovo/h8/acpi/thinkpad.asl<br>2 files changed, 157 insertions(+), 135 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/22463/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/ec/lenovo/h8/acpi/ec.asl b/src/ec/lenovo/h8/acpi/ec.asl<br>index 750121d..5780602 100644<br>--- a/src/ec/lenovo/h8/acpi/ec.asl<br>+++ b/src/ec/lenovo/h8/acpi/ec.asl<br>@@ -286,141 +286,6 @@<br> ^HKEY.RTAB (0xA)<br> }<br> <br>- Device (HKEY)<br>- {<br>- Name (_HID, EisaId ("IBM0068"))<br>- Name (BTN, 0)<br>- Name (BTAB, 0)<br>-<br>- /* MASK */<br>- Name (DHKN, 0x080C)<br>-<br>- /* Effective Mask */<br>- Name (EMSK, 0)<br>-<br>- /* Effective Mask for tablet */<br>- Name (ETAB, 0)<br>-<br>- /* Device enabled. */<br>- Name (EN, 0)<br>-<br>- Method (_STA, 0, NotSerialized)<br>- {<br>- Return (0x0F)<br>- }<br>-<br>- /* Retrieve event. */<br>- Method (MHKP, 0, NotSerialized)<br>- {<br>- Store (BTN, Local0)<br>- If (LNotEqual (Local0, Zero)) {<br>- Store (Zero, BTN)<br>- Add (Local0, 0x1000, Local0)<br>- Return (Local0)<br>- }<br>- Store (BTAB, Local0)<br>- If (LNotEqual (Local0, Zero)) {<br>- Store (Zero, BTAB)<br>- Add (Local0, 0x5000, Local0)<br>- Return (Local0)<br>- }<br>- Return (Zero)<br>- }<br>-<br>- /* Report event */<br>- Method (RHK, 1, NotSerialized) {<br>- ShiftLeft (One, Subtract (Arg0, 1), Local0)<br>- If (And (EMSK, Local0)) {<br>- Store (Arg0, BTN)<br>- Notify (HKEY, 0x80)<br>- }<br>- }<br>-<br>- /* Report tablet */<br>- Method (RTAB, 1, NotSerialized) {<br>- ShiftLeft (One, Subtract (Arg0, 1), Local0)<br>- If (And (ETAB, Local0)) {<br>- Store (Arg0, BTAB)<br>- Notify (HKEY, 0x80)<br>- }<br>- }<br>-<br>- /* Enable/disable all events. */<br>- Method (MHKC, 1, NotSerialized) {<br>- If (Arg0) {<br>- Store (DHKN, EMSK)<br>- Store (Ones, ETAB)<br>- }<br>- Else<br>- {<br>- Store (Zero, EMSK)<br>- Store (Zero, ETAB)<br>- }<br>- Store (Arg0, EN)<br>- }<br>-<br>- /* Enable/disable event. */<br>- Method (MHKM, 2, NotSerialized) {<br>- If (LLessEqual (Arg0, 0x20)) {<br>- ShiftLeft (One, Subtract (Arg0, 1), Local0)<br>- If (Arg1)<br>- {<br>- Or (DHKN, Local0, DHKN)<br>- }<br>- Else<br>- {<br>- And (DHKN, Not (Local0), DHKN)<br>- }<br>- If (EN)<br>- {<br>- Store (DHKN, EMSK)<br>- }<br>- }<br>- }<br>-<br>- /* Mask hotkey all. */<br>- Method (MHKA, 0, NotSerialized)<br>- {<br>- Return (0x07FFFFFF)<br>- }<br>-<br>- /* Report tablet mode switch state */<br>- Method (MHKG, 0, NotSerialized)<br>- {<br>- Return (ShiftLeft(TBSW, 3))<br>- }<br>-<br>- /* Mute audio */<br>- Method (SSMS, 1, NotSerialized)<br>- {<br>- Store(Arg0, ALMT)<br>- }<br>-<br>- /* Control mute microphone LED */<br>- Method (MMTS, 1, NotSerialized)<br>- {<br>- If (Arg0)<br>- {<br>- TLED(0x8E)<br>- }<br>- Else<br>- {<br>- TLED(0x0E)<br>- }<br>- }<br>-<br>- /* Version */<br>- Method (MHKV, 0, NotSerialized)<br>- {<br>- Return (0x0100)<br>- }<br>-<br>- /* Master wireless switch state */<br>- Method (WLSW, 0, NotSerialized)<br>- {<br>- Return (\_SB.PCI0.LPCB.EC.GSTS)<br>- }<br>- }<br> <br> #include "ac.asl"<br> #include "battery.asl"<br>@@ -429,4 +294,5 @@<br> #include "beep.asl"<br> #include "thermal.asl"<br> #include "systemstatus.asl"<br>+#include "thinkpad.asl"<br> }<br>diff --git a/src/ec/lenovo/h8/acpi/thinkpad.asl b/src/ec/lenovo/h8/acpi/thinkpad.asl<br>new file mode 100644<br>index 0000000..eb5b60e<br>--- /dev/null<br>+++ b/src/ec/lenovo/h8/acpi/thinkpad.asl<br>@@ -0,0 +1,156 @@<br>+/*<br>+ * This file is part of the coreboot project.<br>+ *<br>+ * Copyright (c) 2011 Sven Schnelle <svens@stackframe.org><br>+ *<br>+ * This program is free software; you can redistribute it and/or<br>+ * modify it under the terms of the GNU General Public License as<br>+ * published by the Free Software Foundation; version 2 of<br>+ * the License.<br>+ *<br>+ * This program is distributed in the hope that it will be useful,<br>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of<br>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>+ * GNU General Public License for more details.<br>+ */<br>+<br>+Device (HKEY)<br>+{<br>+ /* Generated by ssdt.c */<br>+ External (\HBDC, IntObj)<br>+<br>+ Name (_HID, EisaId ("IBM0068"))<br>+<br>+ Name (BTN, 0)<br>+<br>+ Name (BTAB, 0)<br>+<br>+ /* MASK */<br>+ Name (DHKN, 0x080C)<br>+<br>+ /* Effective Mask */<br>+ Name (EMSK, 0)<br>+<br>+ /* Effective Mask for tablet */<br>+ Name (ETAB, 0)<br>+<br>+ /* Device enabled. */<br>+ Name (EN, 0)<br>+<br>+ Method (_STA, 0, NotSerialized)<br>+ {<br>+ Return (0x0F)<br>+ }<br>+<br>+ /* Retrieve event. */<br>+ Method (MHKP, 0, NotSerialized)<br>+ {<br>+ Store (BTN, Local0)<br>+ If (LNotEqual (Local0, Zero)) {<br>+ Store (Zero, BTN)<br>+ Add (Local0, 0x1000, Local0)<br>+ Return (Local0)<br>+ }<br>+ Store (BTAB, Local0)<br>+ If (LNotEqual (Local0, Zero)) {<br>+ Store (Zero, BTAB)<br>+ Add (Local0, 0x5000, Local0)<br>+ Return (Local0)<br>+ }<br>+ Return (Zero)<br>+ }<br>+<br>+ /* Report event */<br>+ Method (RHK, 1, NotSerialized) {<br>+ ShiftLeft (One, Subtract (Arg0, 1), Local0)<br>+ If (And (EMSK, Local0)) {<br>+ Store (Arg0, BTN)<br>+ Notify (HKEY, 0x80)<br>+ }<br>+ }<br>+<br>+ /* Report tablet */<br>+ Method (RTAB, 1, NotSerialized) {<br>+ ShiftLeft (One, Subtract (Arg0, 1), Local0)<br>+ If (And (ETAB, Local0)) {<br>+ Store (Arg0, BTAB)<br>+ Notify (HKEY, 0x80)<br>+ }<br>+ }<br>+<br>+ /* Enable/disable all events. */<br>+ Method (MHKC, 1, NotSerialized) {<br>+ If (Arg0) {<br>+ Store (DHKN, EMSK)<br>+ Store (Ones, ETAB)<br>+ }<br>+ Else<br>+ {<br>+ Store (Zero, EMSK)<br>+ Store (Zero, ETAB)<br>+ }<br>+ Store (Arg0, EN)<br>+ }<br>+<br>+ /* Enable/disable event. */<br>+ Method (MHKM, 2, NotSerialized) {<br>+ If (LLessEqual (Arg0, 0x20)) {<br>+ ShiftLeft (One, Subtract (Arg0, 1), Local0)<br>+ If (Arg1)<br>+ {<br>+ Or (DHKN, Local0, DHKN)<br>+ }<br>+ Else<br>+ {<br>+ And (DHKN, Not (Local0), DHKN)<br>+ }<br>+ If (EN)<br>+ {<br>+ Store (DHKN, EMSK)<br>+ }<br>+ }<br>+ }<br>+<br>+ /* Mask hotkey all. */<br>+ Method (MHKA, 0, NotSerialized)<br>+ {<br>+ Return (0x07FFFFFF)<br>+ }<br>+<br>+ /* Report tablet mode switch state */<br>+ Method (MHKG, 0, NotSerialized)<br>+ {<br>+ Return (ShiftLeft(TBSW, 3))<br>+ }<br>+<br>+ /* Mute audio */<br>+ Method (SSMS, 1, NotSerialized)<br>+ {<br>+ Store(Arg0, ALMT)<br>+ }<br>+<br>+ /* Control mute microphone LED */<br>+ Method (MMTS, 1, NotSerialized)<br>+ {<br>+ If (Arg0)<br>+ {<br>+ TLED(0x8E)<br>+ }<br>+ Else<br>+ {<br>+ TLED(0x0E)<br>+ }<br>+ }<br>+<br>+ /* Version */<br>+ Method (MHKV, 0, NotSerialized)<br>+ {<br>+ Return (0x0100)<br>+ }<br>+<br>+ /* Master wireless switch state */<br>+ Method (WLSW, 0, NotSerialized)<br>+ {<br>+ Return (\_SB.PCI0.LPCB.EC.GSTS)<br>+ }<br>+}<br></pre><p>To view, visit <a href="https://review.coreboot.org/22463">change 22463</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/22463"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ie59b59e5a4148807125c71a362161026f685a97e </div>
<div style="display:none"> Gerrit-Change-Number: 22463 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Patrick Rudolph <siro@das-labor.org> </div>