summaryrefslogtreecommitdiff
path: root/src/ec/google
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@google.com>2015-09-01 09:47:55 -0700
committerDuncan Laurie <dlaurie@google.com>2015-09-01 19:59:22 +0000
commitef549a04c50aaef425b6f21324aa275d2e1318f4 (patch)
treec7213a8285a8a479bf292a99d2c3bdd8ae800e98 /src/ec/google
parentab5754da6639f51ee2aec796f832ce4e3b164f82 (diff)
downloadcoreboot-ef549a04c50aaef425b6f21324aa275d2e1318f4.tar.xz
chromeec: Move keyboard backlight code into Chrome EC directory
Since more boards are starting to use the EC provided keyboard backlight interface move the code to a common place and allow it to get included in mainboards. Change-Id: I3f307bbce1a96cdd1c8224b1e89a63d6fedef738 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: http://review.coreboot.org/11478 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/ec/google')
-rw-r--r--src/ec/google/chromeec/acpi/ec.asl4
-rw-r--r--src/ec/google/chromeec/acpi/keyboard_backlight.asl42
2 files changed, 46 insertions, 0 deletions
diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl
index 746060ec56..8b4f91d8c8 100644
--- a/src/ec/google/chromeec/acpi/ec.asl
+++ b/src/ec/google/chromeec/acpi/ec.asl
@@ -420,6 +420,10 @@ Device (EC0)
#include "als.asl"
#endif
+#ifdef EC_ENABLE_KEYBOARD_BACKLIGHT
+ #include "keyboard_backlight.asl"
+#endif
+
#ifdef EC_ENABLE_PD_MCU_DEVICE
#include "pd.asl"
#endif
diff --git a/src/ec/google/chromeec/acpi/keyboard_backlight.asl b/src/ec/google/chromeec/acpi/keyboard_backlight.asl
new file mode 100644
index 0000000000..608994e435
--- /dev/null
+++ b/src/ec/google/chromeec/acpi/keyboard_backlight.asl
@@ -0,0 +1,42 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2015 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc.
+ */
+
+Scope (\_SB)
+{
+ /*
+ * Chrome EC Keyboard Backlight interface
+ */
+ Device (KBLT)
+ {
+ Name (_HID, "GOOG0002")
+ Name (_UID, 1)
+
+ /* Read current backlight value */
+ Method (KBQC, 0, NotSerialized)
+ {
+ Return (\_SB.PCI0.LPCB.EC0.KBLV)
+ }
+
+ /* Write new backlight value */
+ Method (KBCM, 1, NotSerialized)
+ {
+ Store (Arg0, \_SB.PCI0.LPCB.EC0.KBLV)
+ }
+ }
+}