diff mbox

acpi: method: add _PIC control method test (LP:1252997)

Message ID 1384937261-13048-1-git-send-email-alex.hung@canonical.com
State Accepted
Headers show

Commit Message

Alex Hung Nov. 20, 2013, 8:47 a.m. UTC
Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
 src/acpi/method/method.c |   25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

Comments

Colin Ian King Nov. 20, 2013, 9:05 a.m. UTC | #1
On 20/11/13 08:47, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  src/acpi/method/method.c |   25 +++++++++++++++++++++++--
>  1 file changed, 23 insertions(+), 2 deletions(-)
> 
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index e06992c..f944717 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -143,7 +143,7 @@
>   * _PCT  8.4.4.1	Y
>   * _PDC  8.4.1		N
>   * _PDL  8.4.4.6	Y
> - * _PIC  5.8.1		N
> + * _PIC  5.8.1		Y
>   * _PIF  10.3.3		Y
>   * _PLD  6.1.8		Y
>   * _PMC  10.4.1		N
> @@ -880,6 +880,27 @@ static int method_test_AEI(fwts_framework *fw)
>  }
>  
>  /*
> + * Section 5.8 System Configuration Objects
> + */
> +static int method_test_PIC(fwts_framework *fw)
> +{
> +	ACPI_OBJECT arg[1];
> +	int i, ret;
> +	arg[0].Type = ACPI_TYPE_INTEGER;
> +
> +	for (i = 0; i < 3; i++) {
> +		arg[0].Integer.Value = i;
> +		ret = method_evaluate_method(fw, METHOD_OPTIONAL,
> +			"_PIC", arg, 1, method_test_NULL_return, NULL);
> +
> +		if (ret != FWTS_OK)
> +			break;
> +	}
> +	return ret;
> +}
> +
> +
> +/*
>   * Section 6.1 Device Identification Objects
>   */
>  static int method_test_DDN(fwts_framework *fw)
> @@ -4864,7 +4885,7 @@ static fwts_framework_minor_test method_tests[] = {
>  	/* { method_test_REV, "Test _REV (Revision)." }, */
>  
>  	/* Section 5.8 System Configuration Objects */
> -	/* { method_test_PIC, "Test _PIC (Inform AML of Interrupt Model)." }, */
> +	{ method_test_PIC, "Test _PIC (Inform AML of Interrupt Model)." },
>  
>  	/* Section 6.1 Device Identification Objects  */
>  
> 
Acked-by: Colin Ian King <colin.king@canonical.com>
Ivan Hu Dec. 2, 2013, 7:32 a.m. UTC | #2
On 11/20/2013 04:47 PM, Alex Hung wrote:
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>   src/acpi/method/method.c |   25 +++++++++++++++++++++++--
>   1 file changed, 23 insertions(+), 2 deletions(-)
>
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index e06992c..f944717 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -143,7 +143,7 @@
>    * _PCT  8.4.4.1	Y
>    * _PDC  8.4.1		N
>    * _PDL  8.4.4.6	Y
> - * _PIC  5.8.1		N
> + * _PIC  5.8.1		Y
>    * _PIF  10.3.3		Y
>    * _PLD  6.1.8		Y
>    * _PMC  10.4.1		N
> @@ -880,6 +880,27 @@ static int method_test_AEI(fwts_framework *fw)
>   }
>
>   /*
> + * Section 5.8 System Configuration Objects
> + */
> +static int method_test_PIC(fwts_framework *fw)
> +{
> +	ACPI_OBJECT arg[1];
> +	int i, ret;
> +	arg[0].Type = ACPI_TYPE_INTEGER;
> +
> +	for (i = 0; i < 3; i++) {
> +		arg[0].Integer.Value = i;
> +		ret = method_evaluate_method(fw, METHOD_OPTIONAL,
> +			"_PIC", arg, 1, method_test_NULL_return, NULL);
> +
> +		if (ret != FWTS_OK)
> +			break;
> +	}
> +	return ret;
> +}
> +
> +
> +/*
>    * Section 6.1 Device Identification Objects
>    */
>   static int method_test_DDN(fwts_framework *fw)
> @@ -4864,7 +4885,7 @@ static fwts_framework_minor_test method_tests[] = {
>   	/* { method_test_REV, "Test _REV (Revision)." }, */
>
>   	/* Section 5.8 System Configuration Objects */
> -	/* { method_test_PIC, "Test _PIC (Inform AML of Interrupt Model)." }, */
> +	{ method_test_PIC, "Test _PIC (Inform AML of Interrupt Model)." },
>
>   	/* Section 6.1 Device Identification Objects  */
>
>

Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff mbox

Patch

diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
index e06992c..f944717 100644
--- a/src/acpi/method/method.c
+++ b/src/acpi/method/method.c
@@ -143,7 +143,7 @@ 
  * _PCT  8.4.4.1	Y
  * _PDC  8.4.1		N
  * _PDL  8.4.4.6	Y
- * _PIC  5.8.1		N
+ * _PIC  5.8.1		Y
  * _PIF  10.3.3		Y
  * _PLD  6.1.8		Y
  * _PMC  10.4.1		N
@@ -880,6 +880,27 @@  static int method_test_AEI(fwts_framework *fw)
 }
 
 /*
+ * Section 5.8 System Configuration Objects
+ */
+static int method_test_PIC(fwts_framework *fw)
+{
+	ACPI_OBJECT arg[1];
+	int i, ret;
+	arg[0].Type = ACPI_TYPE_INTEGER;
+
+	for (i = 0; i < 3; i++) {
+		arg[0].Integer.Value = i;
+		ret = method_evaluate_method(fw, METHOD_OPTIONAL,
+			"_PIC", arg, 1, method_test_NULL_return, NULL);
+
+		if (ret != FWTS_OK)
+			break;
+	}
+	return ret;
+}
+
+
+/*
  * Section 6.1 Device Identification Objects
  */
 static int method_test_DDN(fwts_framework *fw)
@@ -4864,7 +4885,7 @@  static fwts_framework_minor_test method_tests[] = {
 	/* { method_test_REV, "Test _REV (Revision)." }, */
 
 	/* Section 5.8 System Configuration Objects */
-	/* { method_test_PIC, "Test _PIC (Inform AML of Interrupt Model)." }, */
+	{ method_test_PIC, "Test _PIC (Inform AML of Interrupt Model)." },
 
 	/* Section 6.1 Device Identification Objects  */