From patchwork Wed Apr 26 08:01:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ivan Hu X-Patchwork-Id: 1773932 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=BUA2BTiF; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q5rsv28lRz23vH for ; Wed, 26 Apr 2023 18:01:23 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1pra5W-0004qn-6D; Wed, 26 Apr 2023 08:01:18 +0000 Received: from smtp-relay-canonical-0.internal ([10.131.114.83] helo=smtp-relay-canonical-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1pra5M-0004b6-88 for fwts-devel@lists.ubuntu.com; Wed, 26 Apr 2023 08:01:08 +0000 Received: from canonical.com (118-163-61-247.hinet-ip.hinet.net [118.163.61.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 291813F187 for ; Wed, 26 Apr 2023 08:01:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1682496066; bh=sQPRWM4SOG2cP7ouTRRqVWwiasU3SAjrneg1C8fJt0o=; h=From:To:Subject:Date:Message-Id:MIME-Version:Content-Type; b=BUA2BTiFb5f5jP1CxjrZUhpFQWGSkRUK9Y8TmuA/vPuI0ZhxZTy649jv14Bau25Qy rlIHphbcQNeaqRpCQK0vP5OZag6F8CfM8/XXWJmMDXM8gdSzQccNDR2uCPxixzRDfB b8/oZMK1OLOqP4eUAjLmbCR6lfNUQVafOb7eVQbR0hZBnXt05gDL7h0WOQ4XdJuSJY wr3YNzKUXmy3nlLos1NqpqnvYc8Wb5cYr2JIBRDY5A+JVnJPMOsonasYwNl59hPsyL RANr5apZUhDlD6rs7759WXgxy4Ge99pvOjaj+Es7hTpCF9WHzNui9LxN36R+YIXwTp oDMiP0Zl708EA== From: Ivan Hu To: fwts-devel@lists.ubuntu.com Subject: [PATCH] acpi: button: remove check fixed hardware & control method power buttons Date: Wed, 26 Apr 2023 16:01:03 +0800 Message-Id: <20230426080103.32144-1-ivan.hu@canonical.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" 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 --- src/acpi/devices/buttons/power_button.c | 27 ------------------------- 1 file changed, 27 deletions(-) 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 } };