| .. | .. |
|---|
| 3 | 3 | * |
|---|
| 4 | 4 | * Module Name: evxfgpe - External Interfaces for General Purpose Events (GPEs) |
|---|
| 5 | 5 | * |
|---|
| 6 | | - * Copyright (C) 2000 - 2018, Intel Corp. |
|---|
| 6 | + * Copyright (C) 2000 - 2020, Intel Corp. |
|---|
| 7 | 7 | * |
|---|
| 8 | 8 | *****************************************************************************/ |
|---|
| 9 | 9 | |
|---|
| .. | .. |
|---|
| 644 | 644 | * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1 |
|---|
| 645 | 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 | 649 | * DESCRIPTION: Detect and dispatch a General Purpose Event to either a function |
|---|
| 650 | 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 | 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 | 660 | ACPI_EXPORT_SYMBOL(acpi_dispatch_gpe) |
|---|
| .. | .. |
|---|
| 669 | 669 | * |
|---|
| 670 | 670 | * RETURN: Status |
|---|
| 671 | 671 | * |
|---|
| 672 | | - * DESCRIPTION: Clear and conditionally reenable a GPE. This completes the GPE |
|---|
| 672 | + * DESCRIPTION: Clear and conditionally re-enable a GPE. This completes the GPE |
|---|
| 673 | 673 | * processing. Intended for use by asynchronous host-installed |
|---|
| 674 | | - * GPE handlers. The GPE is only reenabled if the enable_for_run bit |
|---|
| 674 | + * GPE handlers. The GPE is only re-enabled if the enable_for_run bit |
|---|
| 675 | 675 | * is set in the GPE info. |
|---|
| 676 | 676 | * |
|---|
| 677 | 677 | ******************************************************************************/ |
|---|
| .. | .. |
|---|
| 795 | 795 | |
|---|
| 796 | 796 | ACPI_EXPORT_SYMBOL(acpi_enable_all_wakeup_gpes) |
|---|
| 797 | 797 | |
|---|
| 798 | +/****************************************************************************** |
|---|
| 799 | + * |
|---|
| 800 | + * FUNCTION: acpi_any_gpe_status_set |
|---|
| 801 | + * |
|---|
| 802 | + * PARAMETERS: gpe_skip_number - Number of the GPE to skip |
|---|
| 803 | + * |
|---|
| 804 | + * RETURN: Whether or not the status bit is set for any GPE |
|---|
| 805 | + * |
|---|
| 806 | + * DESCRIPTION: Check the status bits of all enabled GPEs, except for the one |
|---|
| 807 | + * represented by the "skip" argument, and return TRUE if any of |
|---|
| 808 | + * them is set or FALSE otherwise. |
|---|
| 809 | + * |
|---|
| 810 | + ******************************************************************************/ |
|---|
| 811 | +u32 acpi_any_gpe_status_set(u32 gpe_skip_number) |
|---|
| 812 | +{ |
|---|
| 813 | + acpi_status status; |
|---|
| 814 | + acpi_handle gpe_device; |
|---|
| 815 | + u8 ret; |
|---|
| 816 | + |
|---|
| 817 | + ACPI_FUNCTION_TRACE(acpi_any_gpe_status_set); |
|---|
| 818 | + |
|---|
| 819 | + status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); |
|---|
| 820 | + if (ACPI_FAILURE(status)) { |
|---|
| 821 | + return (FALSE); |
|---|
| 822 | + } |
|---|
| 823 | + |
|---|
| 824 | + status = acpi_get_gpe_device(gpe_skip_number, &gpe_device); |
|---|
| 825 | + if (ACPI_FAILURE(status)) { |
|---|
| 826 | + gpe_device = NULL; |
|---|
| 827 | + } |
|---|
| 828 | + |
|---|
| 829 | + ret = acpi_hw_check_all_gpes(gpe_device, gpe_skip_number); |
|---|
| 830 | + (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); |
|---|
| 831 | + |
|---|
| 832 | + return (ret); |
|---|
| 833 | +} |
|---|
| 834 | + |
|---|
| 835 | +ACPI_EXPORT_SYMBOL(acpi_any_gpe_status_set) |
|---|
| 836 | + |
|---|
| 798 | 837 | /******************************************************************************* |
|---|
| 799 | 838 | * |
|---|
| 800 | 839 | * FUNCTION: acpi_install_gpe_block |
|---|