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-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fixes from Rafael Wysocki:
"These add some new quirks, fix PPTT handling, fix an ACPI utility and
correct a mistake in the ACPI documentation.

Specifics:

- Fix ACPI PPTT handling to avoid sleep in the atomic context when it
is not present (Sudeep Holla)

- Add 'backlight=native' DMI quirk for Dell Vostro 15 3535 to the
ACPI video driver (Chia-Lin Kao)

- Add ACPI quirks for I2C device enumeration on Lenovo Yoga Book X90
and Acer Iconia One 7 B1-750 (Hans de Goede)

- Fix handling of invalid command line option values in the ACPI
pfrut utility (Chen Yu)

- Fix references to I2C device data type in the ACPI documentation
for device enumeration (Andy Shevchenko)"

* tag 'acpi-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPI: tools: pfrut: Check if the input of level and type is in the right numeric range
ACPI: PPTT: Fix to avoid sleep in the atomic context when PPTT is absent
ACPI: x86: Add skip i2c clients quirk for Lenovo Yoga Book X90
ACPI: x86: Add skip i2c clients quirk for Acer Iconia One 7 B1-750
ACPI: x86: Introduce an acpi_quirk_skip_gpio_event_handlers() helper
ACPI: video: Add backlight=native DMI quirk for Dell Vostro 15 3535
ACPI: docs: enumeration: Correct reference to the I²C device data type

+77 -8
+1 -1
Documentation/firmware-guide/acpi/enumeration.rst
··· 19 19 platform devices. 20 20 21 21 - Devices behind real busses where there is a connector resource 22 - are represented as struct spi_device or struct i2c_device. Note 22 + are represented as struct spi_device or struct i2c_client. Note 23 23 that standard UARTs are not busses so there is no struct uart_device, 24 24 although some of them may be represented by struct serdev_device. 25 25
+4 -1
drivers/acpi/pptt.c
··· 536 536 static struct acpi_table_header *acpi_get_pptt(void) 537 537 { 538 538 static struct acpi_table_header *pptt; 539 + static bool is_pptt_checked; 539 540 acpi_status status; 540 541 541 542 /* 542 543 * PPTT will be used at runtime on every CPU hotplug in path, so we 543 544 * don't need to call acpi_put_table() to release the table mapping. 544 545 */ 545 - if (!pptt) { 546 + if (!pptt && !is_pptt_checked) { 546 547 status = acpi_get_table(ACPI_SIG_PPTT, 0, &pptt); 547 548 if (ACPI_FAILURE(status)) 548 549 acpi_pptt_warn_missing(); 550 + 551 + is_pptt_checked = true; 549 552 } 550 553 551 554 return pptt;
+7
drivers/acpi/video_detect.c
··· 716 716 DMI_MATCH(DMI_PRODUCT_NAME, "Dell G15 5515"), 717 717 }, 718 718 }, 719 + { 720 + .callback = video_detect_force_native, 721 + .matches = { 722 + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), 723 + DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 15 3535"), 724 + }, 725 + }, 719 726 720 727 /* 721 728 * Desktops which falsely report a backlight and which our heuristics
+42 -3
drivers/acpi/x86/utils.c
··· 251 251 #define ACPI_QUIRK_UART1_TTY_UART2_SKIP BIT(1) 252 252 #define ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY BIT(2) 253 253 #define ACPI_QUIRK_USE_ACPI_AC_AND_BATTERY BIT(3) 254 + #define ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS BIT(4) 254 255 255 256 static const struct dmi_system_id acpi_quirk_skip_dmi_ids[] = { 256 257 /* ··· 281 280 */ 282 281 #if IS_ENABLED(CONFIG_X86_ANDROID_TABLETS) 283 282 { 283 + /* Acer Iconia One 7 B1-750 */ 284 + .matches = { 285 + DMI_MATCH(DMI_SYS_VENDOR, "Insyde"), 286 + DMI_MATCH(DMI_PRODUCT_NAME, "VESPA2"), 287 + }, 288 + .driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS | 289 + ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY | 290 + ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS), 291 + }, 292 + { 284 293 .matches = { 285 294 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), 286 295 DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "ME176C"), 287 296 }, 288 297 .driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS | 289 298 ACPI_QUIRK_UART1_TTY_UART2_SKIP | 290 - ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY), 299 + ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY | 300 + ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS), 301 + }, 302 + { 303 + /* Lenovo Yoga Book X90F/L */ 304 + .matches = { 305 + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Intel Corporation"), 306 + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"), 307 + DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "YETI-11"), 308 + }, 309 + .driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS | 310 + ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY | 311 + ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS), 291 312 }, 292 313 { 293 314 .matches = { ··· 317 294 DMI_MATCH(DMI_PRODUCT_NAME, "TF103C"), 318 295 }, 319 296 .driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS | 320 - ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY), 297 + ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY | 298 + ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS), 321 299 }, 322 300 { 323 301 /* Lenovo Yoga Tablet 2 1050F/L */ ··· 360 336 DMI_MATCH(DMI_PRODUCT_NAME, "M890BAP"), 361 337 }, 362 338 .driver_data = (void *)(ACPI_QUIRK_SKIP_I2C_CLIENTS | 363 - ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY), 339 + ACPI_QUIRK_SKIP_ACPI_AC_AND_BATTERY | 340 + ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS), 364 341 }, 365 342 { 366 343 /* Whitelabel (sold as various brands) TM800A550L */ ··· 438 413 return 0; 439 414 } 440 415 EXPORT_SYMBOL_GPL(acpi_quirk_skip_serdev_enumeration); 416 + 417 + bool acpi_quirk_skip_gpio_event_handlers(void) 418 + { 419 + const struct dmi_system_id *dmi_id; 420 + long quirks; 421 + 422 + dmi_id = dmi_first_match(acpi_quirk_skip_dmi_ids); 423 + if (!dmi_id) 424 + return false; 425 + 426 + quirks = (unsigned long)dmi_id->driver_data; 427 + return (quirks & ACPI_QUIRK_SKIP_GPIO_EVENT_HANDLERS); 428 + } 429 + EXPORT_SYMBOL_GPL(acpi_quirk_skip_gpio_event_handlers); 441 430 #endif 442 431 443 432 /* Lists of PMIC ACPI HIDs with an (often better) native charger driver */
+3
drivers/gpio/gpiolib-acpi.c
··· 536 536 if (ACPI_FAILURE(status)) 537 537 return; 538 538 539 + if (acpi_quirk_skip_gpio_event_handlers()) 540 + return; 541 + 539 542 acpi_walk_resources(handle, METHOD_NAME__AEI, 540 543 acpi_gpiochip_alloc_event, acpi_gpio); 541 544
+5
include/acpi/acpi_bus.h
··· 657 657 #if IS_ENABLED(CONFIG_X86_ANDROID_TABLETS) 658 658 bool acpi_quirk_skip_i2c_client_enumeration(struct acpi_device *adev); 659 659 int acpi_quirk_skip_serdev_enumeration(struct device *controller_parent, bool *skip); 660 + bool acpi_quirk_skip_gpio_event_handlers(void); 660 661 #else 661 662 static inline bool acpi_quirk_skip_i2c_client_enumeration(struct acpi_device *adev) 662 663 { ··· 668 667 { 669 668 *skip = false; 670 669 return 0; 670 + } 671 + static inline bool acpi_quirk_skip_gpio_event_handlers(void) 672 + { 673 + return false; 671 674 } 672 675 #endif 673 676
+15 -3
tools/power/acpi/tools/pfrut/pfrut.c
··· 97 97 static void parse_options(int argc, char **argv) 98 98 { 99 99 int option_index = 0; 100 - char *pathname; 100 + char *pathname, *endptr; 101 101 int opt; 102 102 103 103 pathname = strdup(argv[0]); ··· 125 125 log_getinfo = 1; 126 126 break; 127 127 case 'T': 128 - log_type = atoi(optarg); 128 + log_type = strtol(optarg, &endptr, 0); 129 + if (*endptr || (log_type != 0 && log_type != 1)) { 130 + printf("Number expected: type(0:execution, 1:history) - Quit.\n"); 131 + exit(1); 132 + } 133 + 129 134 set_log_type = 1; 130 135 break; 131 136 case 'L': 132 - log_level = atoi(optarg); 137 + log_level = strtol(optarg, &endptr, 0); 138 + if (*endptr || 139 + (log_level != 0 && log_level != 1 && 140 + log_level != 2 && log_level != 4)) { 141 + printf("Number expected: level(0, 1, 2, 4) - Quit.\n"); 142 + exit(1); 143 + } 144 + 133 145 set_log_level = 1; 134 146 break; 135 147 case 'R':