[coreboot-gerrit] Change in coreboot[master]: Kconfig: add option for convertible

Matt Delco (Code Review) gerrit at coreboot.org
Thu Aug 16 00:59:32 CEST 2018


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


Change subject: Kconfig: add option for convertible
......................................................................

Kconfig: add option for convertible

This change adds a boolean open to flag if a device is a convertible.
This can be used to control SMBIOS enclosure type, and will be used in a
later change to control the presense of an ACPI tablet model device when
using a Chrome EC.

Change-Id: I2cc47d3b6233198a35ffb9844ef4a839328238d5
Signed-off-by: Matt Delco <delco at chromium.org>
---
M src/Kconfig
M src/arch/x86/acpi.c
2 files changed, 10 insertions(+), 2 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/28105/1

diff --git a/src/Kconfig b/src/Kconfig
index bce3e32..0e40e2a 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -336,6 +336,11 @@
 	default n
 	bool
 
+# controls chasis type (and tablet mode detection with Chrome EC)
+config SYSTEM_TYPE_CONVERTIBLE
+	default n
+	bool
+
 config CBFS_AUTOGEN_ATTRIBUTES
 	default n
 	bool
@@ -659,11 +664,13 @@
 	hex
 	depends on GENERATE_SMBIOS_TABLES
 	default 0x09 if SYSTEM_TYPE_LAPTOP
+	default 0x1f if SYSTEM_TYPE_CONVERTIBLE
 	default 0x03
 	help
 	  System Enclosure or Chassis Types as defined in SMBIOS specification.
 	  The default value is SMBIOS_ENCLOSURE_DESKTOP (0x03) or
-	  SMBIOS_ENCLOSURE_LAPTOP (0x09) if SYSTEM_TYPE_LAPTOP is set.
+	  SMBIOS_ENCLOSURE_LAPTOP (0x09) if SYSTEM_TYPE_LAPTOP is set or
+	  SMBIOS_ENCLOSURE_CONVERTIBLE (0x1f) if SYSTEM_TYPE_CONVERTIBLE is set
 
 endmenu
 
diff --git a/src/arch/x86/acpi.c b/src/arch/x86/acpi.c
index 8d7579d..e294695 100644
--- a/src/arch/x86/acpi.c
+++ b/src/arch/x86/acpi.c
@@ -980,7 +980,8 @@
 	fadt->x_dsdt_l = (unsigned long)dsdt;
 	fadt->x_dsdt_h = 0;
 
-	if (IS_ENABLED(CONFIG_SYSTEM_TYPE_LAPTOP))
+	if (IS_ENABLED(CONFIG_SYSTEM_TYPE_LAPTOP) ||
+	    IS_ENABLED(CONFIG_SYSTEM_TYPE_CONVERTIBLE))
 		fadt->preferred_pm_profile = PM_MOBILE;
 	else
 		fadt->preferred_pm_profile = PM_DESKTOP;

-- 
To view, visit https://review.coreboot.org/28105
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: I2cc47d3b6233198a35ffb9844ef4a839328238d5
Gerrit-Change-Number: 28105
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/20180815/2f6580b0/attachment-0001.html>


More information about the coreboot-gerrit mailing list