[coreboot-gerrit] Patch set updated for coreboot: ec/google/chromeec: Add support for tablet mode switch driver

Gwendal Grignou (gwendal@chromium.org) gerrit at coreboot.org
Wed Feb 1 22:04:24 CET 2017


Gwendal Grignou (gwendal at chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18173

-gerrit

commit 738d1f9998c755f004c0ccfd0fbb1e37ca610a28
Author: Gwendal Grignou <gwendal at chromium.org>
Date:   Thu Jan 19 18:30:21 2017 -0800

    ec/google/chromeec: Add support for tablet mode switch driver
    
    Add a new driver GOOG0006 to report tablet switch
    to user space.
    
    On glados based convertible, check that with a new kernel driver
    (cros_ec_tbmc) that evtest collects tablet switch changes.
    
    Change-Id: I6821eaac1feb6c182bc973aaa2f747e687715afb
    Signed-off-by: Gwendal Grignou <gwendal at chromium.org>
    Reviewed-on: https://chromium-review.googlesource.com/430951
    Reviewed-by: Duncan Laurie <dlaurie at google.com>
---
 src/ec/google/chromeec/acpi/ec.asl   |  7 +++++++
 src/ec/google/chromeec/acpi/tbmc.asl | 29 +++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl
index b182766..a40d0ac 100644
--- a/src/ec/google/chromeec/acpi/ec.asl
+++ b/src/ec/google/chromeec/acpi/ec.asl
@@ -322,6 +322,7 @@ Device (EC0)
 		Notify (CREC, 0x80)
 	}
 
+#ifdef EC_ENABLE_TABLET_EVENT
 	// TABLET mode switch Event
 	Method (_Q1D, 0, NotSerialized)
 	{
@@ -329,7 +330,9 @@ Device (EC0)
 		If (CondRefOf (\_SB.DPTF.TPET)) {
 			\_SB.DPTF.TPET()
 		}
+		Notify (TBMC, 0x80)
 	}
+#endif
 
 	/*
 	 * Dynamic Platform Thermal Framework support
@@ -478,4 +481,8 @@ Device (EC0)
 #ifdef EC_ENABLE_PD_MCU_DEVICE
 	#include "pd.asl"
 #endif
+
+#ifdef EC_ENABLE_TABLET_EVENT
+	#include "tbmc.asl"
+#endif
 }
diff --git a/src/ec/google/chromeec/acpi/tbmc.asl b/src/ec/google/chromeec/acpi/tbmc.asl
new file mode 100644
index 0000000..25a27ef1b
--- /dev/null
+++ b/src/ec/google/chromeec/acpi/tbmc.asl
@@ -0,0 +1,29 @@
+/*
+ * 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)
+		}
+	}
+}



More information about the coreboot-gerrit mailing list