[coreboot-gerrit] Change in coreboot[master]: mb/google/poppy/variants/nautilus: add pen eject event ACPI device
shkim (Code Review)
gerrit at coreboot.org
Wed Jan 10 03:21:38 CET 2018
shkim has uploaded this change for review. ( https://review.coreboot.org/23200
Change subject: mb/google/poppy/variants/nautilus: add pen eject event ACPI device
......................................................................
mb/google/poppy/variants/nautilus: add pen eject event ACPI device
Add an ACPI device to support pen eject event.
BUG=none
BRANCH=master
TEST=emerge-nautilus coreboot
Signed-off-by: Seunghwan Kim <sh_.kim at samsung.com>
Change-Id: I0a3d6b9dc0f1285e6261b07b34994654cd00f1bb
---
M src/mainboard/google/poppy/Kconfig
M src/mainboard/google/poppy/dsdt.asl
A src/mainboard/google/poppy/variants/nautilus/include/variant/acpi/pen_eject.asl
3 files changed, 65 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/00/23200/1
diff --git a/src/mainboard/google/poppy/Kconfig b/src/mainboard/google/poppy/Kconfig
index 9315d96..61cfa37 100644
--- a/src/mainboard/google/poppy/Kconfig
+++ b/src/mainboard/google/poppy/Kconfig
@@ -115,6 +115,10 @@
select SPI_TPM
select TPM2
+config VARIANT_HAS_PEN_EJECT_ACPI
+ bool
+ default n
+
config VARIANT_SPECIFIC_OPTIONS_POPPY
def_bool n
select DRIVERS_I2C_MAX98927
@@ -137,6 +141,7 @@
select DRIVERS_I2C_DA7219
select DRIVERS_PS2_KEYBOARD
select VARIANT_HAS_I2C_TPM if !VBOOT_MOCK_SECDATA
+ select VARIANT_HAS_PEN_EJECT_ACPI
config VARIANT_SPECIFIC_OPTIONS_SORAKA
def_bool n
diff --git a/src/mainboard/google/poppy/dsdt.asl b/src/mainboard/google/poppy/dsdt.asl
index a922d10..2634f31 100644
--- a/src/mainboard/google/poppy/dsdt.asl
+++ b/src/mainboard/google/poppy/dsdt.asl
@@ -73,5 +73,10 @@
{
/* Dynamic Platform Thermal Framework */
#include <variant/acpi/dptf.asl>
+
+#if IS_ENABLED(CONFIG_VARIANT_HAS_PEN_EJECT_ACPI)
+ /* Pen eject event */
+ #include <variant/acpi/pen_eject.asl>
+#endif
}
}
diff --git a/src/mainboard/google/poppy/variants/nautilus/include/variant/acpi/pen_eject.asl b/src/mainboard/google/poppy/variants/nautilus/include/variant/acpi/pen_eject.asl
new file mode 100644
index 0000000..998da13
--- /dev/null
+++ b/src/mainboard/google/poppy/variants/nautilus/include/variant/acpi/pen_eject.asl
@@ -0,0 +1,55 @@
+/*
+ * 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 (PENH)
+{
+ Name (_HID, "PRP0001")
+
+ Name (_CRS, ResourceTemplate () {
+ GpioIo (Exclusive, PullNone, 0, 0, IoRestrictionInputOnly,
+ "\\_SB.PCI0.GPIO", 0, ResourceConsumer) { GPIO_DIG_EJECT }
+ })
+
+ Name (_DSD, Package () {
+ ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+ Package () {
+ Package () {
+ "compatible",
+ Package () { "gpio-keys"}
+ },
+ }
+ })
+
+ Device (EJCT)
+ {
+ Name (_HID, "PRP0001")
+
+ Name (_DSD, Package () {
+ ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
+ Package () {
+ /* SW_PEN_INSERTED */
+ Package () { "linux,code", 0xf },
+ /* EV_SW type */
+ Package () { "linux,input-type", 0x5 },
+ Package () { "label", "pen_eject" },
+ Package () { "gpios",
+ Package () {
+ ^^PENH, 0, 0, 1 /* inserted active low */
+ }
+ },
+ }
+ })
+ }
+}
--
To view, visit https://review.coreboot.org/23200
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: I0a3d6b9dc0f1285e6261b07b34994654cd00f1bb
Gerrit-Change-Number: 23200
Gerrit-PatchSet: 1
Gerrit-Owner: shkim <sh_.kim at samsung.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180110/7d5926e6/attachment-0001.html>
More information about the coreboot-gerrit
mailing list