Skip to content

Commit 9b04d99

Browse files
jwrdegoederafaeljw
authored andcommitted
ACPI: PM: Do not turn of unused power resources on the Toshiba Click Mini
The CPR3 power resource on the Toshiba Click Mini toggles a GPIO which is called SISP (for SIS touchscreen power?) on/off. This CPR3 power resource is not listed in any _PR? lists, let alone in a _PR0 list for the SIS0817 touchscreen ACPI device which needs it. Before commit a1224f3 ("ACPI: PM: Check states of power resources during initialization") this was not an issue because since nothing referenced the CPR3 power resource its state was always ACPI_POWER_RESOURCE_STATE_UNKNOWN and power resources with this state get ignored by acpi_turn_off_unused_power_resources(). This clearly is a bug in the DSDT of this device. Add a DMI quirk to make acpi_turn_off_unused_power_resources() a no-op on this model to fix the touchscreen no longer working since kernel 5.16 . This quirk also causes 2 other power resources to not get turned off, but the _OFF method on these already was a no-op, so this makes no difference for the other 2 power resources. Fixes: a1224f3 ("ACPI: PM: Check states of power resources during initialization") Reported-by: Gé Koerkamp <ge.koerkamp@gmail.com> Link: https://bugzilla.kernel.org/show_bug.cgi?id=216946 Link: https://lore.kernel.org/regressions/32a14a8a-9795-4c8c-7e00-da9012f548f8@leemhuis.info/ Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 793582f commit 9b04d99

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

drivers/acpi/power.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#define pr_fmt(fmt) "ACPI: PM: " fmt
2525

26+
#include <linux/dmi.h>
2627
#include <linux/kernel.h>
2728
#include <linux/module.h>
2829
#include <linux/init.h>
@@ -1022,13 +1023,31 @@ void acpi_resume_power_resources(void)
10221023
}
10231024
#endif
10241025

1026+
static const struct dmi_system_id dmi_leave_unused_power_resources_on[] = {
1027+
{
1028+
/*
1029+
* The Toshiba Click Mini has a CPR3 power-resource which must
1030+
* be on for the touchscreen to work, but which is not in any
1031+
* _PR? lists. The other 2 affected power-resources are no-ops.
1032+
*/
1033+
.matches = {
1034+
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
1035+
DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE Click Mini L9W-B"),
1036+
},
1037+
},
1038+
{}
1039+
};
1040+
10251041
/**
10261042
* acpi_turn_off_unused_power_resources - Turn off power resources not in use.
10271043
*/
10281044
void acpi_turn_off_unused_power_resources(void)
10291045
{
10301046
struct acpi_power_resource *resource;
10311047

1048+
if (dmi_check_system(dmi_leave_unused_power_resources_on))
1049+
return;
1050+
10321051
mutex_lock(&power_resource_list_lock);
10331052

10341053
list_for_each_entry_reverse(resource, &acpi_power_resource_list, list_node) {

0 commit comments

Comments
 (0)