summaryrefslogtreecommitdiff
path: root/src/ec/lenovo/h8/h8.c
diff options
context:
space:
mode:
authorPatrick Rudolph <siro@das-labor.org>2017-11-14 19:00:20 +0100
committerPatrick Georgi <pgeorgi@google.com>2018-07-09 09:19:59 +0000
commitf1114d891865e70ae1f2ba58844fec11d055ae3a (patch)
tree93d58cca13f40c9ee0edee69ebd7b7c3fa62dede /src/ec/lenovo/h8/h8.c
parent01d2e46ddb9e17bda911ccce97bfef8ad77b1cbc (diff)
downloadcoreboot-f1114d891865e70ae1f2ba58844fec11d055ae3a.tar.xz
ec/lenovo/h8/acpi: Add BDC interface
* Add SSDT generator to add dynamic ACPI code. * Implement GBDC and SBDC for thinkpad_acpi kernel module. Required for BDC power control from userspace. Tested on Lenovo T430: The bluetooth module is detected and can be powercycled using network manager. Change-Id: Ida825196650966194a883945896a038b0790fe45 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/20985 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Alexander Couzens <lynxis@fe80.eu> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/ec/lenovo/h8/h8.c')
-rw-r--r--src/ec/lenovo/h8/h8.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c
index 58bc3dbb49..1f1655dc40 100644
--- a/src/ec/lenovo/h8/h8.c
+++ b/src/ec/lenovo/h8/h8.c
@@ -181,10 +181,21 @@ static void h8_init(struct device *dev)
pc_keyboard_init(NO_AUX_DEVICE);
}
+#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
+static const char *h8_acpi_name(const struct device *dev)
+{
+ return "EC";
+}
+#endif
+
struct device_operations h8_dev_ops = {
#if IS_ENABLED(CONFIG_GENERATE_SMBIOS_TABLES)
.get_smbios_strings = h8_smbios_strings,
#endif
+#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
+ .acpi_fill_ssdt_generator = h8_ssdt_generator,
+ .acpi_name = h8_acpi_name,
+#endif
.init = h8_init,
};