From patchwork Fri Sep 12 06:00:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Hung X-Patchwork-Id: 388488 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 67854140131; Fri, 12 Sep 2014 16:01:20 +1000 (EST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1XSJv5-0007zh-BR; Fri, 12 Sep 2014 06:01:19 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1XSJuz-0007zG-NG for fwts-devel@lists.ubuntu.com; Fri, 12 Sep 2014 06:01:13 +0000 Received: from [175.41.48.77] (helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1XSJuz-0001N7-4S; Fri, 12 Sep 2014 06:01:13 +0000 From: Alex Hung To: fwts-devel@lists.ubuntu.com Subject: [PATCH] acpi: method: add check for _PSL Date: Fri, 12 Sep 2014 14:00:57 +0800 Message-Id: <1410501657-2998-1-git-send-email-alex.hung@canonical.com> X-Mailer: git-send-email 1.9.1 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: fwts-devel-bounces@lists.ubuntu.com Signed-off-by: Alex Hung Acked-by: Colin Ian King Acked-by: Keng-Yu Lin --- src/acpi/method/method.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c index 1e78e66..d3c2a13 100644 --- a/src/acpi/method/method.c +++ b/src/acpi/method/method.c @@ -166,7 +166,7 @@ * _PSC 7.2.6 Y * _PSD 8.4.4.5 N * _PSE 7.2.7 Y - * _PSL 11.4.8 N + * _PSL 11.4.8 Y * _PSR 10.3.1 Y * _PSS 8.4.4.2 Y * _PSV 11.4.9 Y @@ -4434,6 +4434,30 @@ method_test_THERM(_NTT, METHOD_OPTIONAL) method_test_THERM(_PSV, METHOD_OPTIONAL) method_test_THERM(_TST, METHOD_OPTIONAL) +static void method_test_PSL_return( + fwts_framework *fw, + char *name, + ACPI_BUFFER *buf, + ACPI_OBJECT *obj, + void *private) +{ + FWTS_UNUSED(private); + + if (method_check_type(fw, name, buf, ACPI_TYPE_PACKAGE) != FWTS_OK) + return; + + if (method_package_elements_all_type(fw, name, "_PSL", obj, ACPI_TYPE_LOCAL_REFERENCE) != FWTS_OK) + return; + + method_passed_sane(fw, name, "package"); +} + +static int method_test_PSL(fwts_framework *fw) +{ + return method_evaluate_method(fw, METHOD_OPTIONAL, + "_PSL", NULL, 0, method_test_PSL_return, "_PSL"); +} + static void method_test_TRT_return( fwts_framework *fw, char *name, @@ -5453,7 +5477,7 @@ static fwts_framework_minor_test method_tests[] = { { method_test_DTI, "Test _DTI (Device Temperature Indication)." }, { method_test_HOT, "Test _HOT (Hot Temperature)." }, { method_test_NTT, "Test _NTT (Notification Temp Threshold)." }, - /* { method_test_PSL, "Test _PSL (Passive List)." }, */ + { method_test_PSL, "Test _PSL (Passive List)." }, { method_test_PSV, "Test _PSV (Passive Temp)." }, { method_test_RTV, "Test _RTV (Relative Temp Values)." }, { method_test_SCP, "Test _SCP (Set Cooling Policy)." },