mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 07:01:23 +00:00
Power management and ACPI material for v4.2-rc2
- Fix for an ACPI resources management regression introduced during the 4.1 cycle (that unfortunately went into -stable) effectively reverting the bad commit along with the recent fixups on top of it and using an alternative approach to address the underlying issue (Rafael J Wysocki). - Fix for a memory leak and an incorrect return value in an error code path in the ACPI LPSS (Low-Power Subsystem) driver (Rafael J Wysocki). - Fix for a leftover dangling pointer in an error code path in the new wakeup IRQ support code (Rafael J Wysocki). - Fix to prevent infinite loops (due to errors in other places) from happening in the core generic PM domains support code (Geert Uytterhoeven). - Hibernation documentation update/clarification (Uwe Geuder). - Support for _CLS-based device enumeration in the ACPI core and in the ATA subsystem (Suravee Suthikulpanit). / -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABCAAGBQJVnZFwAAoJEILEb/54YlRxuysQALZ3y6QAtVFWurwOLXg0Zwoy qoBWlfCRCEKsiLQNe1sDK+dqmfi+ZXvsEqm4y/4uU8dsJdTv1MByaX0aQxP0qmOj Lre9AGNq28JxtTmU2o00qjLW9d9WIQKJn1N51+qqGKTVoqijmEcVlz5xVnqoJmBQ s0Af2kAzG7CLFtNzPI6RbOPMm7S0VEiI/WQhKZXWqGheppfDaRG+wl0pKPv95G73 7wCG+yklSi4j5u2Aox/x1samOy+c+S/l2VgU+Decnv0ccPlChYBCMOzWSJuFn5v7 qVEvUrFYc2ItQElzaqTWc1uEPzf0yg/S4pWJjLBADpDAUBQNXExmaQ2wLlzgR00/ K/cGUqCn0APcw4tjZjVlGvTHmJg6ivdeceQuLdgxGoGgvph9V9JlHD9zmzFLqAXl 3VCJiuHnT9QyfEcAkOhZUvO5WcX892fNpHYe/riLQOll9ODwoWCr+TofGfIvHKZp 1XQ1r68rBpsZnnb5JpYT8F/LgaKa4nWZboLroFWi9SZ0jYdH4U7k88C2bCYpaZGz S07l4GEICSuTPHpQNzshzYw6lWJqoXPFQ5okqnZxwNDWAE30ZII0LQwasuupmuR4 S1fFi30YTI23tiDEZRWgVWbMPD++jZdQoflBZq5Lo8s4EfPD5yS+LtxACzktDlM0 fq6bcUUO85Weo+zNxEa3 =qomE -----END PGP SIGNATURE----- Merge tag 'pm+acpi-4.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management and ACPI updates from Rafael Wysocki: "These are fixes on top of the previous PM+ACPI pull requests (including one fix for a 4.1 regression) and two commits adding _CLS-based device enumeration support to the ACPI core and the ATA subsystem that waited for the latest ACPICA changes to be merged. Specifics: - Fix for an ACPI resources management regression introduced during the 4.1 cycle (that unfortunately went into -stable) effectively reverting the bad commit along with the recent fixups on top of it and using an alternative approach to address the underlying issue (Rafael J Wysocki). - Fix for a memory leak and an incorrect return value in an error code path in the ACPI LPSS (Low-Power Subsystem) driver (Rafael J Wysocki). - Fix for a leftover dangling pointer in an error code path in the new wakeup IRQ support code (Rafael J Wysocki). - Fix to prevent infinite loops (due to errors in other places) from happening in the core generic PM domains support code (Geert Uytterhoeven). - Hibernation documentation update/clarification (Uwe Geuder). - Support for _CLS-based device enumeration in the ACPI core and in the ATA subsystem (Suravee Suthikulpanit)" * tag 'pm+acpi-4.2-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / wakeirq: Avoid setting power.wakeirq too hastily ata: ahci_platform: Add ACPI _CLS matching ACPI / scan: Add support for ACPI _CLS device matching PM / hibernate: clarify resume documentation PM / Domains: Avoid infinite loops in attach/detach code ACPI / LPSS: Fix up acpi_lpss_create_device() ACPI / PNP: Reserve ACPI resources at the fs_initcall_sync stage
This commit is contained in:
commit
883a2dfd6f
15 changed files with 148 additions and 240 deletions
|
@ -63,6 +63,8 @@ int main(void)
|
|||
|
||||
DEVID(acpi_device_id);
|
||||
DEVID_FIELD(acpi_device_id, id);
|
||||
DEVID_FIELD(acpi_device_id, cls);
|
||||
DEVID_FIELD(acpi_device_id, cls_msk);
|
||||
|
||||
DEVID(pnp_device_id);
|
||||
DEVID_FIELD(pnp_device_id, id);
|
||||
|
|
|
@ -523,12 +523,40 @@ static int do_serio_entry(const char *filename,
|
|||
}
|
||||
ADD_TO_DEVTABLE("serio", serio_device_id, do_serio_entry);
|
||||
|
||||
/* looks like: "acpi:ACPI0003 or acpi:PNP0C0B" or "acpi:LNXVIDEO" */
|
||||
/* looks like: "acpi:ACPI0003" or "acpi:PNP0C0B" or "acpi:LNXVIDEO" or
|
||||
* "acpi:bbsspp" (bb=base-class, ss=sub-class, pp=prog-if)
|
||||
*
|
||||
* NOTE: Each driver should use one of the following : _HID, _CIDs
|
||||
* or _CLS. Also, bb, ss, and pp can be substituted with ??
|
||||
* as don't care byte.
|
||||
*/
|
||||
static int do_acpi_entry(const char *filename,
|
||||
void *symval, char *alias)
|
||||
{
|
||||
DEF_FIELD_ADDR(symval, acpi_device_id, id);
|
||||
sprintf(alias, "acpi*:%s:*", *id);
|
||||
DEF_FIELD_ADDR(symval, acpi_device_id, cls);
|
||||
DEF_FIELD_ADDR(symval, acpi_device_id, cls_msk);
|
||||
|
||||
if (id && strlen((const char *)*id))
|
||||
sprintf(alias, "acpi*:%s:*", *id);
|
||||
else if (cls) {
|
||||
int i, byte_shift, cnt = 0;
|
||||
unsigned int msk;
|
||||
|
||||
sprintf(&alias[cnt], "acpi*:");
|
||||
cnt = 6;
|
||||
for (i = 1; i <= 3; i++) {
|
||||
byte_shift = 8 * (3-i);
|
||||
msk = (*cls_msk >> byte_shift) & 0xFF;
|
||||
if (msk)
|
||||
sprintf(&alias[cnt], "%02x",
|
||||
(*cls >> byte_shift) & 0xFF);
|
||||
else
|
||||
sprintf(&alias[cnt], "??");
|
||||
cnt += 2;
|
||||
}
|
||||
sprintf(&alias[cnt], ":*");
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
ADD_TO_DEVTABLE("acpi", acpi_device_id, do_acpi_entry);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue