<p>Arthur Heymans has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/22919">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">[TOTEST]mb/lenovo/x200/dock.asl: Issue DOCK ACPI events based on Dock ID<br><br>Some Dock events only need to happen based on the Dock Id (which<br>functions as a presence detect GPIO).<br><br>Inspired by vendor bios DSDT.<br><br>This fixes ACPI undock events on every power unplug even when undock.<br><br>Change-Id: I1eef971d49508bcd94d5d1cf2b70395b7cd80b1c<br>Signed-off-by: Arthur Heymans <arthur@aheymans.xyz><br>---<br>M src/mainboard/lenovo/x200/acpi/dock.asl<br>1 file changed, 37 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/22919/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/src/mainboard/lenovo/x200/acpi/dock.asl b/src/mainboard/lenovo/x200/acpi/dock.asl<br>index 0c7c9ab..197f298 100644<br>--- a/src/mainboard/lenovo/x200/acpi/dock.asl<br>+++ b/src/mainboard/lenovo/x200/acpi/dock.asl<br>@@ -41,6 +41,24 @@<br> {<br> Return (\_SB.PCI0.LPCB.EC.DKR1)<br> }<br>+<br>+ Name (G_ID, 0xFFFFFFFF)<br>+ /* Returns 0x7 (dock present) or 0x3 (dock absent) */<br>+ Method(GGID, 0, NotSerialized)<br>+ {<br>+ Store(G_ID, Local0)<br>+ if (LEqual(Local0, 0xFFFFFFFF))<br>+ {<br>+ Store(Or (Or (GP02, ShiftLeft(GP03, 1)),<br>+ ShiftLeft(GP04, 2)), Local0)<br>+ If (LEqual(Local0, 0x00))<br>+ {<br>+ Store(0x03, Local0)<br>+ }<br>+ Store(Local0, G_ID)<br>+ }<br>+ return (Local0)<br>+ }<br> }<br> }<br> <br>@@ -63,7 +81,11 @@<br> <br> Method(_Q50, 0, NotSerialized)<br> {<br>- Notify(\_SB.DOCK, 3)<br>+ Store(\_SB.DOCK.GGID (), Local0)<br>+ if (LNotEqual(Local0, 0x07))<br>+ {<br>+ Notify(\_SB.DOCK, 3)<br>+ }<br> }<br> <br> Method(_Q58, 0, NotSerialized)<br>@@ -73,6 +95,19 @@<br> <br> Method(_Q5A, 0, NotSerialized)<br> {<br>- Notify(\_SB.DOCK, 3)<br>+ Store(\_SB.DOCK.GGID (), Local0)<br>+ if (LEqual(Local0, 0x07))<br>+ {<br>+ Notify(\_SB.DOCK, 3)<br>+ }<br>+ if (LEqual(Local0, 0x03))<br>+ {<br>+ Sleep(0x64)<br>+ Store(DKR1, Local1)<br>+ if (LEqual(Local1, 1))<br>+ {<br>+ Notify(\_SB.DOCK, 0)<br>+ }<br>+ }<br> }<br> }<br></pre><p>To view, visit <a href="https://review.coreboot.org/22919">change 22919</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/22919"/><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: I1eef971d49508bcd94d5d1cf2b70395b7cd80b1c </div>
<div style="display:none"> Gerrit-Change-Number: 22919 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Arthur Heymans <arthur@aheymans.xyz> </div>