Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branches 'acpi-pm' and 'acpi-properties'

Merge an ACPI power management quirk and a change related to the
handling of ACPI device properties for 6.4-rc1:

- Do not turn off unused power resources during initialization on the
Toshiba Click Mini (Hans de Goede).

- Support strings in device properties supplied by ACPI _DSM on Apple
platforms (Hector Martin).

* acpi-pm:
ACPI: PM: Do not turn of unused power resources on the Toshiba Click Mini

* acpi-properties:
ACPI: property: Support strings in Apple _DSM props

+29 -1
+19
drivers/acpi/power.c
··· 23 23 24 24 #define pr_fmt(fmt) "ACPI: PM: " fmt 25 25 26 + #include <linux/dmi.h> 26 27 #include <linux/kernel.h> 27 28 #include <linux/module.h> 28 29 #include <linux/init.h> ··· 1023 1022 } 1024 1023 #endif 1025 1024 1025 + static const struct dmi_system_id dmi_leave_unused_power_resources_on[] = { 1026 + { 1027 + /* 1028 + * The Toshiba Click Mini has a CPR3 power-resource which must 1029 + * be on for the touchscreen to work, but which is not in any 1030 + * _PR? lists. The other 2 affected power-resources are no-ops. 1031 + */ 1032 + .matches = { 1033 + DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), 1034 + DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE Click Mini L9W-B"), 1035 + }, 1036 + }, 1037 + {} 1038 + }; 1039 + 1026 1040 /** 1027 1041 * acpi_turn_off_unused_power_resources - Turn off power resources not in use. 1028 1042 */ 1029 1043 void acpi_turn_off_unused_power_resources(void) 1030 1044 { 1031 1045 struct acpi_power_resource *resource; 1046 + 1047 + if (dmi_check_system(dmi_leave_unused_power_resources_on)) 1048 + return; 1032 1049 1033 1050 mutex_lock(&power_resource_list_lock); 1034 1051
+10 -1
drivers/acpi/x86/apple.c
··· 71 71 72 72 if ( key->type != ACPI_TYPE_STRING || 73 73 (val->type != ACPI_TYPE_INTEGER && 74 - val->type != ACPI_TYPE_BUFFER)) 74 + val->type != ACPI_TYPE_BUFFER && 75 + val->type != ACPI_TYPE_STRING)) 75 76 continue; /* skip invalid properties */ 76 77 77 78 __set_bit(i, valid); 78 79 newsize += key->string.length + 1; 79 80 if ( val->type == ACPI_TYPE_BUFFER) 80 81 newsize += val->buffer.length; 82 + else if (val->type == ACPI_TYPE_STRING) 83 + newsize += val->string.length + 1; 81 84 } 82 85 83 86 numvalid = bitmap_weight(valid, numprops); ··· 122 119 newprops[v].type = val->type; 123 120 if (val->type == ACPI_TYPE_INTEGER) { 124 121 newprops[v].integer.value = val->integer.value; 122 + } else if (val->type == ACPI_TYPE_STRING) { 123 + newprops[v].string.length = val->string.length; 124 + newprops[v].string.pointer = free_space; 125 + memcpy(free_space, val->string.pointer, 126 + val->string.length); 127 + free_space += val->string.length + 1; 125 128 } else { 126 129 newprops[v].buffer.length = val->buffer.length; 127 130 newprops[v].buffer.pointer = free_space;