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

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'acpi-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI updates from Rafael Wysocki:

- Update the ACPICA code in the kernel to the 20200214 upstream
release including:

* Fix to re-enable the sleep button after wakeup (Anchal
Agarwal).

* Fixes for mistakes in comments and typos (Bob Moore).

* ASL-ASL+ converter updates (Erik Kaneda).

* Type casting cleanups (Sven Barth).

- Clean up the intialization of the EC driver and eliminate some dead
code from it (Rafael Wysocki).

- Clean up the quirk tables in the AC and battery drivers (Hans de
Goede).

- Fix the global lock handling on x86 to ignore unspecified bit
positions in the global lock field (Jan Engelhardt).

- Add a new "tiny" driver for ACPI button devices exposed by VMs to
guest kernels to send signals directly to init (Josh Triplett).

- Add a kernel parameter to disable ACPI BGRT on x86 (Alex Hung).

- Make the ACPI PCI host bridge and fan drivers use scnprintf() to
avoid potential buffer overflows (Takashi Iwai).

- Clean up assorted pieces of code:

* Reorder "asmlinkage" to make g++ happy (Alexey Dobriyan).

* Drop unneeded variable initialization (Colin Ian King).

* Add missing __acquires/__releases annotations (Jules Irenge).

* Replace list_for_each_safe() with list_for_each_entry_safe()
(chenqiwu)"

* tag 'acpi-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (31 commits)
ACPICA: Update version to 20200214
ACPI: PCI: Use scnprintf() for avoiding potential buffer overflow
ACPI: fan: Use scnprintf() for avoiding potential buffer overflow
ACPI: EC: Eliminate EC_FLAGS_QUERY_HANDSHAKE
ACPI: EC: Do not clear boot_ec_is_ecdt in acpi_ec_add()
ACPI: EC: Simplify acpi_ec_ecdt_start() and acpi_ec_init()
ACPI: EC: Consolidate event handler installation code
acpi/x86: ignore unspecified bit positions in the ACPI global lock field
acpi/x86: add a kernel parameter to disable ACPI BGRT
x86/acpi: make "asmlinkage" part first thing in the function definition
ACPI: list_for_each_safe() -> list_for_each_entry_safe()
ACPI: video: remove redundant assignments to variable result
ACPI: OSL: Add missing __acquires/__releases annotations
ACPI / battery: Cleanup Lenovo Ideapad Miix 320 DMI table entry
ACPI / AC: Cleanup DMI quirk table
ACPI: EC: Use fast path in acpi_ec_add() for DSDT boot EC
ACPI: EC: Simplify acpi_ec_add()
ACPI: EC: Drop AE_NOT_FOUND special case from ec_install_handlers()
ACPI: EC: Avoid passing redundant argument to functions
ACPI: EC: Avoid printing confusing messages in acpi_ec_setup()
...

