diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-07-15 07:03:28 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-07-23 03:46:13 -0400 |
commit | 6921de898ba8f2ec91cfea70e7160b89c477382e (patch) | |
tree | b9128a2b880899f941c05f14e5fda7da5fcbccca | |
parent | 3a79bc63d90750f737ab9d7219bd3091d2fd6d84 (diff) |
ACPICA: Return u32 from acpi_dispatch_gpe()
In some cases it is useful to know whether or not the
acpi_ev_detect_gpe() called by acpi_dispatch_gpe() has found
the GPE to be active, so return the return value of it (whose
data type is u32) from latter.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | drivers/acpi/acpica/evxfgpe.c | 6 | ||||
-rw-r--r-- | include/acpi/acpixf.h | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/drivers/acpi/acpica/evxfgpe.c b/drivers/acpi/acpica/evxfgpe.c index 710488ec59e9..04a40d563dd6 100644 --- a/drivers/acpi/acpica/evxfgpe.c +++ b/drivers/acpi/acpica/evxfgpe.c | |||
@@ -644,17 +644,17 @@ ACPI_EXPORT_SYMBOL(acpi_get_gpe_status) | |||
644 | * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 | 644 | * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 |
645 | * gpe_number - GPE level within the GPE block | 645 | * gpe_number - GPE level within the GPE block |
646 | * | 646 | * |
647 | * RETURN: None | 647 | * RETURN: INTERRUPT_HANDLED or INTERRUPT_NOT_HANDLED |
648 | * | 648 | * |
649 | * DESCRIPTION: Detect and dispatch a General Purpose Event to either a function | 649 | * DESCRIPTION: Detect and dispatch a General Purpose Event to either a function |
650 | * (e.g. EC) or method (e.g. _Lxx/_Exx) handler. | 650 | * (e.g. EC) or method (e.g. _Lxx/_Exx) handler. |
651 | * | 651 | * |
652 | ******************************************************************************/ | 652 | ******************************************************************************/ |
653 | void acpi_dispatch_gpe(acpi_handle gpe_device, u32 gpe_number) | 653 | u32 acpi_dispatch_gpe(acpi_handle gpe_device, u32 gpe_number) |
654 | { | 654 | { |
655 | ACPI_FUNCTION_TRACE(acpi_dispatch_gpe); | 655 | ACPI_FUNCTION_TRACE(acpi_dispatch_gpe); |
656 | 656 | ||
657 | acpi_ev_detect_gpe(gpe_device, NULL, gpe_number); | 657 | return acpi_ev_detect_gpe(gpe_device, NULL, gpe_number); |
658 | } | 658 | } |
659 | 659 | ||
660 | ACPI_EXPORT_SYMBOL(acpi_dispatch_gpe) | 660 | ACPI_EXPORT_SYMBOL(acpi_dispatch_gpe) |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 3845c8fcc94e..4ed603a3b448 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -297,6 +297,9 @@ ACPI_GLOBAL(u8, acpi_gbl_system_awake_and_running); | |||
297 | #define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \ | 297 | #define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \ |
298 | ACPI_EXTERNAL_RETURN_OK(prototype) | 298 | ACPI_EXTERNAL_RETURN_OK(prototype) |
299 | 299 | ||
300 | #define ACPI_HW_DEPENDENT_RETURN_UINT32(prototype) \ | ||
301 | ACPI_EXTERNAL_RETURN_UINT32(prototype) | ||
302 | |||
300 | #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \ | 303 | #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \ |
301 | ACPI_EXTERNAL_RETURN_VOID(prototype) | 304 | ACPI_EXTERNAL_RETURN_VOID(prototype) |
302 | 305 | ||
@@ -307,6 +310,9 @@ ACPI_GLOBAL(u8, acpi_gbl_system_awake_and_running); | |||
307 | #define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \ | 310 | #define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \ |
308 | static ACPI_INLINE prototype {return(AE_OK);} | 311 | static ACPI_INLINE prototype {return(AE_OK);} |
309 | 312 | ||
313 | #define ACPI_HW_DEPENDENT_RETURN_UINT32(prototype) \ | ||
314 | static ACPI_INLINE prototype {return(0);} | ||
315 | |||
310 | #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \ | 316 | #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \ |
311 | static ACPI_INLINE prototype {return;} | 317 | static ACPI_INLINE prototype {return;} |
312 | 318 | ||
@@ -738,7 +744,7 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |||
738 | u32 gpe_number, | 744 | u32 gpe_number, |
739 | acpi_event_status | 745 | acpi_event_status |
740 | *event_status)) | 746 | *event_status)) |
741 | ACPI_HW_DEPENDENT_RETURN_VOID(void acpi_dispatch_gpe(acpi_handle gpe_device, u32 gpe_number)) | 747 | ACPI_HW_DEPENDENT_RETURN_UINT32(u32 acpi_dispatch_gpe(acpi_handle gpe_device, u32 gpe_number)) |
742 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable_all_gpes(void)) | 748 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable_all_gpes(void)) |
743 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_runtime_gpes(void)) | 749 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_runtime_gpes(void)) |
744 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_wakeup_gpes(void)) | 750 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_wakeup_gpes(void)) |