diff options
author | Bob Moore <robert.moore@intel.com> | 2008-12-29 20:55:48 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-12-31 01:10:46 -0500 |
commit | 08ac07b826cfd9a9b28aa094f14e1c023bdc9864 (patch) | |
tree | fafc6acc0d76ad162ca1f7b3005f95b9775bbc31 | |
parent | e97d6bf1a01b7403d98aea95731863aab2e84064 (diff) |
ACPICA: New: Public GPE group enable/disable interfaces
Added acpi_disable_all_gpes and acpi_enable_all_runtime_gpes for
public use.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r-- | drivers/acpi/events/evxfevnt.c | 58 | ||||
-rw-r--r-- | include/acpi/acpixf.h | 15 |
2 files changed, 69 insertions, 4 deletions
diff --git a/drivers/acpi/events/evxfevnt.c b/drivers/acpi/events/evxfevnt.c index aa4dec8edfc5..f7550da85d34 100644 --- a/drivers/acpi/events/evxfevnt.c +++ b/drivers/acpi/events/evxfevnt.c | |||
@@ -810,3 +810,61 @@ acpi_ev_get_gpe_device(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | |||
810 | 810 | ||
811 | return (AE_OK); | 811 | return (AE_OK); |
812 | } | 812 | } |
813 | |||
814 | /****************************************************************************** | ||
815 | * | ||
816 | * FUNCTION: acpi_disable_all_gpes | ||
817 | * | ||
818 | * PARAMETERS: None | ||
819 | * | ||
820 | * RETURN: Status | ||
821 | * | ||
822 | * DESCRIPTION: Disable and clear all GPEs in all GPE blocks | ||
823 | * | ||
824 | ******************************************************************************/ | ||
825 | |||
826 | acpi_status acpi_disable_all_gpes(void) | ||
827 | { | ||
828 | acpi_status status; | ||
829 | |||
830 | ACPI_FUNCTION_TRACE(acpi_disable_all_gpes); | ||
831 | |||
832 | status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); | ||
833 | if (ACPI_FAILURE(status)) { | ||
834 | return_ACPI_STATUS(status); | ||
835 | } | ||
836 | |||
837 | status = acpi_hw_disable_all_gpes(); | ||
838 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); | ||
839 | |||
840 | return_ACPI_STATUS(status); | ||
841 | } | ||
842 | |||
843 | /****************************************************************************** | ||
844 | * | ||
845 | * FUNCTION: acpi_enable_all_runtime_gpes | ||
846 | * | ||
847 | * PARAMETERS: None | ||
848 | * | ||
849 | * RETURN: Status | ||
850 | * | ||
851 | * DESCRIPTION: Enable all "runtime" GPEs, in all GPE blocks | ||
852 | * | ||
853 | ******************************************************************************/ | ||
854 | |||
855 | acpi_status acpi_enable_all_runtime_gpes(void) | ||
856 | { | ||
857 | acpi_status status; | ||
858 | |||
859 | ACPI_FUNCTION_TRACE(acpi_enable_all_runtime_gpes); | ||
860 | |||
861 | status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); | ||
862 | if (ACPI_FAILURE(status)) { | ||
863 | return_ACPI_STATUS(status); | ||
864 | } | ||
865 | |||
866 | status = acpi_hw_enable_all_runtime_gpes(); | ||
867 | (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); | ||
868 | |||
869 | return_ACPI_STATUS(status); | ||
870 | } | ||
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index e09c23719e42..6d8fb6fb35e0 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -229,6 +229,10 @@ acpi_install_gpe_handler(acpi_handle gpe_device, | |||
229 | u32 gpe_number, | 229 | u32 gpe_number, |
230 | u32 type, acpi_event_handler address, void *context); | 230 | u32 type, acpi_event_handler address, void *context); |
231 | 231 | ||
232 | acpi_status | ||
233 | acpi_remove_gpe_handler(acpi_handle gpe_device, | ||
234 | u32 gpe_number, acpi_event_handler address); | ||
235 | |||
232 | #ifdef ACPI_FUTURE_USAGE | 236 | #ifdef ACPI_FUTURE_USAGE |
233 | acpi_status acpi_install_exception_handler(acpi_exception_handler handler); | 237 | acpi_status acpi_install_exception_handler(acpi_exception_handler handler); |
234 | #endif | 238 | #endif |
@@ -240,10 +244,6 @@ acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle); | |||
240 | 244 | ||
241 | acpi_status acpi_release_global_lock(u32 handle); | 245 | acpi_status acpi_release_global_lock(u32 handle); |
242 | 246 | ||
243 | acpi_status | ||
244 | acpi_remove_gpe_handler(acpi_handle gpe_device, | ||
245 | u32 gpe_number, acpi_event_handler address); | ||
246 | |||
247 | acpi_status acpi_enable_event(u32 event, u32 flags); | 247 | acpi_status acpi_enable_event(u32 event, u32 flags); |
248 | 248 | ||
249 | acpi_status acpi_disable_event(u32 event, u32 flags); | 249 | acpi_status acpi_disable_event(u32 event, u32 flags); |
@@ -252,6 +252,9 @@ acpi_status acpi_clear_event(u32 event); | |||
252 | 252 | ||
253 | acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status); | 253 | acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status); |
254 | 254 | ||
255 | /* | ||
256 | * GPE Interfaces | ||
257 | */ | ||
255 | acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type); | 258 | acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type); |
256 | 259 | ||
257 | acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number); | 260 | acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number); |
@@ -265,6 +268,10 @@ acpi_get_gpe_status(acpi_handle gpe_device, | |||
265 | u32 gpe_number, | 268 | u32 gpe_number, |
266 | u32 flags, acpi_event_status * event_status); | 269 | u32 flags, acpi_event_status * event_status); |
267 | 270 | ||
271 | acpi_status acpi_disable_all_gpes(void); | ||
272 | |||
273 | acpi_status acpi_enable_all_runtime_gpes(void); | ||
274 | |||
268 | acpi_status acpi_get_gpe_device(u32 gpe_index, acpi_handle *gpe_device); | 275 | acpi_status acpi_get_gpe_device(u32 gpe_index, acpi_handle *gpe_device); |
269 | 276 | ||
270 | acpi_status | 277 | acpi_status |