aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/events/evxfevnt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/events/evxfevnt.c')
-rw-r--r--drivers/acpi/events/evxfevnt.c67
1 files changed, 33 insertions, 34 deletions
diff --git a/drivers/acpi/events/evxfevnt.c b/drivers/acpi/events/evxfevnt.c
index ec9ce8429f15..7ebc2efac936 100644
--- a/drivers/acpi/events/evxfevnt.c
+++ b/drivers/acpi/events/evxfevnt.c
@@ -41,8 +41,6 @@
41 * POSSIBILITY OF SUCH DAMAGES. 41 * POSSIBILITY OF SUCH DAMAGES.
42 */ 42 */
43 43
44#include <linux/module.h>
45
46#include <acpi/acpi.h> 44#include <acpi/acpi.h>
47#include <acpi/acevents.h> 45#include <acpi/acevents.h>
48#include <acpi/acnamesp.h> 46#include <acpi/acnamesp.h>
@@ -65,7 +63,7 @@ acpi_status acpi_enable(void)
65{ 63{
66 acpi_status status = AE_OK; 64 acpi_status status = AE_OK;
67 65
68 ACPI_FUNCTION_TRACE("acpi_enable"); 66 ACPI_FUNCTION_TRACE(acpi_enable);
69 67
70 /* Make sure we have the FADT */ 68 /* Make sure we have the FADT */
71 69
@@ -94,6 +92,8 @@ acpi_status acpi_enable(void)
94 return_ACPI_STATUS(status); 92 return_ACPI_STATUS(status);
95} 93}
96 94
95ACPI_EXPORT_SYMBOL(acpi_enable)
96
97/******************************************************************************* 97/*******************************************************************************
98 * 98 *
99 * FUNCTION: acpi_disable 99 * FUNCTION: acpi_disable
@@ -105,12 +105,11 @@ acpi_status acpi_enable(void)
105 * DESCRIPTION: Transfers the system into LEGACY (non-ACPI) mode. 105 * DESCRIPTION: Transfers the system into LEGACY (non-ACPI) mode.
106 * 106 *
107 ******************************************************************************/ 107 ******************************************************************************/
108
109acpi_status acpi_disable(void) 108acpi_status acpi_disable(void)
110{ 109{
111 acpi_status status = AE_OK; 110 acpi_status status = AE_OK;
112 111
113 ACPI_FUNCTION_TRACE("acpi_disable"); 112 ACPI_FUNCTION_TRACE(acpi_disable);
114 113
115 if (!acpi_gbl_FADT) { 114 if (!acpi_gbl_FADT) {
116 ACPI_WARNING((AE_INFO, "No FADT information present!")); 115 ACPI_WARNING((AE_INFO, "No FADT information present!"));
@@ -137,6 +136,8 @@ acpi_status acpi_disable(void)
137 return_ACPI_STATUS(status); 136 return_ACPI_STATUS(status);
138} 137}
139 138
139ACPI_EXPORT_SYMBOL(acpi_disable)
140
140/******************************************************************************* 141/*******************************************************************************
141 * 142 *
142 * FUNCTION: acpi_enable_event 143 * FUNCTION: acpi_enable_event
@@ -149,13 +150,12 @@ acpi_status acpi_disable(void)
149 * DESCRIPTION: Enable an ACPI event (fixed) 150 * DESCRIPTION: Enable an ACPI event (fixed)
150 * 151 *
151 ******************************************************************************/ 152 ******************************************************************************/
152
153acpi_status acpi_enable_event(u32 event, u32 flags) 153acpi_status acpi_enable_event(u32 event, u32 flags)
154{ 154{
155 acpi_status status = AE_OK; 155 acpi_status status = AE_OK;
156 u32 value; 156 u32 value;
157 157
158 ACPI_FUNCTION_TRACE("acpi_enable_event"); 158 ACPI_FUNCTION_TRACE(acpi_enable_event);
159 159
160 /* Decode the Fixed Event */ 160 /* Decode the Fixed Event */
161 161
@@ -193,7 +193,7 @@ acpi_status acpi_enable_event(u32 event, u32 flags)
193 return_ACPI_STATUS(status); 193 return_ACPI_STATUS(status);
194} 194}
195 195
196EXPORT_SYMBOL(acpi_enable_event); 196ACPI_EXPORT_SYMBOL(acpi_enable_event)
197 197
198/******************************************************************************* 198/*******************************************************************************
199 * 199 *
@@ -208,13 +208,12 @@ EXPORT_SYMBOL(acpi_enable_event);
208 * DESCRIPTION: Set the type of an individual GPE 208 * DESCRIPTION: Set the type of an individual GPE
209 * 209 *
210 ******************************************************************************/ 210 ******************************************************************************/
211
212acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type) 211acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type)
213{ 212{
214 acpi_status status = AE_OK; 213 acpi_status status = AE_OK;
215 struct acpi_gpe_event_info *gpe_event_info; 214 struct acpi_gpe_event_info *gpe_event_info;
216 215
217 ACPI_FUNCTION_TRACE("acpi_set_gpe_type"); 216 ACPI_FUNCTION_TRACE(acpi_set_gpe_type);
218 217
219 /* Ensure that we have a valid GPE number */ 218 /* Ensure that we have a valid GPE number */
220 219
@@ -236,7 +235,7 @@ acpi_status acpi_set_gpe_type(acpi_handle gpe_device, u32 gpe_number, u8 type)
236 return_ACPI_STATUS(status); 235 return_ACPI_STATUS(status);
237} 236}
238 237
239EXPORT_SYMBOL(acpi_set_gpe_type); 238ACPI_EXPORT_SYMBOL(acpi_set_gpe_type)
240 239
241/******************************************************************************* 240/*******************************************************************************
242 * 241 *
@@ -252,13 +251,12 @@ EXPORT_SYMBOL(acpi_set_gpe_type);
252 * DESCRIPTION: Enable an ACPI event (general purpose) 251 * DESCRIPTION: Enable an ACPI event (general purpose)
253 * 252 *
254 ******************************************************************************/ 253 ******************************************************************************/
255
256acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) 254acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
257{ 255{
258 acpi_status status = AE_OK; 256 acpi_status status = AE_OK;
259 struct acpi_gpe_event_info *gpe_event_info; 257 struct acpi_gpe_event_info *gpe_event_info;
260 258
261 ACPI_FUNCTION_TRACE("acpi_enable_gpe"); 259 ACPI_FUNCTION_TRACE(acpi_enable_gpe);
262 260
263 /* Use semaphore lock if not executing at interrupt level */ 261 /* Use semaphore lock if not executing at interrupt level */
264 262
@@ -288,7 +286,7 @@ acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
288 return_ACPI_STATUS(status); 286 return_ACPI_STATUS(status);
289} 287}
290 288
291EXPORT_SYMBOL(acpi_enable_gpe); 289ACPI_EXPORT_SYMBOL(acpi_enable_gpe)
292 290
293/******************************************************************************* 291/*******************************************************************************
294 * 292 *
@@ -304,13 +302,12 @@ EXPORT_SYMBOL(acpi_enable_gpe);
304 * DESCRIPTION: Disable an ACPI event (general purpose) 302 * DESCRIPTION: Disable an ACPI event (general purpose)
305 * 303 *
306 ******************************************************************************/ 304 ******************************************************************************/
307
308acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) 305acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
309{ 306{
310 acpi_status status = AE_OK; 307 acpi_status status = AE_OK;
311 struct acpi_gpe_event_info *gpe_event_info; 308 struct acpi_gpe_event_info *gpe_event_info;
312 309
313 ACPI_FUNCTION_TRACE("acpi_disable_gpe"); 310 ACPI_FUNCTION_TRACE(acpi_disable_gpe);
314 311
315 /* Use semaphore lock if not executing at interrupt level */ 312 /* Use semaphore lock if not executing at interrupt level */
316 313
@@ -338,6 +335,8 @@ acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
338 return_ACPI_STATUS(status); 335 return_ACPI_STATUS(status);
339} 336}
340 337
338ACPI_EXPORT_SYMBOL(acpi_disable_gpe)
339
341/******************************************************************************* 340/*******************************************************************************
342 * 341 *
343 * FUNCTION: acpi_disable_event 342 * FUNCTION: acpi_disable_event
@@ -350,13 +349,12 @@ acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
350 * DESCRIPTION: Disable an ACPI event (fixed) 349 * DESCRIPTION: Disable an ACPI event (fixed)
351 * 350 *
352 ******************************************************************************/ 351 ******************************************************************************/
353
354acpi_status acpi_disable_event(u32 event, u32 flags) 352acpi_status acpi_disable_event(u32 event, u32 flags)
355{ 353{
356 acpi_status status = AE_OK; 354 acpi_status status = AE_OK;
357 u32 value; 355 u32 value;
358 356
359 ACPI_FUNCTION_TRACE("acpi_disable_event"); 357 ACPI_FUNCTION_TRACE(acpi_disable_event);
360 358
361 /* Decode the Fixed Event */ 359 /* Decode the Fixed Event */
362 360
@@ -392,7 +390,7 @@ acpi_status acpi_disable_event(u32 event, u32 flags)
392 return_ACPI_STATUS(status); 390 return_ACPI_STATUS(status);
393} 391}
394 392
395EXPORT_SYMBOL(acpi_disable_event); 393ACPI_EXPORT_SYMBOL(acpi_disable_event)
396 394
397/******************************************************************************* 395/*******************************************************************************
398 * 396 *
@@ -405,12 +403,11 @@ EXPORT_SYMBOL(acpi_disable_event);
405 * DESCRIPTION: Clear an ACPI event (fixed) 403 * DESCRIPTION: Clear an ACPI event (fixed)
406 * 404 *
407 ******************************************************************************/ 405 ******************************************************************************/
408
409acpi_status acpi_clear_event(u32 event) 406acpi_status acpi_clear_event(u32 event)
410{ 407{
411 acpi_status status = AE_OK; 408 acpi_status status = AE_OK;
412 409
413 ACPI_FUNCTION_TRACE("acpi_clear_event"); 410 ACPI_FUNCTION_TRACE(acpi_clear_event);
414 411
415 /* Decode the Fixed Event */ 412 /* Decode the Fixed Event */
416 413
@@ -429,7 +426,7 @@ acpi_status acpi_clear_event(u32 event)
429 return_ACPI_STATUS(status); 426 return_ACPI_STATUS(status);
430} 427}
431 428
432EXPORT_SYMBOL(acpi_clear_event); 429ACPI_EXPORT_SYMBOL(acpi_clear_event)
433 430
434/******************************************************************************* 431/*******************************************************************************
435 * 432 *
@@ -444,13 +441,12 @@ EXPORT_SYMBOL(acpi_clear_event);
444 * DESCRIPTION: Clear an ACPI event (general purpose) 441 * DESCRIPTION: Clear an ACPI event (general purpose)
445 * 442 *
446 ******************************************************************************/ 443 ******************************************************************************/
447
448acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags) 444acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
449{ 445{
450 acpi_status status = AE_OK; 446 acpi_status status = AE_OK;
451 struct acpi_gpe_event_info *gpe_event_info; 447 struct acpi_gpe_event_info *gpe_event_info;
452 448
453 ACPI_FUNCTION_TRACE("acpi_clear_gpe"); 449 ACPI_FUNCTION_TRACE(acpi_clear_gpe);
454 450
455 /* Use semaphore lock if not executing at interrupt level */ 451 /* Use semaphore lock if not executing at interrupt level */
456 452
@@ -478,6 +474,8 @@ acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
478 return_ACPI_STATUS(status); 474 return_ACPI_STATUS(status);
479} 475}
480 476
477ACPI_EXPORT_SYMBOL(acpi_clear_gpe)
478
481#ifdef ACPI_FUTURE_USAGE 479#ifdef ACPI_FUTURE_USAGE
482/******************************************************************************* 480/*******************************************************************************
483 * 481 *
@@ -492,12 +490,11 @@ acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number, u32 flags)
492 * DESCRIPTION: Obtains and returns the current status of the event 490 * DESCRIPTION: Obtains and returns the current status of the event
493 * 491 *
494 ******************************************************************************/ 492 ******************************************************************************/
495
496acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status) 493acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status)
497{ 494{
498 acpi_status status = AE_OK; 495 acpi_status status = AE_OK;
499 496
500 ACPI_FUNCTION_TRACE("acpi_get_event_status"); 497 ACPI_FUNCTION_TRACE(acpi_get_event_status);
501 498
502 if (!event_status) { 499 if (!event_status) {
503 return_ACPI_STATUS(AE_BAD_PARAMETER); 500 return_ACPI_STATUS(AE_BAD_PARAMETER);
@@ -518,6 +515,8 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status)
518 return_ACPI_STATUS(status); 515 return_ACPI_STATUS(status);
519} 516}
520 517
518ACPI_EXPORT_SYMBOL(acpi_get_event_status)
519
521/******************************************************************************* 520/*******************************************************************************
522 * 521 *
523 * FUNCTION: acpi_get_gpe_status 522 * FUNCTION: acpi_get_gpe_status
@@ -533,7 +532,6 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status)
533 * DESCRIPTION: Get status of an event (general purpose) 532 * DESCRIPTION: Get status of an event (general purpose)
534 * 533 *
535 ******************************************************************************/ 534 ******************************************************************************/
536
537acpi_status 535acpi_status
538acpi_get_gpe_status(acpi_handle gpe_device, 536acpi_get_gpe_status(acpi_handle gpe_device,
539 u32 gpe_number, u32 flags, acpi_event_status * event_status) 537 u32 gpe_number, u32 flags, acpi_event_status * event_status)
@@ -541,7 +539,7 @@ acpi_get_gpe_status(acpi_handle gpe_device,
541 acpi_status status = AE_OK; 539 acpi_status status = AE_OK;
542 struct acpi_gpe_event_info *gpe_event_info; 540 struct acpi_gpe_event_info *gpe_event_info;
543 541
544 ACPI_FUNCTION_TRACE("acpi_get_gpe_status"); 542 ACPI_FUNCTION_TRACE(acpi_get_gpe_status);
545 543
546 /* Use semaphore lock if not executing at interrupt level */ 544 /* Use semaphore lock if not executing at interrupt level */
547 545
@@ -570,6 +568,8 @@ acpi_get_gpe_status(acpi_handle gpe_device,
570 } 568 }
571 return_ACPI_STATUS(status); 569 return_ACPI_STATUS(status);
572} 570}
571
572ACPI_EXPORT_SYMBOL(acpi_get_gpe_status)
573#endif /* ACPI_FUTURE_USAGE */ 573#endif /* ACPI_FUTURE_USAGE */
574 574
575/******************************************************************************* 575/*******************************************************************************
@@ -586,7 +586,6 @@ acpi_get_gpe_status(acpi_handle gpe_device,
586 * DESCRIPTION: Create and Install a block of GPE registers 586 * DESCRIPTION: Create and Install a block of GPE registers
587 * 587 *
588 ******************************************************************************/ 588 ******************************************************************************/
589
590acpi_status 589acpi_status
591acpi_install_gpe_block(acpi_handle gpe_device, 590acpi_install_gpe_block(acpi_handle gpe_device,
592 struct acpi_generic_address *gpe_block_address, 591 struct acpi_generic_address *gpe_block_address,
@@ -597,7 +596,7 @@ acpi_install_gpe_block(acpi_handle gpe_device,
597 struct acpi_namespace_node *node; 596 struct acpi_namespace_node *node;
598 struct acpi_gpe_block_info *gpe_block; 597 struct acpi_gpe_block_info *gpe_block;
599 598
600 ACPI_FUNCTION_TRACE("acpi_install_gpe_block"); 599 ACPI_FUNCTION_TRACE(acpi_install_gpe_block);
601 600
602 if ((!gpe_device) || (!gpe_block_address) || (!register_count)) { 601 if ((!gpe_device) || (!gpe_block_address) || (!register_count)) {
603 return_ACPI_STATUS(AE_BAD_PARAMETER); 602 return_ACPI_STATUS(AE_BAD_PARAMETER);
@@ -636,6 +635,7 @@ acpi_install_gpe_block(acpi_handle gpe_device,
636 635
637 obj_desc = acpi_ns_get_attached_object(node); 636 obj_desc = acpi_ns_get_attached_object(node);
638 if (!obj_desc) { 637 if (!obj_desc) {
638
639 /* No object, create a new one */ 639 /* No object, create a new one */
640 640
641 obj_desc = acpi_ut_create_internal_object(ACPI_TYPE_DEVICE); 641 obj_desc = acpi_ut_create_internal_object(ACPI_TYPE_DEVICE);
@@ -665,7 +665,7 @@ acpi_install_gpe_block(acpi_handle gpe_device,
665 return_ACPI_STATUS(status); 665 return_ACPI_STATUS(status);
666} 666}
667 667
668EXPORT_SYMBOL(acpi_install_gpe_block); 668ACPI_EXPORT_SYMBOL(acpi_install_gpe_block)
669 669
670/******************************************************************************* 670/*******************************************************************************
671 * 671 *
@@ -678,14 +678,13 @@ EXPORT_SYMBOL(acpi_install_gpe_block);
678 * DESCRIPTION: Remove a previously installed block of GPE registers 678 * DESCRIPTION: Remove a previously installed block of GPE registers
679 * 679 *
680 ******************************************************************************/ 680 ******************************************************************************/
681
682acpi_status acpi_remove_gpe_block(acpi_handle gpe_device) 681acpi_status acpi_remove_gpe_block(acpi_handle gpe_device)
683{ 682{
684 union acpi_operand_object *obj_desc; 683 union acpi_operand_object *obj_desc;
685 acpi_status status; 684 acpi_status status;
686 struct acpi_namespace_node *node; 685 struct acpi_namespace_node *node;
687 686
688 ACPI_FUNCTION_TRACE("acpi_remove_gpe_block"); 687 ACPI_FUNCTION_TRACE(acpi_remove_gpe_block);
689 688
690 if (!gpe_device) { 689 if (!gpe_device) {
691 return_ACPI_STATUS(AE_BAD_PARAMETER); 690 return_ACPI_STATUS(AE_BAD_PARAMETER);
@@ -721,4 +720,4 @@ acpi_status acpi_remove_gpe_block(acpi_handle gpe_device)
721 return_ACPI_STATUS(status); 720 return_ACPI_STATUS(status);
722} 721}
723 722
724EXPORT_SYMBOL(acpi_remove_gpe_block); 723ACPI_EXPORT_SYMBOL(acpi_remove_gpe_block)