+300 -262
+3
Documentation/admin-guide/kernel-parameters.txt
··· 450 450 bert_disable [ACPI] 451 451 Disable BERT OS support on buggy BIOSes. 452 452 453 + bgrt_disable [ACPI][X86] 454 + Disable BGRT to avoid flickering OEM logo. 455 + 453 456 bttv.card= [HW,V4L] bttv (bt848 + bt878 based grabber cards) 454 457 bttv.radio= Most important insmod options are available as 455 458 kernel args too.
+10 -2
arch/x86/kernel/acpi/boot.c
··· 45 45 #define PREFIX "ACPI: " 46 46 47 47 int acpi_noirq; /* skip ACPI IRQ initialization */ 48 + int acpi_nobgrt; /* skip ACPI BGRT */ 48 49 int acpi_pci_disabled; /* skip ACPI PCI scan and IRQ initialization */ 49 50 EXPORT_SYMBOL(acpi_pci_disabled); 50 51 ··· 1620 1619 acpi_process_madt(); 1621 1620 1622 1621 acpi_table_parse(ACPI_SIG_HPET, acpi_parse_hpet); 1623 - if (IS_ENABLED(CONFIG_ACPI_BGRT)) 1622 + if (IS_ENABLED(CONFIG_ACPI_BGRT) && !acpi_nobgrt) 1624 1623 acpi_table_parse(ACPI_SIG_BGRT, acpi_parse_bgrt); 1625 1624 1626 1625 if (!acpi_noirq) ··· 1671 1670 return 0; 1672 1671 } 1673 1672 early_param("acpi", parse_acpi); 1673 + 1674 + static int __init parse_acpi_bgrt(char *arg) 1675 + { 1676 + acpi_nobgrt = true; 1677 + return 0; 1678 + } 1679 + early_param("bgrt_disable", parse_acpi_bgrt); 1674 1680 1675 1681 /* FIXME: Using pci= for an ACPI parameter is a travesty. */ 1676 1682 static int __init parse_pci(char *arg) ··· 1748 1740 new = (((old & ~0x3) + 2) + ((old >> 1) & 0x1)); 1749 1741 val = cmpxchg(lock, old, new); 1750 1742 } while (unlikely (val != old)); 1751 - return (new < 3) ? -1 : 0; 1743 + return ((new & 0x3) < 3) ? -1 : 0; 1752 1744 } 1753 1745 1754 1746 int __acpi_release_global_lock(unsigned int *lock)
+1 -1
arch/x86/kernel/acpi/sleep.c
··· 43 43 * 44 44 * Wrapper around acpi_enter_sleep_state() to be called by assmebly. 45 45 */ 46 - acpi_status asmlinkage __visible x86_acpi_enter_sleep_state(u8 state) 46 + asmlinkage acpi_status __visible x86_acpi_enter_sleep_state(u8 state) 47 47 { 48 48 return acpi_enter_sleep_state(state); 49 49 }
+1 -1
arch/x86/kernel/acpi/sleep.h
··· 19 19 20 20 extern int x86_acpi_suspend_lowlevel(void); 21 21 22 - acpi_status asmlinkage x86_acpi_enter_sleep_state(u8 state); 22 + asmlinkage acpi_status x86_acpi_enter_sleep_state(u8 state);
+24
drivers/acpi/Kconfig
··· 190 190 To compile this driver as a module, choose M here: 191 191 the module will be called button. 192 192 193 + config ACPI_TINY_POWER_BUTTON 194 + tristate "Tiny Power Button Driver" 195 + depends on !ACPI_BUTTON 196 + help 197 + This driver provides a tiny alternative to the ACPI Button driver. 198 + The tiny power button driver only handles the power button. Rather 199 + than notifying userspace via the input layer or a netlink event, this 200 + driver directly signals the init process to shut down. 201 + 202 + This driver is particularly suitable for cloud and VM environments, 203 + which use a simulated power button to initiate a controlled poweroff, 204 + but which may not want to run a separate userspace daemon to process 205 + input events. 206 + 207 + config ACPI_TINY_POWER_BUTTON_SIGNAL 208 + int "Tiny Power Button Signal" 209 + depends on ACPI_TINY_POWER_BUTTON 210 + default 38 211 + help 212 + Default signal to send to init in response to the power button. 213 + 214 + Likely values here include 38 (SIGRTMIN+4) to power off, or 2 215 + (SIGINT) to simulate Ctrl+Alt+Del. 216 + 193 217 config ACPI_VIDEO 194 218 tristate "Video" 195 219 depends on X86 && BACKLIGHT_CLASS_DEVICE
+1
drivers/acpi/Makefile
··· 71 71 72 72 obj-$(CONFIG_ACPI_AC) += ac.o 73 73 obj-$(CONFIG_ACPI_BUTTON) += button.o 74 + obj-$(CONFIG_ACPI_TINY_POWER_BUTTON) += tiny-power-button.o 74 75 obj-$(CONFIG_ACPI_FAN) += fan.o 75 76 obj-$(CONFIG_ACPI_VIDEO) += video.o 76 77 obj-$(CONFIG_ACPI_TAD) += acpi_tad.o
+14 -13
drivers/acpi/ac.c
··· 293 293 return 0; 294 294 } 295 295 296 + /* Please keep this list alphabetically sorted */ 296 297 static const struct dmi_system_id ac_dmi_table[] __initconst = { 297 298 { 298 - /* Thinkpad e530 */ 299 - .callback = thinkpad_e530_quirk, 300 - .matches = { 301 - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 302 - DMI_MATCH(DMI_PRODUCT_NAME, "32597CG"), 303 - }, 304 - }, 305 - { 306 - /* ECS EF20EA */ 299 + /* ECS EF20EA, AXP288 PMIC but uses separate fuel-gauge */ 307 300 .callback = ac_do_not_check_pmic_quirk, 308 301 .matches = { 309 302 DMI_MATCH(DMI_PRODUCT_NAME, "EF20EA"), 310 303 }, 311 304 }, 312 305 { 313 - /* Lenovo Ideapad Miix 320 */ 306 + /* Lenovo Ideapad Miix 320, AXP288 PMIC, separate fuel-gauge */ 314 307 .callback = ac_do_not_check_pmic_quirk, 315 308 .matches = { 316 - DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"), 317 - DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "80XF"), 318 - DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo MIIX 320-10ICR"), 309 + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 310 + DMI_MATCH(DMI_PRODUCT_NAME, "80XF"), 311 + DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo MIIX 320-10ICR"), 312 + }, 313 + }, 314 + { 315 + /* Lenovo Thinkpad e530, see comment in acpi_ac_notify() */ 316 + .callback = thinkpad_e530_quirk, 317 + .matches = { 318 + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 319 + DMI_MATCH(DMI_PRODUCT_NAME, "32597CG"), 319 320 }, 320 321 }, 321 322 {},
+1 -1
drivers/acpi/acpi_video.c
··· 943 943 int i, max_level = 0; 944 944 unsigned long long level, level_old; 945 945 struct acpi_video_device_brightness *br = NULL; 946 - int result = -EINVAL; 946 + int result; 947 947 948 948 result = acpi_video_get_levels(device->dev, &br, &max_level); 949 949 if (result)
+1 -3
drivers/acpi/acpica/acconvert.h
··· 65 65 /* 66 66 * cvparser 67 67 */ 68 - void 69 - cv_init_file_tree(struct acpi_table_header *table, 70 - u8 *aml_start, u32 aml_length); 68 + void cv_init_file_tree(struct acpi_table_header *table, FILE * root_file); 71 69 72 70 void cv_clear_op_comments(union acpi_parse_object *op); 73 71
+2 -2
drivers/acpi/acpica/acmacros.h
··· 477 477 #define ASL_CV_PRINT_ONE_COMMENT(a,b,c,d) cv_print_one_comment_type (a,b,c,d); 478 478 #define ASL_CV_PRINT_ONE_COMMENT_LIST(a,b) cv_print_one_comment_list (a,b); 479 479 #define ASL_CV_FILE_HAS_SWITCHED(a) cv_file_has_switched(a) 480 - #define ASL_CV_INIT_FILETREE(a,b,c) cv_init_file_tree(a,b,c); 480 + #define ASL_CV_INIT_FILETREE(a,b) cv_init_file_tree(a,b); 481 481 482 482 #else 483 483 ··· 492 492 #define ASL_CV_PRINT_ONE_COMMENT(a,b,c,d) 493 493 #define ASL_CV_PRINT_ONE_COMMENT_LIST(a,b) 494 494 #define ASL_CV_FILE_HAS_SWITCHED(a) 0 495 - #define ASL_CV_INIT_FILETREE(a,b,c) 495 + #define ASL_CV_INIT_FILETREE(a,b) 496 496 497 497 #endif 498 498
+1 -1
drivers/acpi/acpica/evevent.c
··· 130 130 131 131 /* 132 132 * Initialize the structure that keeps track of fixed event handlers and 133 - * enable the fixed events. 133 + * disable all of the fixed events. 134 134 */ 135 135 for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++) { 136 136 acpi_gbl_fixed_event_handlers[i].handler = NULL;
+12
drivers/acpi/acpica/hwsleep.c
··· 300 300 [ACPI_EVENT_POWER_BUTTON]. 301 301 status_register_id, ACPI_CLEAR_STATUS); 302 302 303 + /* Enable sleep button */ 304 + 305 + (void) 306 + acpi_write_bit_register(acpi_gbl_fixed_event_info 307 + [ACPI_EVENT_SLEEP_BUTTON]. 308 + enable_register_id, ACPI_ENABLE_EVENT); 309 + 310 + (void) 311 + acpi_write_bit_register(acpi_gbl_fixed_event_info 312 + [ACPI_EVENT_SLEEP_BUTTON]. 313 + status_register_id, ACPI_CLEAR_STATUS); 314 + 303 315 acpi_hw_execute_sleep_method(METHOD_PATHNAME__SST, ACPI_SST_WORKING); 304 316 return_ACPI_STATUS(status); 305 317 }
+3 -3
drivers/acpi/acpica/nsnames.c
··· 164 164 /* Build the path in the caller buffer */ 165 165 166 166 (void)acpi_ns_build_normalized_path(node, buffer->pointer, 167 - required_size, no_trailing); 167 + (u32)required_size, no_trailing); 168 168 169 169 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%s [%X]\n", 170 170 (char *)buffer->pointer, (u32) required_size)); ··· 315 315 316 316 /* Build the path in the allocated buffer */ 317 317 318 - (void)acpi_ns_build_normalized_path(node, name_buffer, size, 318 + (void)acpi_ns_build_normalized_path(node, name_buffer, (u32)size, 319 319 no_trailing); 320 320 321 321 ACPI_DEBUG_PRINT_RAW((ACPI_DB_NAMES, "%s: Path \"%s\"\n", ··· 346 346 char *full_path = NULL; 347 347 char *external_path = NULL; 348 348 char *prefix_path = NULL; 349 - u32 prefix_path_length = 0; 349 + acpi_size prefix_path_length = 0; 350 350 351 351 /* If there is a prefix, get the pathname to it */ 352 352
+1 -1
drivers/acpi/acpica/nsxfname.c
··· 516 516 517 517 method_flags = *parser_state.aml++; 518 518 aml_start = parser_state.aml; 519 - aml_length = ACPI_PTR_DIFF(parser_state.pkg_end, aml_start); 519 + aml_length = (u32)ACPI_PTR_DIFF(parser_state.pkg_end, aml_start); 520 520 521 521 /* 522 522 * Allocate resources up-front. We don't want to have to delete a new
+6 -6
drivers/acpi/acpica/tbxface.c
··· 202 202 * 203 203 * PARAMETERS: signature - ACPI signature of needed table 204 204 * instance - Which instance (for SSDTs) 205 - * out_table_header - The pointer to the table header to fill 205 + * out_table_header - The pointer to the where the table header 206 + * is returned 206 207 * 207 - * RETURN: Status and pointer to mapped table header 208 + * RETURN: Status and a copy of the table header 208 209 * 209 - * DESCRIPTION: Finds an ACPI table header. 210 - * 211 - * NOTE: Caller is responsible in unmapping the header with 212 - * acpi_os_unmap_memory 210 + * DESCRIPTION: Finds and returns an ACPI table header. Caller provides the 211 + * memory where a copy of the header is to be returned 212 + * (fixed length). 213 213 * 214 214 ******************************************************************************/ 215 215 acpi_status
+1 -1
drivers/acpi/acpica/utobject.c
··· 44 44 * 45 45 * NOTE: We always allocate the worst-case object descriptor because 46 46 * these objects are cached, and we want them to be 47 - * one-size-satisifies-any-request. This in itself may not be 47 + * one-size-satisfies-any-request. This in itself may not be 48 48 * the most memory efficient, but the efficiency of the object 49 49 * cache should more than make up for this! 50 50 *
+5 -5
drivers/acpi/battery.c
··· 1365 1365 }, 1366 1366 }, 1367 1367 { 1368 - /* ECS EF20EA */ 1368 + /* ECS EF20EA, AXP288 PMIC but uses separate fuel-gauge */ 1369 1369 .callback = battery_do_not_check_pmic_quirk, 1370 1370 .matches = { 1371 1371 DMI_MATCH(DMI_PRODUCT_NAME, "EF20EA"), 1372 1372 }, 1373 1373 }, 1374 1374 { 1375 - /* Lenovo Ideapad Miix 320 */ 1375 + /* Lenovo Ideapad Miix 320, AXP288 PMIC, separate fuel-gauge */ 1376 1376 .callback = battery_do_not_check_pmic_quirk, 1377 1377 .matches = { 1378 - DMI_EXACT_MATCH(DMI_SYS_VENDOR, "LENOVO"), 1379 - DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "80XF"), 1380 - DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo MIIX 320-10ICR"), 1378 + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 1379 + DMI_MATCH(DMI_PRODUCT_NAME, "80XF"), 1380 + DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo MIIX 320-10ICR"), 1381 1381 }, 1382 1382 }, 1383 1383 {},
-3
drivers/acpi/button.c
··· 30 30 #define ACPI_BUTTON_NOTIFY_STATUS 0x80 31 31 32 32 #define ACPI_BUTTON_SUBCLASS_POWER "power" 33 - #define ACPI_BUTTON_HID_POWER "PNP0C0C" 34 33 #define ACPI_BUTTON_DEVICE_NAME_POWER "Power Button" 35 34 #define ACPI_BUTTON_TYPE_POWER 0x01 36 35 37 36 #define ACPI_BUTTON_SUBCLASS_SLEEP "sleep" 38 - #define ACPI_BUTTON_HID_SLEEP "PNP0C0E" 39 37 #define ACPI_BUTTON_DEVICE_NAME_SLEEP "Sleep Button" 40 38 #define ACPI_BUTTON_TYPE_SLEEP 0x03 41 39 42 40 #define ACPI_BUTTON_SUBCLASS_LID "lid" 43 - #define ACPI_BUTTON_HID_LID "PNP0C0D" 44 41 #define ACPI_BUTTON_DEVICE_NAME_LID "Lid Switch" 45 42 #define ACPI_BUTTON_TYPE_LID 0x05 46 43
+132 -182
drivers/acpi/ec.c
··· 182 182 static struct workqueue_struct *ec_wq; 183 183 static struct workqueue_struct *ec_query_wq; 184 184 185 - static int EC_FLAGS_QUERY_HANDSHAKE; /* Needs QR_EC issued when SCI_EVT set */ 186 185 static int EC_FLAGS_CORRECT_ECDT; /* Needs ECDT port address correction */ 187 186 static int EC_FLAGS_IGNORE_DSDT_GPE; /* Needs ECDT GPE as correction setting */ 188 187 static int EC_FLAGS_CLEAR_ON_RESUME; /* Needs acpi_ec_clear() on boot/resume */ ··· 689 690 wakeup = true; 690 691 } 691 692 goto out; 692 - } else { 693 - if (EC_FLAGS_QUERY_HANDSHAKE && 694 - !(status & ACPI_EC_FLAG_SCI) && 695 - (t->command == ACPI_EC_COMMAND_QUERY)) { 696 - ec_transaction_transition(ec, ACPI_EC_COMMAND_POLL); 697 - t->rdata[t->ri++] = 0x00; 698 - ec_transaction_transition(ec, ACPI_EC_COMMAND_COMPLETE); 699 - ec_dbg_evt("Command(%s) completed by software", 700 - acpi_ec_cmd_string(ACPI_EC_COMMAND_QUERY)); 701 - wakeup = true; 702 - } else if ((status & ACPI_EC_FLAG_IBF) == 0) { 703 - acpi_ec_write_cmd(ec, t->command); 704 - ec_transaction_transition(ec, ACPI_EC_COMMAND_POLL); 705 - } else 706 - goto err; 693 + } else if (!(status & ACPI_EC_FLAG_IBF)) { 694 + acpi_ec_write_cmd(ec, t->command); 695 + ec_transaction_transition(ec, ACPI_EC_COMMAND_POLL); 707 696 goto out; 708 697 } 709 698 err: ··· 1414 1427 return AE_CTRL_TERMINATE; 1415 1428 } 1416 1429 1417 - static void install_gpe_event_handler(struct acpi_ec *ec) 1430 + static bool install_gpe_event_handler(struct acpi_ec *ec) 1418 1431 { 1419 - acpi_status status = 1420 - acpi_install_gpe_raw_handler(NULL, ec->gpe, 1421 - ACPI_GPE_EDGE_TRIGGERED, 1422 - &acpi_ec_gpe_handler, 1423 - ec); 1424 - if (ACPI_SUCCESS(status)) { 1425 - /* This is not fatal as we can poll EC events */ 1426 - set_bit(EC_FLAGS_EVENT_HANDLER_INSTALLED, &ec->flags); 1427 - acpi_ec_leave_noirq(ec); 1428 - if (test_bit(EC_FLAGS_STARTED, &ec->flags) && 1429 - ec->reference_count >= 1) 1430 - acpi_ec_enable_gpe(ec, true); 1431 - } 1432 + acpi_status status; 1433 + 1434 + status = acpi_install_gpe_raw_handler(NULL, ec->gpe, 1435 + ACPI_GPE_EDGE_TRIGGERED, 1436 + &acpi_ec_gpe_handler, ec); 1437 + if (ACPI_FAILURE(status)) 1438 + return false; 1439 + 1440 + if (test_bit(EC_FLAGS_STARTED, &ec->flags) && ec->reference_count >= 1) 1441 + acpi_ec_enable_gpe(ec, true); 1442 + 1443 + return true; 1432 1444 } 1433 1445 1434 - /* ACPI reduced hardware platforms use a GpioInt specified in _CRS. */ 1435 - static int install_gpio_irq_event_handler(struct acpi_ec *ec, 1436 - struct acpi_device *device) 1446 + static bool install_gpio_irq_event_handler(struct acpi_ec *ec) 1437 1447 { 1438 - int irq = acpi_dev_gpio_irq_get(device, 0); 1439 - int ret; 1440 - 1441 - if (irq < 0) 1442 - return irq; 1443 - 1444 - ret = request_irq(irq, acpi_ec_irq_handler, IRQF_SHARED, 1445 - "ACPI EC", ec); 1446 - 1447 - /* 1448 - * Unlike the GPE case, we treat errors here as fatal, we'll only 1449 - * implement GPIO polling if we find a case that needs it. 1450 - */ 1451 - if (ret < 0) 1452 - return ret; 1453 - 1454 - ec->irq = irq; 1455 - set_bit(EC_FLAGS_EVENT_HANDLER_INSTALLED, &ec->flags); 1456 - acpi_ec_leave_noirq(ec); 1457 - 1458 - return 0; 1448 + return request_irq(ec->irq, acpi_ec_irq_handler, IRQF_SHARED, 1449 + "ACPI EC", ec) >= 0; 1459 1450 } 1460 1451 1461 - /* 1462 - * Note: This function returns an error code only when the address space 1463 - * handler is not installed, which means "not able to handle 1464 - * transactions". 1452 + /** 1453 + * ec_install_handlers - Install service callbacks and register query methods. 1454 + * @ec: Target EC. 1455 + * @device: ACPI device object corresponding to @ec. 1456 + * 1457 + * Install a handler for the EC address space type unless it has been installed 1458 + * already. If @device is not NULL, also look for EC query methods in the 1459 + * namespace and register them, and install an event (either GPE or GPIO IRQ) 1460 + * handler for the EC, if possible. 1461 + * 1462 + * Return: 1463 + * -ENODEV if the address space handler cannot be installed, which means 1464 + * "unable to handle transactions", 1465 + * -EPROBE_DEFER if GPIO IRQ acquisition needs to be deferred, 1466 + * or 0 (success) otherwise. 1465 1467 */ 1466 - static int ec_install_handlers(struct acpi_ec *ec, struct acpi_device *device, 1467 - bool handle_events) 1468 + static int ec_install_handlers(struct acpi_ec *ec, struct acpi_device *device) 1468 1469 { 1469 1470 acpi_status status; 1470 1471 ··· 1465 1490 &acpi_ec_space_handler, 1466 1491 NULL, ec); 1467 1492 if (ACPI_FAILURE(status)) { 1468 - if (status == AE_NOT_FOUND) { 1469 - /* 1470 - * Maybe OS fails in evaluating the _REG 1471 - * object. The AE_NOT_FOUND error will be 1472 - * ignored and OS * continue to initialize 1473 - * EC. 1474 - */ 1475 - pr_err("Fail in evaluating the _REG object" 1476 - " of EC device. Broken bios is suspected.\n"); 1477 - } else { 1478 - acpi_ec_stop(ec, false); 1479 - return -ENODEV; 1480 - } 1493 + acpi_ec_stop(ec, false); 1494 + return -ENODEV; 1481 1495 } 1482 1496 set_bit(EC_FLAGS_EC_HANDLER_INSTALLED, &ec->flags); 1483 1497 } 1484 1498 1485 - if (!handle_events) 1499 + if (!device) 1486 1500 return 0; 1501 + 1502 + if (ec->gpe < 0) { 1503 + /* ACPI reduced hardware platforms use a GpioInt from _CRS. */ 1504 + int irq = acpi_dev_gpio_irq_get(device, 0); 1505 + /* 1506 + * Bail out right away for deferred probing or complete the 1507 + * initialization regardless of any other errors. 1508 + */ 1509 + if (irq == -EPROBE_DEFER) 1510 + return -EPROBE_DEFER; 1511 + else if (irq >= 0) 1512 + ec->irq = irq; 1513 + } 1487 1514 1488 1515 if (!test_bit(EC_FLAGS_QUERY_METHODS_INSTALLED, &ec->flags)) { 1489 1516 /* Find and register all query methods */ ··· 1495 1518 set_bit(EC_FLAGS_QUERY_METHODS_INSTALLED, &ec->flags); 1496 1519 } 1497 1520 if (!test_bit(EC_FLAGS_EVENT_HANDLER_INSTALLED, &ec->flags)) { 1498 - if (ec->gpe >= 0) { 1499 - install_gpe_event_handler(ec); 1500 - } else if (device) { 1501 - int ret = install_gpio_irq_event_handler(ec, device); 1521 + bool ready = false; 1502 1522 1503 - if (ret) 1504 - return ret; 1505 - } else { /* No GPE and no GpioInt? */ 1506 - return -ENODEV; 1523 + if (ec->gpe >= 0) 1524 + ready = install_gpe_event_handler(ec); 1525 + else if (ec->irq >= 0) 1526 + ready = install_gpio_irq_event_handler(ec); 1527 + 1528 + if (ready) { 1529 + set_bit(EC_FLAGS_EVENT_HANDLER_INSTALLED, &ec->flags); 1530 + acpi_ec_leave_noirq(ec); 1507 1531 } 1532 + /* 1533 + * Failures to install an event handler are not fatal, because 1534 + * the EC can be polled for events. 1535 + */ 1508 1536 } 1509 1537 /* EC is fully operational, allow queries */ 1510 1538 acpi_ec_enable_event(ec); ··· 1556 1574 } 1557 1575 } 1558 1576 1559 - static int acpi_ec_setup(struct acpi_ec *ec, struct acpi_device *device, 1560 - bool handle_events) 1577 + static int acpi_ec_setup(struct acpi_ec *ec, struct acpi_device *device) 1561 1578 { 1562 1579 int ret; 1563 1580 1564 - ret = ec_install_handlers(ec, device, handle_events); 1581 + ret = ec_install_handlers(ec, device); 1565 1582 if (ret) 1566 1583 return ret; 1567 1584 1568 1585 /* First EC capable of handling transactions */ 1569 - if (!first_ec) { 1586 + if (!first_ec) 1570 1587 first_ec = ec; 1571 - acpi_handle_info(first_ec->handle, "Used as first EC\n"); 1588 + 1589 + pr_info("EC_CMD/EC_SC=0x%lx, EC_DATA=0x%lx\n", ec->command_addr, 1590 + ec->data_addr); 1591 + 1592 + if (test_bit(EC_FLAGS_EVENT_HANDLER_INSTALLED, &ec->flags)) { 1593 + if (ec->gpe >= 0) 1594 + pr_info("GPE=0x%x\n", ec->gpe); 1595 + else 1596 + pr_info("IRQ=%d\n", ec->irq); 1572 1597 } 1573 1598 1574 - acpi_handle_info(ec->handle, 1575 - "GPE=0x%x, IRQ=%d, EC_CMD/EC_SC=0x%lx, EC_DATA=0x%lx\n", 1576 - ec->gpe, ec->irq, ec->command_addr, ec->data_addr); 1577 1599 return ret; 1578 - } 1579 - 1580 - static bool acpi_ec_ecdt_get_handle(acpi_handle *phandle) 1581 - { 1582 - struct acpi_table_ecdt *ecdt_ptr; 1583 - acpi_status status; 1584 - acpi_handle handle; 1585 - 1586 - status = acpi_get_table(ACPI_SIG_ECDT, 1, 1587 - (struct acpi_table_header **)&ecdt_ptr); 1588 - if (ACPI_FAILURE(status)) 1589 - return false; 1590 - 1591 - status = acpi_get_handle(NULL, ecdt_ptr->id, &handle); 1592 - if (ACPI_FAILURE(status)) 1593 - return false; 1594 - 1595 - *phandle = handle; 1596 - return true; 1597 1600 } 1598 1601 1599 1602 static int acpi_ec_add(struct acpi_device *device) 1600 1603 { 1601 - struct acpi_ec *ec = NULL; 1602 - bool dep_update = true; 1603 - acpi_status status; 1604 + struct acpi_ec *ec; 1604 1605 int ret; 1605 1606 1606 1607 strcpy(acpi_device_name(device), ACPI_EC_DEVICE_NAME); 1607 1608 strcpy(acpi_device_class(device), ACPI_EC_CLASS); 1608 1609 1609 - if (!strcmp(acpi_device_hid(device), ACPI_ECDT_HID)) { 1610 - boot_ec_is_ecdt = true; 1610 + if ((boot_ec && boot_ec->handle == device->handle) || 1611 + !strcmp(acpi_device_hid(device), ACPI_ECDT_HID)) { 1612 + /* Fast path: this device corresponds to the boot EC. */ 1611 1613 ec = boot_ec; 1612 - dep_update = false; 1613 1614 } else { 1615 + acpi_status status; 1616 + 1614 1617 ec = acpi_ec_alloc(); 1615 1618 if (!ec) 1616 1619 return -ENOMEM; ··· 1603 1636 status = ec_parse_device(device->handle, 0, ec, NULL); 1604 1637 if (status != AE_CTRL_TERMINATE) { 1605 1638 ret = -EINVAL; 1606 - goto err_alloc; 1639 + goto err; 1607 1640 } 1608 1641 1609 1642 if (boot_ec && ec->command_addr == boot_ec->command_addr && 1610 1643 ec->data_addr == boot_ec->data_addr) { 1611 - boot_ec_is_ecdt = false; 1612 1644 /* 1613 1645 * Trust PNP0C09 namespace location rather than 1614 1646 * ECDT ID. But trust ECDT GPE rather than _GPE ··· 1621 1655 } 1622 1656 } 1623 1657 1624 - ret = acpi_ec_setup(ec, device, true); 1658 + ret = acpi_ec_setup(ec, device); 1625 1659 if (ret) 1626 - goto err_query; 1660 + goto err; 1627 1661 1628 1662 if (ec == boot_ec) 1629 1663 acpi_handle_info(boot_ec->handle, 1630 - "Boot %s EC used to handle transactions and events\n", 1664 + "Boot %s EC initialization complete\n", 1631 1665 boot_ec_is_ecdt ? "ECDT" : "DSDT"); 1666 + 1667 + acpi_handle_info(ec->handle, 1668 + "EC: Used to handle transactions and events\n"); 1632 1669 1633 1670 device->driver_data = ec; 1634 1671 ··· 1640 1671 ret = !!request_region(ec->command_addr, 1, "EC cmd"); 1641 1672 WARN(!ret, "Could not request EC cmd io port 0x%lx", ec->command_addr); 1642 1673 1643 - if (dep_update) { 1644 - /* Reprobe devices depending on the EC */ 1645 - acpi_walk_dep_device_list(ec->handle); 1646 - } 1674 + /* Reprobe devices depending on the EC */ 1675 + acpi_walk_dep_device_list(ec->handle); 1676 + 1647 1677 acpi_handle_debug(ec->handle, "enumerated.\n"); 1648 1678 return 0; 1649 1679 1650 - err_query: 1651 - if (ec != boot_ec) 1652 - acpi_ec_remove_query_handlers(ec, true, 0); 1653 - err_alloc: 1680 + err: 1654 1681 if (ec != boot_ec) 1655 1682 acpi_ec_free(ec); 1683 + 1656 1684 return ret; 1657 1685 } 1658 1686 ··· 1741 1775 * At this point, the GPE is not fully initialized, so do not to 1742 1776 * handle the events. 1743 1777 */ 1744 - ret = acpi_ec_setup(ec, NULL, false); 1778 + ret = acpi_ec_setup(ec, NULL); 1745 1779 if (ret) { 1746 1780 acpi_ec_free(ec); 1747 1781 return; ··· 1754 1788 } 1755 1789 1756 1790 /* 1757 - * If the DSDT EC is not functioning, we still need to prepare a fully 1758 - * functioning ECDT EC first in order to handle the events. 1759 - * https://bugzilla.kernel.org/show_bug.cgi?id=115021 1791 + * acpi_ec_ecdt_start - Finalize the boot ECDT EC initialization. 1792 + * 1793 + * First, look for an ACPI handle for the boot ECDT EC if acpi_ec_add() has not 1794 + * found a matching object in the namespace. 1795 + * 1796 + * Next, in case the DSDT EC is not functioning, it is still necessary to 1797 + * provide a functional ECDT EC to handle events, so add an extra device object 1798 + * to represent it (see https://bugzilla.kernel.org/show_bug.cgi?id=115021). 1799 + * 1800 + * This is useful on platforms with valid ECDT and invalid DSDT EC settings, 1801 + * like ASUS X550ZE (see https://bugzilla.kernel.org/show_bug.cgi?id=196847). 1760 1802 */ 1761 - static int __init acpi_ec_ecdt_start(void) 1803 + static void __init acpi_ec_ecdt_start(void) 1762 1804 { 1805 + struct acpi_table_ecdt *ecdt_ptr; 1763 1806 acpi_handle handle; 1807 + acpi_status status; 1764 1808 1765 - if (!boot_ec) 1766 - return -ENODEV; 1767 - /* In case acpi_ec_ecdt_start() is called after acpi_ec_add() */ 1768 - if (!boot_ec_is_ecdt) 1769 - return -ENODEV; 1809 + /* Bail out if a matching EC has been found in the namespace. */ 1810 + if (!boot_ec || boot_ec->handle != ACPI_ROOT_OBJECT) 1811 + return; 1770 1812 1771 - /* 1772 - * At this point, the namespace and the GPE is initialized, so 1773 - * start to find the namespace objects and handle the events. 1774 - * 1775 - * Note: ec->handle can be valid if this function is called after 1776 - * acpi_ec_add(), hence the fast path. 1777 - */ 1778 - if (boot_ec->handle == ACPI_ROOT_OBJECT) { 1779 - if (!acpi_ec_ecdt_get_handle(&handle)) 1780 - return -ENODEV; 1781 - boot_ec->handle = handle; 1782 - } 1813 + /* Look up the object pointed to from the ECDT in the namespace. */ 1814 + status = acpi_get_table(ACPI_SIG_ECDT, 1, 1815 + (struct acpi_table_header **)&ecdt_ptr); 1816 + if (ACPI_FAILURE(status)) 1817 + return; 1783 1818 1784 - /* Register to ACPI bus with PM ops attached */ 1785 - return acpi_bus_register_early_device(ACPI_BUS_TYPE_ECDT_EC); 1819 + status = acpi_get_handle(NULL, ecdt_ptr->id, &handle); 1820 + if (ACPI_FAILURE(status)) 1821 + return; 1822 + 1823 + boot_ec->handle = handle; 1824 + 1825 + /* Add a special ACPI device object to represent the boot EC. */ 1826 + acpi_bus_register_early_device(ACPI_BUS_TYPE_ECDT_EC); 1786 1827 } 1787 - 1788 - #if 0 1789 - /* 1790 - * Some EC firmware variations refuses to respond QR_EC when SCI_EVT is not 1791 - * set, for which case, we complete the QR_EC without issuing it to the 1792 - * firmware. 1793 - * https://bugzilla.kernel.org/show_bug.cgi?id=82611 1794 - * https://bugzilla.kernel.org/show_bug.cgi?id=97381 1795 - */ 1796 - static int ec_flag_query_handshake(const struct dmi_system_id *id) 1797 - { 1798 - pr_debug("Detected the EC firmware requiring QR_EC issued when SCI_EVT set\n"); 1799 - EC_FLAGS_QUERY_HANDSHAKE = 1; 1800 - return 0; 1801 - } 1802 - #endif 1803 1828 1804 1829 /* 1805 1830 * On some hardware it is necessary to clear events accumulated by the EC during ··· 1919 1962 * At this point, the namespace is not initialized, so do not find 1920 1963 * the namespace objects, or handle the events. 1921 1964 */ 1922 - ret = acpi_ec_setup(ec, NULL, false); 1965 + ret = acpi_ec_setup(ec, NULL); 1923 1966 if (ret) { 1924 1967 acpi_ec_free(ec); 1925 1968 return; ··· 2122 2165 { }, 2123 2166 }; 2124 2167 2125 - int __init acpi_ec_init(void) 2168 + void __init acpi_ec_init(void) 2126 2169 { 2127 2170 int result; 2128 - int ecdt_fail, dsdt_fail; 2129 2171 2130 2172 result = acpi_ec_init_workqueues(); 2131 2173 if (result) 2132 - return result; 2174 + return; 2133 2175 2134 2176 /* 2135 2177 * Disable EC wakeup on following systems to prevent periodic ··· 2139 2183 pr_debug("Disabling EC wakeup on suspend-to-idle\n"); 2140 2184 } 2141 2185 2142 - /* Drivers must be started after acpi_ec_query_init() */ 2143 - dsdt_fail = acpi_bus_register_driver(&acpi_ec_driver); 2144 - /* 2145 - * Register ECDT to ACPI bus only when PNP0C09 probe fails. This is 2146 - * useful for platforms (confirmed on ASUS X550ZE) with valid ECDT 2147 - * settings but invalid DSDT settings. 2148 - * https://bugzilla.kernel.org/show_bug.cgi?id=196847 2149 - */ 2150 - ecdt_fail = acpi_ec_ecdt_start(); 2151 - return ecdt_fail && dsdt_fail ? -ENODEV : 0; 2186 + /* Driver must be registered after acpi_ec_init_workqueues(). */ 2187 + acpi_bus_register_driver(&acpi_ec_driver); 2188 + 2189 + acpi_ec_ecdt_start(); 2152 2190 } 2153 2191 2154 2192 /* EC driver currently not unloadable */
+10 -10
drivers/acpi/fan.c
··· 276 276 int count; 277 277 278 278 if (fps->control == 0xFFFFFFFF || fps->control > 100) 279 - count = snprintf(buf, PAGE_SIZE, "not-defined:"); 279 + count = scnprintf(buf, PAGE_SIZE, "not-defined:"); 280 280 else 281 - count = snprintf(buf, PAGE_SIZE, "%lld:", fps->control); 281 + count = scnprintf(buf, PAGE_SIZE, "%lld:", fps->control); 282 282 283 283 if (fps->trip_point == 0xFFFFFFFF || fps->trip_point > 9) 284 - count += snprintf(&buf[count], PAGE_SIZE, "not-defined:"); 284 + count += scnprintf(&buf[count], PAGE_SIZE - count, "not-defined:"); 285 285 else 286 - count += snprintf(&buf[count], PAGE_SIZE, "%lld:", fps->trip_point); 286 + count += scnprintf(&buf[count], PAGE_SIZE - count, "%lld:", fps->trip_point); 287 287 288 288 if (fps->speed == 0xFFFFFFFF) 289 - count += snprintf(&buf[count], PAGE_SIZE, "not-defined:"); 289 + count += scnprintf(&buf[count], PAGE_SIZE - count, "not-defined:"); 290 290 else 291 - count += snprintf(&buf[count], PAGE_SIZE, "%lld:", fps->speed); 291 + count += scnprintf(&buf[count], PAGE_SIZE - count, "%lld:", fps->speed); 292 292 293 293 if (fps->noise_level == 0xFFFFFFFF) 294 - count += snprintf(&buf[count], PAGE_SIZE, "not-defined:"); 294 + count += scnprintf(&buf[count], PAGE_SIZE - count, "not-defined:"); 295 295 else 296 - count += snprintf(&buf[count], PAGE_SIZE, "%lld:", fps->noise_level * 100); 296 + count += scnprintf(&buf[count], PAGE_SIZE - count, "%lld:", fps->noise_level * 100); 297 297 298 298 if (fps->power == 0xFFFFFFFF) 299 - count += snprintf(&buf[count], PAGE_SIZE, "not-defined\n"); 299 + count += scnprintf(&buf[count], PAGE_SIZE - count, "not-defined\n"); 300 300 else 301 - count += snprintf(&buf[count], PAGE_SIZE, "%lld\n", fps->power); 301 + count += scnprintf(&buf[count], PAGE_SIZE - count, "%lld\n", fps->power); 302 302 303 303 return count; 304 304 }
+1 -1
drivers/acpi/internal.h
··· 190 190 /* External interfaces use first EC only, so remember */ 191 191 typedef int (*acpi_ec_query_func) (void *data); 192 192 193 - int acpi_ec_init(void); 193 + void acpi_ec_init(void); 194 194 void acpi_ec_ecdt_probe(void); 195 195 void acpi_ec_dsdt_probe(void); 196 196 void acpi_ec_block_transactions(void);
+2
drivers/acpi/osl.c
··· 1598 1598 */ 1599 1599 1600 1600 acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock lockp) 1601 + __acquires(lockp) 1601 1602 { 1602 1603 acpi_cpu_flags flags; 1603 1604 spin_lock_irqsave(lockp, flags); ··· 1610 1609 */ 1611 1610 1612 1611 void acpi_os_release_lock(acpi_spinlock lockp, acpi_cpu_flags flags) 1612 + __releases(lockp) 1613 1613 { 1614 1614 spin_unlock_irqrestore(lockp, flags); 1615 1615 }
+1 -1
drivers/acpi/pci_root.c
··· 153 153 buf[0] = '\0'; 154 154 for (i = 0, entry = table; i < size; i++, entry++) 155 155 if (word & entry->bit) 156 - len += snprintf(buf + len, sizeof(buf) - len, "%s%s", 156 + len += scnprintf(buf + len, sizeof(buf) - len, "%s%s", 157 157 len ? " " : "", entry->desc); 158 158 159 159 dev_info(&root->device->dev, "_OSC: %s [%s]\n", msg, buf);
+6 -8
drivers/acpi/proc.c
··· 22 22 static int 23 23 acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset) 24 24 { 25 - struct list_head *node, *next; 25 + struct acpi_device *dev, *tmp; 26 26 27 27 seq_printf(seq, "Device\tS-state\t Status Sysfs node\n"); 28 28 29 29 mutex_lock(&acpi_device_lock); 30 - list_for_each_safe(node, next, &acpi_wakeup_device_list) { 31 - struct acpi_device *dev = 32 - container_of(node, struct acpi_device, wakeup_list); 30 + list_for_each_entry_safe(dev, tmp, &acpi_wakeup_device_list, 31 + wakeup_list) { 33 32 struct acpi_device_physical_node *entry; 34 33 35 34 if (!dev->wakeup.flags.valid) ··· 95 96 const char __user * buffer, 96 97 size_t count, loff_t * ppos) 97 98 { 98 - struct list_head *node, *next; 99 + struct acpi_device *dev, *tmp; 99 100 char strbuf[5]; 100 101 char str[5] = ""; 101 102 ··· 108 109 sscanf(strbuf, "%s", str); 109 110 110 111 mutex_lock(&acpi_device_lock); 111 - list_for_each_safe(node, next, &acpi_wakeup_device_list) { 112 - struct acpi_device *dev = 113 - container_of(node, struct acpi_device, wakeup_list); 112 + list_for_each_entry_safe(dev, tmp, &acpi_wakeup_device_list, 113 + wakeup_list) { 114 114 if (!dev->wakeup.flags.valid) 115 115 continue; 116 116
+46
drivers/acpi/tiny-power-button.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-or-later 2 + #include <linux/module.h> 3 + #include <linux/sched/signal.h> 4 + #include <linux/acpi.h> 5 + #include <acpi/button.h> 6 + 7 + ACPI_MODULE_NAME("tiny-power-button"); 8 + MODULE_AUTHOR("Josh Triplett"); 9 + MODULE_DESCRIPTION("ACPI Tiny Power Button Driver"); 10 + MODULE_LICENSE("GPL"); 11 + 12 + static int power_signal __read_mostly = CONFIG_ACPI_TINY_POWER_BUTTON_SIGNAL; 13 + module_param(power_signal, int, 0644); 14 + MODULE_PARM_DESC(power_signal, "Power button sends this signal to init"); 15 + 16 + static const struct acpi_device_id tiny_power_button_device_ids[] = { 17 + { ACPI_BUTTON_HID_POWER, 0 }, 18 + { ACPI_BUTTON_HID_POWERF, 0 }, 19 + { "", 0 }, 20 + }; 21 + MODULE_DEVICE_TABLE(acpi, tiny_power_button_device_ids); 22 + 23 + static int acpi_noop_add_remove(struct acpi_device *device) 24 + { 25 + return 0; 26 + } 27 + 28 + static void acpi_tiny_power_button_notify(struct acpi_device *device, u32 event) 29 + { 30 + kill_cad_pid(power_signal, 1); 31 + } 32 + 33 + static struct acpi_driver acpi_tiny_power_button_driver = { 34 + .name = "tiny-power-button", 35 + .class = "tiny-power-button", 36 + .ids = tiny_power_button_device_ids, 37 + .ops = { 38 + .add = acpi_noop_add_remove, 39 + .remove = acpi_noop_add_remove, 40 + .notify = acpi_tiny_power_button_notify, 41 + }, 42 + }; 43 + 44 + module_driver(acpi_tiny_power_button_driver, 45 + acpi_bus_register_driver, 46 + acpi_bus_unregister_driver);
+9 -15
drivers/acpi/wakeup.c
··· 30 30 */ 31 31 void acpi_enable_wakeup_devices(u8 sleep_state) 32 32 { 33 - struct list_head *node, *next; 33 + struct acpi_device *dev, *tmp; 34 34 35 - list_for_each_safe(node, next, &acpi_wakeup_device_list) { 36 - struct acpi_device *dev = 37 - container_of(node, struct acpi_device, wakeup_list); 38 - 35 + list_for_each_entry_safe(dev, tmp, &acpi_wakeup_device_list, 36 + wakeup_list) { 39 37 if (!dev->wakeup.flags.valid 40 38 || sleep_state > (u32) dev->wakeup.sleep_state 41 39 || !(device_may_wakeup(&dev->dev) ··· 55 57 */ 56 58 void acpi_disable_wakeup_devices(u8 sleep_state) 57 59 { 58 - struct list_head *node, *next; 60 + struct acpi_device *dev, *tmp; 59 61 60 - list_for_each_safe(node, next, &acpi_wakeup_device_list) { 61 - struct acpi_device *dev = 62 - container_of(node, struct acpi_device, wakeup_list); 63 - 62 + list_for_each_entry_safe(dev, tmp, &acpi_wakeup_device_list, 63 + wakeup_list) { 64 64 if (!dev->wakeup.flags.valid 65 65 || sleep_state > (u32) dev->wakeup.sleep_state 66 66 || !(device_may_wakeup(&dev->dev) ··· 75 79 76 80 int __init acpi_wakeup_device_init(void) 77 81 { 78 - struct list_head *node, *next; 82 + struct acpi_device *dev, *tmp; 79 83 80 84 mutex_lock(&acpi_device_lock); 81 - list_for_each_safe(node, next, &acpi_wakeup_device_list) { 82 - struct acpi_device *dev = container_of(node, 83 - struct acpi_device, 84 - wakeup_list); 85 + list_for_each_entry_safe(dev, tmp, &acpi_wakeup_device_list, 86 + wakeup_list) { 85 87 if (device_can_wakeup(&dev->dev)) { 86 88 /* Button GPEs are supposed to be always enabled. */ 87 89 acpi_enable_gpe(dev->wakeup.gpe_device,
+1 -1
include/acpi/acpixf.h
··· 12 12 13 13 /* Current ACPICA subsystem version in YYYYMMDD format */ 14 14 15 - #define ACPI_CA_VERSION 0x20200110 15 + #define ACPI_CA_VERSION 0x20200214 16 16 17 17 #include <acpi/acconfig.h> 18 18 #include <acpi/actypes.h>
+1 -1
include/acpi/actbl1.h
··· 862 862 /* Command status return values */ 863 863 864 864 enum acpi_erst_command_status { 865 - ACPI_ERST_SUCESS = 0, 865 + ACPI_ERST_SUCCESS = 0, 866 866 ACPI_ERST_NO_SPACE = 1, 867 867 ACPI_ERST_NOT_AVAILABLE = 2, 868 868 ACPI_ERST_FAILURE = 3,
+4
include/acpi/button.h
··· 2 2 #ifndef ACPI_BUTTON_H 3 3 #define ACPI_BUTTON_H 4 4 5 + #define ACPI_BUTTON_HID_POWER "PNP0C0C" 6 + #define ACPI_BUTTON_HID_LID "PNP0C0D" 7 + #define ACPI_BUTTON_HID_SLEEP "PNP0C0E" 8 + 5 9 #if IS_ENABLED(CONFIG_ACPI_BUTTON) 6 10 extern int acpi_lid_open(void); 7 11 #else