Commit 8167e00e authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branches 'acpi-video' and 'acpi-x86'

* acpi-video:
  ACPI / video: Extend chassis-type detection with a "Lunch Box" check
  ACPI / video: Refactor and fix dmi_is_desktop()

* acpi-x86:
  ACPI / x86: Make PWM2 device always present at Lenovo Yoga Book
...@@ -2124,21 +2124,29 @@ static int __init intel_opregion_present(void) ...@@ -2124,21 +2124,29 @@ static int __init intel_opregion_present(void)
return opregion; return opregion;
} }
/* Check if the chassis-type indicates there is no builtin LCD panel */
static bool dmi_is_desktop(void) static bool dmi_is_desktop(void)
{ {
const char *chassis_type; const char *chassis_type;
unsigned long type;
chassis_type = dmi_get_system_info(DMI_CHASSIS_TYPE); chassis_type = dmi_get_system_info(DMI_CHASSIS_TYPE);
if (!chassis_type) if (!chassis_type)
return false; return false;
if (!strcmp(chassis_type, "3") || /* 3: Desktop */ if (kstrtoul(chassis_type, 10, &type) != 0)
!strcmp(chassis_type, "4") || /* 4: Low Profile Desktop */ return false;
!strcmp(chassis_type, "5") || /* 5: Pizza Box */
!strcmp(chassis_type, "6") || /* 6: Mini Tower */ switch (type) {
!strcmp(chassis_type, "7") || /* 7: Tower */ case 0x03: /* Desktop */
!strcmp(chassis_type, "11")) /* 11: Main Server Chassis */ case 0x04: /* Low Profile Desktop */
case 0x05: /* Pizza Box */
case 0x06: /* Mini Tower */
case 0x07: /* Tower */
case 0x10: /* Lunch Box */
case 0x11: /* Main Server Chassis */
return true; return true;
}
return false; return false;
} }
......
...@@ -56,6 +56,11 @@ static const struct always_present_id always_present_ids[] = { ...@@ -56,6 +56,11 @@ static const struct always_present_id always_present_ids[] = {
*/ */
ENTRY("80860F09", "1", ICPU(INTEL_FAM6_ATOM_SILVERMONT), {}), ENTRY("80860F09", "1", ICPU(INTEL_FAM6_ATOM_SILVERMONT), {}),
ENTRY("80862288", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT), {}), ENTRY("80862288", "1", ICPU(INTEL_FAM6_ATOM_AIRMONT), {}),
/* Lenovo Yoga Book uses PWM2 for keyboard backlight control */
ENTRY("80862289", "2", ICPU(INTEL_FAM6_ATOM_AIRMONT), {
DMI_MATCH(DMI_PRODUCT_NAME, "Lenovo YB1-X9"),
}),
/* /*
* The INT0002 device is necessary to clear wakeup interrupt sources * The INT0002 device is necessary to clear wakeup interrupt sources
* on Cherry Trail devices, without it we get nobody cared IRQ msgs. * on Cherry Trail devices, without it we get nobody cared IRQ msgs.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment