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

Pull more ACPI support updates from Rafael J. Wysocki:
"These are mostly fixes and cleanups on top of the ACPI support updates
merged recently, including two new quirks, an ACPI CPPC library fix,
and fixes and cleanups of a few core ACPI device drivers:

- Add an unused power resource handling quirk for THUNDEROBOT ZERO
(Zhai Can)

- Fix remaining for_each_possible_cpu() in the ACPI CPPC library to
use online CPUs (Sean V Kelley)

- Drop redundant checks from the ACPI notify handler and the driver
remove callback in the ACPI battery driver (Rafael Wysocki)

- Move the creation of the wakeup source during the ACPI button
driver probe to an earlier point to avoid missing a wakeup event
due to a race and clean up system wakeup handling and remove
callback in that driver (Rafael Wysocki)

- Drop unnecessary driver_data pointer clearing from the ACPI EC and
SMBUS HC drivers and make the ACPI backlight (video) driver clear
the device's driver_data pointer on remove (Rafael Wysocki)

- Force enabling of PWM2 on the Yogabook YB1-X90 tablets (Yauhen
Kharuzhy)"

* tag 'acpi-7.0-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPI: PM: Add unused power resource quirk for THUNDEROBOT ZERO
ACPI: driver: Drop driver_data pointer clearing from two drivers
ACPI: video: Clear driver_data pointer on remove
ACPI: button: Tweak acpi_button_remove()
ACPI: button: Tweak system wakeup handling
ACPI: battery: Drop redundant checks from acpi_battery_remove()
ACPI: CPPC: Fix remaining for_each_possible_cpu() to use online CPUs
ACPI: x86: Force enabling of PWM2 on the Yogabook YB1-X90
ACPI: button: Call device_init_wakeup() earlier during probe
ACPI: battery: Drop redundant check from acpi_battery_notify()

+41 -22
+1
drivers/acpi/acpi_video.c
··· 2116 2116 2117 2117 kfree(video->attached_array); 2118 2118 kfree(video); 2119 + device->driver_data = NULL; 2119 2120 } 2120 2121 2121 2122 static int __init is_i740(struct pci_dev *dev)
+1 -8
drivers/acpi/battery.c
··· 1066 1066 struct acpi_device *device = battery->device; 1067 1067 struct power_supply *old; 1068 1068 1069 - if (!battery) 1070 - return; 1071 - 1072 1069 guard(mutex)(&battery->update_lock); 1073 1070 1074 1071 old = battery->bat; ··· 1271 1274 1272 1275 static void acpi_battery_remove(struct platform_device *pdev) 1273 1276 { 1274 - struct acpi_device *device = ACPI_COMPANION(&pdev->dev); 1275 1277 struct acpi_battery *battery = platform_get_drvdata(pdev); 1276 1278 1277 - if (!device || !battery) 1278 - return; 1279 - 1280 - acpi_dev_remove_notify_handler(device, ACPI_ALL_NOTIFY, 1279 + acpi_dev_remove_notify_handler(battery->device, ACPI_ALL_NOTIFY, 1281 1280 acpi_battery_notify); 1282 1281 1283 1282 device_init_wakeup(&pdev->dev, false);
+12 -8
drivers/acpi/button.c
··· 170 170 171 171 struct acpi_button { 172 172 struct acpi_device *adev; 173 - struct platform_device *pdev; 173 + struct device *dev; /* physical button device */ 174 174 unsigned int type; 175 175 struct input_dev *input; 176 176 char phys[32]; /* for input device */ ··· 398 398 return state; 399 399 400 400 if (state && signal_wakeup) 401 - acpi_pm_wakeup_event(&button->pdev->dev); 401 + acpi_pm_wakeup_event(button->dev); 402 402 403 403 return acpi_lid_notify_state(button, state); 404 404 } ··· 455 455 return; 456 456 } 457 457 458 - acpi_pm_wakeup_event(&button->pdev->dev); 458 + acpi_pm_wakeup_event(button->dev); 459 459 460 460 if (button->suspended || event == ACPI_BUTTON_NOTIFY_WAKE) 461 461 return; ··· 550 550 551 551 platform_set_drvdata(pdev, button); 552 552 553 - button->pdev = pdev; 553 + button->dev = &pdev->dev; 554 554 button->adev = device; 555 555 button->input = input = input_allocate_device(); 556 556 if (!input) { ··· 625 625 goto err_remove_fs; 626 626 } 627 627 628 + device_init_wakeup(button->dev, true); 629 + 628 630 switch (device->device_type) { 629 631 case ACPI_BUS_TYPE_POWER_BUTTON: 630 632 status = acpi_install_fixed_event_handler(ACPI_EVENT_POWER_BUTTON, ··· 657 655 lid_device = device; 658 656 } 659 657 660 - device_init_wakeup(&pdev->dev, true); 661 658 pr_info("%s [%s]\n", name, acpi_device_bid(device)); 662 659 return 0; 663 660 664 661 err_input_unregister: 662 + device_init_wakeup(button->dev, false); 665 663 input_unregister_device(input); 666 664 err_remove_fs: 667 665 acpi_button_remove_fs(button); ··· 672 670 673 671 static void acpi_button_remove(struct platform_device *pdev) 674 672 { 675 - struct acpi_device *device = ACPI_COMPANION(&pdev->dev); 676 673 struct acpi_button *button = platform_get_drvdata(pdev); 674 + struct acpi_device *adev = button->adev; 677 675 678 - switch (device->device_type) { 676 + switch (adev->device_type) { 679 677 case ACPI_BUS_TYPE_POWER_BUTTON: 680 678 acpi_remove_fixed_event_handler(ACPI_EVENT_POWER_BUTTON, 681 679 acpi_button_event); ··· 685 683 acpi_button_event); 686 684 break; 687 685 default: 688 - acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY, 686 + acpi_remove_notify_handler(adev->handle, ACPI_DEVICE_NOTIFY, 689 687 button->type == ACPI_BUTTON_TYPE_LID ? 690 688 acpi_lid_notify : 691 689 acpi_button_notify); 692 690 break; 693 691 } 694 692 acpi_os_wait_events_complete(); 693 + 694 + device_init_wakeup(button->dev, false); 695 695 696 696 acpi_button_remove_fs(button); 697 697 input_unregister_device(button->input);
+2 -2
drivers/acpi/cppc_acpi.c
··· 362 362 end: 363 363 if (cmd == CMD_WRITE) { 364 364 if (unlikely(ret)) { 365 - for_each_possible_cpu(i) { 365 + for_each_online_cpu(i) { 366 366 struct cpc_desc *desc = per_cpu(cpc_desc_ptr, i); 367 367 368 368 if (!desc) ··· 524 524 else if (pdomain->coord_type == DOMAIN_COORD_TYPE_SW_ANY) 525 525 cpu_data->shared_type = CPUFREQ_SHARED_TYPE_ANY; 526 526 527 - for_each_possible_cpu(i) { 527 + for_each_online_cpu(i) { 528 528 if (i == cpu) 529 529 continue; 530 530
-2
drivers/acpi/ec.c
··· 1754 1754 1755 1755 static void acpi_ec_remove(struct platform_device *pdev) 1756 1756 { 1757 - struct acpi_device *device = ACPI_COMPANION(&pdev->dev); 1758 1757 struct acpi_ec *ec = platform_get_drvdata(pdev); 1759 1758 1760 1759 release_region(ec->data_addr, 1); 1761 1760 release_region(ec->command_addr, 1); 1762 - device->driver_data = NULL; 1763 1761 if (ec != boot_ec) { 1764 1762 ec_remove_handlers(ec); 1765 1763 acpi_ec_free(ec);
+13
drivers/acpi/power.c
··· 1113 1113 DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE Click Mini L9W-B"), 1114 1114 }, 1115 1115 }, 1116 + { 1117 + /* 1118 + * THUNDEROBOT ZERO laptop: Due to its SSDT table bug, power 1119 + * resource 'PXP' will be shut down on initialization, making 1120 + * the NVMe #2 and the NVIDIA dGPU both unavailable (they're 1121 + * both controlled by 'PXP'). 1122 + */ 1123 + .matches = { 1124 + DMI_MATCH(DMI_SYS_VENDOR, "THUNDEROBOT"), 1125 + DMI_MATCH(DMI_PRODUCT_NAME, "ZERO"), 1126 + } 1127 + 1128 + }, 1116 1129 {} 1117 1130 }; 1118 1131
-2
drivers/acpi/sbshc.c
··· 275 275 276 276 static void acpi_smbus_hc_remove(struct platform_device *pdev) 277 277 { 278 - struct acpi_device *device = ACPI_COMPANION(&pdev->dev); 279 278 struct acpi_smb_hc *hc = platform_get_drvdata(pdev); 280 279 281 280 acpi_ec_remove_query_handler(hc->ec, hc->query_bit); 282 281 acpi_os_wait_events_complete(); 283 282 kfree(hc); 284 - device->driver_data = NULL; 285 283 } 286 284 287 285 module_platform_driver(acpi_smb_hc_driver);
+12
drivers/acpi/x86/utils.c
··· 82 82 }), 83 83 84 84 /* 85 + * Lenovo Yoga Book uses PWM2 for touch keyboard backlight control. 86 + * It needs to be enabled only for the Android device version (YB1-X90* 87 + * aka YETI-11); the Windows version (YB1-X91*) uses ACPI control 88 + * methods. 89 + */ 90 + PRESENT_ENTRY_HID("80862289", "2", INTEL_ATOM_AIRMONT, { 91 + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Intel Corporation"), 92 + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"), 93 + DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "YETI-11"), 94 + }), 95 + 96 + /* 85 97 * The INT0002 device is necessary to clear wakeup interrupt sources 86 98 * on Cherry Trail devices, without it we get nobody cared IRQ msgs. 87 99 */