mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-23 08:35:19 -05:00
More ACPI updates 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). - Add an ACPI device ID quirk for Lenovo Yoga Tablet 2 (Marius Hoch). -----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmRSbFMSHHJqd0Byand5 c29ja2kubmV0AAoJEILEb/54YlRxPJ0QALaL7YQJQTw0MMzx0l4V/tFUjaMBxwK8 WB4syZuZZfiDqEfUDq9PYW2MW1llpmko+T13xenYPU3DqsLEeHbeuuZBTJvzPlDl 8/RXu7osHTmY+CCaq970P3lEAt5O6EvMOblBkVJQMtmV8sINwuhzAq0DNu5EOBEI u/nccgpnZciXcYEmaAQqgc7qekH7VTa/eWAddc1jr/h2JudztHmWuJl4ptlhO0es imZVmGjtuWLVvQaHV2rNAGFy9HVDz5ZbmlujhWPqeAQs2gOs3zXBYrjQFsEbhgUx 5ONSSzVRKylwRnSC6TGXszXgX/lal04i/NutuAY1Or46rCjNTsPonjFhWWzyFzkS Afk/VMobZFbtTlGejx1GJtw5EN1HfbUylOdrdDA8Lzmihkp51YspcgtDqWNQDrF/ VOAPwaaV24J/ZFTjftmBnke0vWQTGJ+RUvFlQUH0rQfvgnqyYW3Mxwy04JwpnUOm hfWoXO0gnl+IHvnEzRaszcd65SJ43nvaHYBOWjG9SvlpQyXAlfnFKtteqbTmo4Qi MuYEXPu5AQRi930Uga/G0TfNV0iHnLBnuCO/bh4A/96b9ODY25/RrhcHndBk4kFd 6C+pYNNGsMvicgoi/Iuh25z6WbinC2TtmvrlrJFqeGuGiPGw/5KEmtGNVRySxagd zZXJlfZRotxi =XhG2 -----END PGP SIGNATURE----- Merge tag 'acpi-6.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more ACPI updates from Rafael Wysocki: "These add two ACPI-related quirks and extend support for Apple device properties supplied via ACPI _DSM. Specifics: - 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) - Add an ACPI device ID quirk for Lenovo Yoga Tablet 2 (Marius Hoch)" * tag 'acpi-6.4-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: property: Support strings in Apple _DSM props ACPI: x86: utils: Remove Lenovo Yoga Tablet 2's MAGN0001 ACPI: PM: Do not turn of unused power resources on the Toshiba Click Mini
This commit is contained in:
commit
0153d8e695
3 changed files with 39 additions and 1 deletions
|
@ -23,6 +23,7 @@
|
|||
|
||||
#define pr_fmt(fmt) "ACPI: PM: " fmt
|
||||
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
|
@ -1022,6 +1023,21 @@ void acpi_resume_power_resources(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
static const struct dmi_system_id dmi_leave_unused_power_resources_on[] = {
|
||||
{
|
||||
/*
|
||||
* The Toshiba Click Mini has a CPR3 power-resource which must
|
||||
* be on for the touchscreen to work, but which is not in any
|
||||
* _PR? lists. The other 2 affected power-resources are no-ops.
|
||||
*/
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE Click Mini L9W-B"),
|
||||
},
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
/**
|
||||
* acpi_turn_off_unused_power_resources - Turn off power resources not in use.
|
||||
*/
|
||||
|
@ -1029,6 +1045,9 @@ void acpi_turn_off_unused_power_resources(void)
|
|||
{
|
||||
struct acpi_power_resource *resource;
|
||||
|
||||
if (dmi_check_system(dmi_leave_unused_power_resources_on))
|
||||
return;
|
||||
|
||||
mutex_lock(&power_resource_list_lock);
|
||||
|
||||
list_for_each_entry_reverse(resource, &acpi_power_resource_list, list_node) {
|
||||
|
|
|
@ -71,13 +71,16 @@ void acpi_extract_apple_properties(struct acpi_device *adev)
|
|||
|
||||
if ( key->type != ACPI_TYPE_STRING ||
|
||||
(val->type != ACPI_TYPE_INTEGER &&
|
||||
val->type != ACPI_TYPE_BUFFER))
|
||||
val->type != ACPI_TYPE_BUFFER &&
|
||||
val->type != ACPI_TYPE_STRING))
|
||||
continue; /* skip invalid properties */
|
||||
|
||||
__set_bit(i, valid);
|
||||
newsize += key->string.length + 1;
|
||||
if ( val->type == ACPI_TYPE_BUFFER)
|
||||
newsize += val->buffer.length;
|
||||
else if (val->type == ACPI_TYPE_STRING)
|
||||
newsize += val->string.length + 1;
|
||||
}
|
||||
|
||||
numvalid = bitmap_weight(valid, numprops);
|
||||
|
@ -119,6 +122,12 @@ void acpi_extract_apple_properties(struct acpi_device *adev)
|
|||
newprops[v].type = val->type;
|
||||
if (val->type == ACPI_TYPE_INTEGER) {
|
||||
newprops[v].integer.value = val->integer.value;
|
||||
} else if (val->type == ACPI_TYPE_STRING) {
|
||||
newprops[v].string.length = val->string.length;
|
||||
newprops[v].string.pointer = free_space;
|
||||
memcpy(free_space, val->string.pointer,
|
||||
val->string.length);
|
||||
free_space += val->string.length + 1;
|
||||
} else {
|
||||
newprops[v].buffer.length = val->buffer.length;
|
||||
newprops[v].buffer.pointer = free_space;
|
||||
|
|
|
@ -143,6 +143,16 @@ static const struct override_status_id override_status_ids[] = {
|
|||
DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"),
|
||||
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"),
|
||||
}),
|
||||
|
||||
/*
|
||||
* The LSM303D on the Lenovo Yoga Tablet 2 series is present
|
||||
* as both ACCL0001 and MAGN0001. As we can only ever register an
|
||||
* i2c client for one of them, ignore MAGN0001.
|
||||
*/
|
||||
NOT_PRESENT_ENTRY_HID("MAGN0001", "1", ATOM_SILVERMONT, {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_FAMILY, "YOGATablet2"),
|
||||
}),
|
||||
};
|
||||
|
||||
bool acpi_device_override_status(struct acpi_device *adev, unsigned long long *status)
|
||||
|
|
Loading…
Reference in a new issue