Patchwork [1/5] acpi: method: Add new ACPI 5.0 _PSE check

login
register
mail settings
Submitter Colin King
Date July 2, 2012, 12:15 p.m.
Message ID <1341231311-12557-2-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/168581/
State Rejected
Headers show

Comments

Colin King - July 2, 2012, 12:15 p.m.
From: Colin Ian King <colin.king@canonical.com>

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/acpi/method/method.c |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
Alex Hung - July 3, 2012, 6:24 a.m.
On 07/02/2012 08:15 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpi/method/method.c |   18 ++++++++++++++++++
>   1 file changed, 18 insertions(+)
>
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index f4ece48..06fb7de 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -100,6 +100,7 @@
>    * _PS3  7.2.5		Y
>    * _PSC  7.2.6		Y
>    * _PSD  8.4.4.5	N
> + * _PSE  7.2.7		Y
>    * _PSL  11.4.8		N
>    * _PSR  10.3.1		Y
>    * _PSS  8.4.4.2	Y
> @@ -1743,6 +1744,22 @@ static int method_test_PSC(fwts_framework *fw)
>   	return method_evaluate_method(fw, METHOD_OPTIONAL, "_PSC", NULL, 0, method_test_integer_return, NULL);
>   }
>
> +static int method_test_PSE(fwts_framework *fw)
> +{
> +	ACPI_OBJECT arg[1];
> +
> +	arg[0].Type = ACPI_TYPE_INTEGER;
> +	arg[0].Integer.Value = 1;
> +
> +	return method_evaluate_method(fw, METHOD_OPTIONAL, "_PSE", arg, 1, method_test_NULL_return, NULL);
> +}
> +
> +#define method_test_PSx(name)				\
> +static int method_test ## name(fwts_framework *fw)	\
> +{							\
> +	return method_evaluate_method(fw, METHOD_OPTIONAL, # name, NULL, 0, method_test_NULL_return, # name); \
> +}
> +
>   static int method_test_PSW(fwts_framework *fw)
>   {
>   	ACPI_OBJECT arg[1];
> @@ -2085,6 +2102,7 @@ static fwts_framework_minor_test method_tests[] = {
>   	{ method_test_PS2, "Check _PS2 (Power State 2)." },
>   	{ method_test_PS3, "Check _PS3 (Power State 3)." },
>   	{ method_test_PSC, "Check _PSC (Power State Current)." },
> +	{ method_test_PSE, "Check _PSE (Power State for Enumeration)." },
>   	{ method_test_PSW, "Check _PSW (Power State Wake)." },
>   	{ method_test_IRC, "Check _IRC (In Rush Current)." },
>
>
Acked-by: Alex Hung <alex.hung@canonical.com>
Keng-Yu Lin - July 4, 2012, 7:20 a.m.
On Mon, Jul 2, 2012 at 8:15 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/acpi/method/method.c |   18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
> index f4ece48..06fb7de 100644
> --- a/src/acpi/method/method.c
> +++ b/src/acpi/method/method.c
> @@ -100,6 +100,7 @@
>   * _PS3  7.2.5         Y
>   * _PSC  7.2.6         Y
>   * _PSD  8.4.4.5       N
> + * _PSE  7.2.7         Y
>   * _PSL  11.4.8                N
>   * _PSR  10.3.1                Y
>   * _PSS  8.4.4.2       Y
> @@ -1743,6 +1744,22 @@ static int method_test_PSC(fwts_framework *fw)
>         return method_evaluate_method(fw, METHOD_OPTIONAL, "_PSC", NULL, 0, method_test_integer_return, NULL);
>  }
>
> +static int method_test_PSE(fwts_framework *fw)
> +{
> +       ACPI_OBJECT arg[1];
> +
> +       arg[0].Type = ACPI_TYPE_INTEGER;
> +       arg[0].Integer.Value = 1;
> +
> +       return method_evaluate_method(fw, METHOD_OPTIONAL, "_PSE", arg, 1, method_test_NULL_return, NULL);
> +}
> +
> +#define method_test_PSx(name)                          \
> +static int method_test ## name(fwts_framework *fw)     \
> +{                                                      \
> +       return method_evaluate_method(fw, METHOD_OPTIONAL, # name, NULL, 0, method_test_NULL_return, # name); \
> +}
> +

The #define is a duplicate. There is already one 15 lines before this
in the same file.


>  static int method_test_PSW(fwts_framework *fw)
>  {
>         ACPI_OBJECT arg[1];
> @@ -2085,6 +2102,7 @@ static fwts_framework_minor_test method_tests[] = {
>         { method_test_PS2, "Check _PS2 (Power State 2)." },
>         { method_test_PS3, "Check _PS3 (Power State 3)." },
>         { method_test_PSC, "Check _PSC (Power State Current)." },
> +       { method_test_PSE, "Check _PSE (Power State for Enumeration)." },
>         { method_test_PSW, "Check _PSW (Power State Wake)." },
>         { method_test_IRC, "Check _IRC (In Rush Current)." },
>
> --
> 1.7.10.4
>
>
> --
> fwts-devel mailing list
> fwts-devel@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel

Patch

diff --git a/src/acpi/method/method.c b/src/acpi/method/method.c
index f4ece48..06fb7de 100644
--- a/src/acpi/method/method.c
+++ b/src/acpi/method/method.c
@@ -100,6 +100,7 @@ 
  * _PS3  7.2.5		Y
  * _PSC  7.2.6		Y
  * _PSD  8.4.4.5	N
+ * _PSE  7.2.7		Y
  * _PSL  11.4.8		N
  * _PSR  10.3.1		Y
  * _PSS  8.4.4.2	Y
@@ -1743,6 +1744,22 @@  static int method_test_PSC(fwts_framework *fw)
 	return method_evaluate_method(fw, METHOD_OPTIONAL, "_PSC", NULL, 0, method_test_integer_return, NULL);
 }
 
+static int method_test_PSE(fwts_framework *fw)
+{
+	ACPI_OBJECT arg[1];
+
+	arg[0].Type = ACPI_TYPE_INTEGER;
+	arg[0].Integer.Value = 1;
+
+	return method_evaluate_method(fw, METHOD_OPTIONAL, "_PSE", arg, 1, method_test_NULL_return, NULL);
+}
+
+#define method_test_PSx(name)				\
+static int method_test ## name(fwts_framework *fw)	\
+{							\
+	return method_evaluate_method(fw, METHOD_OPTIONAL, # name, NULL, 0, method_test_NULL_return, # name); \
+}
+
 static int method_test_PSW(fwts_framework *fw)
 {
 	ACPI_OBJECT arg[1];
@@ -2085,6 +2102,7 @@  static fwts_framework_minor_test method_tests[] = {
 	{ method_test_PS2, "Check _PS2 (Power State 2)." },
 	{ method_test_PS3, "Check _PS3 (Power State 3)." },
 	{ method_test_PSC, "Check _PSC (Power State Current)." },
+	{ method_test_PSE, "Check _PSE (Power State for Enumeration)." },
 	{ method_test_PSW, "Check _PSW (Power State Wake)." },
 	{ method_test_IRC, "Check _IRC (In Rush Current)." },