[coreboot-gerrit] Change in coreboot[master]: ec/google/chromeec/acpi: Replace TBMC device with Intel Device

Matt Delco (Code Review) gerrit at coreboot.org
Mon Jul 23 20:32:08 CEST 2018


Matt Delco has uploaded this change for review. ( https://review.coreboot.org/27607


Change subject: ec/google/chromeec/acpi: Replace TBMC device with Intel Device
......................................................................

ec/google/chromeec/acpi: Replace TBMC device with Intel Device

The TBMC device has a subset of the functionality of Intel's
Virtual Buttons device.  Replacing the former with the latter
will help to avoid the need to support a separate and dedicated
driver in the future.

I tested on eve that a change works with a kernel that contains
a driver for the device.

Change-Id: Id486c540ecbb4c0b7a045e05405ef589aebe03c8
Signed-off-by: Matt Delco <delco at chromium.org>
---
M src/ec/google/chromeec/acpi/ec.asl
D src/ec/google/chromeec/acpi/tbmc.asl
A src/ec/google/chromeec/acpi/vbtn.asl
3 files changed, 53 insertions(+), 31 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/27607/1

diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl
index 94917dd..36cfcde 100644
--- a/src/ec/google/chromeec/acpi/ec.asl
+++ b/src/ec/google/chromeec/acpi/ec.asl
@@ -375,7 +375,11 @@
 		\_SB.DPTF.TPET()
 #endif
 #ifdef EC_ENABLE_TBMC_DEVICE
-		Notify (TBMC, 0x80)
+		If (LEqual ((^TBMD), One)) {
+			Notify (VBTN, 0xCC)
+		} Else {
+			Notify (VBTN, 0xCD)
+		}
 #endif
 	}
 
@@ -548,6 +552,6 @@
 #endif
 
 #ifdef EC_ENABLE_TBMC_DEVICE
-	#include "tbmc.asl"
+	#include "vbtn.asl"
 #endif
 }
diff --git a/src/ec/google/chromeec/acpi/tbmc.asl b/src/ec/google/chromeec/acpi/tbmc.asl
deleted file mode 100644
index 25a27ef1b..0000000
--- a/src/ec/google/chromeec/acpi/tbmc.asl
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2017 Google Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-Device (TBMC)
-{
-	Name (_HID, "GOOG0006")
-	Name (_UID, 1)
-	Name (_DDN, "Tablet Motion Control")
-	Method (TBMC)
-	{
-		If (LEqual (^^RCTM, One)) {
-			Return (0x1)
-		} Else {
-			Return (0x0)
-		}
-	}
-}
diff --git a/src/ec/google/chromeec/acpi/vbtn.asl b/src/ec/google/chromeec/acpi/vbtn.asl
new file mode 100644
index 0000000..83eb092
--- /dev/null
+++ b/src/ec/google/chromeec/acpi/vbtn.asl
@@ -0,0 +1,47 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2017 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+// VGBS reports 0x40 when NOT in tablet mode.
+// Device is sent event 0xCB/0xCC for tablet mode, 0xCA/0xCD for laptop mode
+Device (VBTN)
+{
+	Name (_HID, "INT33D6")
+	Name (_DDN, "Tablet Virtual Buttons")
+	Method (_STA, 0, Serialized)
+	{
+		Return (0x0f)
+	}
+	Method (VBDL, 0, Serialized)
+	{
+	}
+	Method (VGBS)
+	{
+		If (LEqual (^^RCTM, One)) {
+			Return (0x0)
+		} Else {
+			Return (0x40)
+		}
+	}
+}
+
+Device (VBTO)
+{
+	Name (_HID, "INT33D3")
+	Name (_CID, "PNP0C60")
+	Method (_STA, 0, Serialized)
+	{
+		Return (0x0f)
+	}
+}

-- 
To view, visit https://review.coreboot.org/27607
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id486c540ecbb4c0b7a045e05405ef589aebe03c8
Gerrit-Change-Number: 27607
Gerrit-PatchSet: 1
Gerrit-Owner: Matt Delco <delco at chromium.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180723/50f57c4e/attachment-0001.html>


More information about the coreboot-gerrit mailing list