diff mbox series

acpi: button: remove check fixed hardware & control method power buttons

Message ID 20230426080103.32144-1-ivan.hu@canonical.com
State Accepted
Headers show
Series acpi: button: remove check fixed hardware & control method power buttons | expand

Commit Message

Ivan Hu April 26, 2023, 8:01 a.m. UTC
Buglink: https://bugs.launchpad.net/fwts/+bug/2017737

In ACPI spec:

A zero indicates the power button is handled as a fixed feature programming
model; a one indicates the power button is handled as a control method device.
If the system does not have a power button, this value would be “1” and no
power button device would be present. Independent of the value of this field,
the presence of a power button device in the namespace indicates to OSPM that
the power button is handled as a control method device.

There is no linkage that having a PNP0C0C device and that being zero is a
problem.

Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
---
 src/acpi/devices/buttons/power_button.c | 27 -------------------------
 1 file changed, 27 deletions(-)
diff mbox series

Patch

diff --git a/src/acpi/devices/buttons/power_button.c b/src/acpi/devices/buttons/power_button.c
index 2d4bce74..a26ea2e0 100644
--- a/src/acpi/devices/buttons/power_button.c
+++ b/src/acpi/devices/buttons/power_button.c
@@ -138,31 +138,6 @@  static int method_test_UID(fwts_framework *fw)
 	return fwts_method_test_UID(fw, &device);
 }
 
-static int facp_test_pwrbutton(fwts_framework *fw)
-{
-	fwts_acpi_table_fadt *fadt;
-	fwts_acpi_table_info *table;
-
-	if (fwts_acpi_find_table(fw, "FACP", 0, &table) != FWTS_OK)
-		return FWTS_SKIP;
-
-	if (table == NULL)
-		return FWTS_SKIP;
-
-	fadt = (fwts_acpi_table_fadt *)table->data;
-
-	/* check PWR_BUTTON as in Table 4-13 Power Button Support */
-	if (fadt->flags & 0x10)
-		fwts_passed(fw, "Fixed hardware power button does not exist.");
-	else
-		fwts_failed(fw, LOG_LEVEL_HIGH,
-			"PWRBFixedHardwareError",
-			"PWR_Button field in FACP should not be zero "
-			"with ACPI PNP0C0C device.");
-
-	return FWTS_OK;
-}
-
 static fwts_framework_minor_test power_button_tests[] = {
 	/* Device Specific Objects */
 	{ method_test_HID, "Test _HID (Hardware ID)." },
@@ -178,8 +153,6 @@  static fwts_framework_minor_test power_button_tests[] = {
 	{ method_test_SUN, "Test _SUN (Slot User Number)." },
 	{ method_test_STR, "Test _STR (String)." },
 	{ method_test_UID, "Test _UID (Unique ID)." },
-	/* Check against fixed hardware in FACP */
-	{ facp_test_pwrbutton, "Test FACP PWR_BUTTON." },
 	{ NULL, NULL }
 };