evxfgpe.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623
  1. /******************************************************************************
  2. *
  3. * Module Name: evxfgpe - External Interfaces for General Purpose Events (GPEs)
  4. *
  5. *****************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2010, Intel Corp.
  8. * All rights reserved.
  9. *
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions
  12. * are met:
  13. * 1. Redistributions of source code must retain the above copyright
  14. * notice, this list of conditions, and the following disclaimer,
  15. * without modification.
  16. * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  17. * substantially similar to the "NO WARRANTY" disclaimer below
  18. * ("Disclaimer") and any redistribution must be conditioned upon
  19. * including a substantially similar Disclaimer requirement for further
  20. * binary redistribution.
  21. * 3. Neither the names of the above-listed copyright holders nor the names
  22. * of any contributors may be used to endorse or promote products derived
  23. * from this software without specific prior written permission.
  24. *
  25. * Alternatively, this software may be distributed under the terms of the
  26. * GNU General Public License ("GPL") version 2 as published by the Free
  27. * Software Foundation.
  28. *
  29. * NO WARRANTY
  30. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  31. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  32. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
  33. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  34. * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  35. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  36. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  37. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  38. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  39. * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  40. * POSSIBILITY OF SUCH DAMAGES.
  41. */
  42. #include <acpi/acpi.h>
  43. #include "accommon.h"
  44. #include "acevents.h"
  45. #include "acnamesp.h"
  46. #define _COMPONENT ACPI_EVENTS
  47. ACPI_MODULE_NAME("evxfgpe")
  48. /******************************************************************************
  49. *
  50. * FUNCTION: acpi_update_all_gpes
  51. *
  52. * PARAMETERS: None
  53. *
  54. * RETURN: None
  55. *
  56. * DESCRIPTION: Enable all GPEs that have associated _Lxx or _Exx methods and
  57. * are not pointed to by any device _PRW methods indicating that
  58. * these GPEs are generally intended for system or device wakeup
  59. * (such GPEs have to be enabled directly when the devices whose
  60. * _PRW methods point to them are set up for wakeup signaling).
  61. *
  62. ******************************************************************************/
  63. acpi_status acpi_update_all_gpes(void)
  64. {
  65. acpi_status status;
  66. ACPI_FUNCTION_TRACE(acpi_update_all_gpes);
  67. status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS);
  68. if (ACPI_FAILURE(status)) {
  69. return_ACPI_STATUS(status);
  70. }
  71. if (acpi_gbl_all_gpes_initialized) {
  72. goto unlock_and_exit;
  73. }
  74. status = acpi_ev_walk_gpe_list(acpi_ev_initialize_gpe_block, NULL);
  75. if (ACPI_SUCCESS(status)) {
  76. acpi_gbl_all_gpes_initialized = TRUE;
  77. }
  78. unlock_and_exit:
  79. (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
  80. return_ACPI_STATUS(status);
  81. }
  82. ACPI_EXPORT_SYMBOL(acpi_update_all_gpes)
  83. /*******************************************************************************
  84. *
  85. * FUNCTION: acpi_enable_gpe
  86. *
  87. * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1
  88. * gpe_number - GPE level within the GPE block
  89. *
  90. * RETURN: Status
  91. *
  92. * DESCRIPTION: Add a reference to a GPE. On the first reference, the GPE is
  93. * hardware-enabled.
  94. *
  95. ******************************************************************************/
  96. acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number)
  97. {
  98. acpi_status status = AE_BAD_PARAMETER;
  99. struct acpi_gpe_event_info *gpe_event_info;
  100. acpi_cpu_flags flags;
  101. ACPI_FUNCTION_TRACE(acpi_enable_gpe);
  102. flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
  103. /* Ensure that we have a valid GPE number */
  104. gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number);
  105. if (gpe_event_info) {
  106. status = acpi_ev_add_gpe_reference(gpe_event_info);
  107. }
  108. acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
  109. return_ACPI_STATUS(status);
  110. }
  111. ACPI_EXPORT_SYMBOL(acpi_enable_gpe)
  112. /*******************************************************************************
  113. *
  114. * FUNCTION: acpi_disable_gpe
  115. *
  116. * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1
  117. * gpe_number - GPE level within the GPE block
  118. *
  119. * RETURN: Status
  120. *
  121. * DESCRIPTION: Remove a reference to a GPE. When the last reference is
  122. * removed, only then is the GPE disabled (for runtime GPEs), or
  123. * the GPE mask bit disabled (for wake GPEs)
  124. *
  125. ******************************************************************************/
  126. acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number)
  127. {
  128. acpi_status status = AE_BAD_PARAMETER;
  129. struct acpi_gpe_event_info *gpe_event_info;
  130. acpi_cpu_flags flags;
  131. ACPI_FUNCTION_TRACE(acpi_disable_gpe);
  132. flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
  133. /* Ensure that we have a valid GPE number */
  134. gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number);
  135. if (gpe_event_info) {
  136. status = acpi_ev_remove_gpe_reference(gpe_event_info) ;
  137. }
  138. acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
  139. return_ACPI_STATUS(status);
  140. }
  141. ACPI_EXPORT_SYMBOL(acpi_disable_gpe)
  142. /*******************************************************************************
  143. *
  144. * FUNCTION: acpi_setup_gpe_for_wake
  145. *
  146. * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1
  147. * gpe_number - GPE level within the GPE block
  148. *
  149. * RETURN: Status
  150. *
  151. * DESCRIPTION: Set the ACPI_GPE_CAN_WAKE flag for the given GPE. If the GPE
  152. * has a corresponding method and is currently enabled, disable it
  153. * (GPEs with corresponding methods are enabled unconditionally
  154. * during initialization, but GPEs that can wake up are expected
  155. * to be initially disabled).
  156. *
  157. ******************************************************************************/
  158. acpi_status acpi_setup_gpe_for_wake(acpi_handle gpe_device, u32 gpe_number)
  159. {
  160. acpi_status status = AE_OK;
  161. struct acpi_gpe_event_info *gpe_event_info;
  162. acpi_cpu_flags flags;
  163. ACPI_FUNCTION_TRACE(acpi_setup_gpe_for_wake);
  164. flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
  165. /* Ensure that we have a valid GPE number */
  166. gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number);
  167. if (gpe_event_info) {
  168. gpe_event_info->flags |= ACPI_GPE_CAN_WAKE;
  169. } else {
  170. status = AE_BAD_PARAMETER;
  171. }
  172. acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
  173. return_ACPI_STATUS(status);
  174. }
  175. ACPI_EXPORT_SYMBOL(acpi_setup_gpe_for_wake)
  176. /*******************************************************************************
  177. *
  178. * FUNCTION: acpi_set_gpe_wake_mask
  179. *
  180. * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1
  181. * gpe_number - GPE level within the GPE block
  182. * Action - Enable or Disable
  183. *
  184. * RETURN: Status
  185. *
  186. * DESCRIPTION: Set or clear the GPE's wakeup enable mask bit.
  187. *
  188. ******************************************************************************/
  189. acpi_status acpi_set_gpe_wake_mask(acpi_handle gpe_device, u32 gpe_number, u8 action)
  190. {
  191. acpi_status status = AE_OK;
  192. struct acpi_gpe_event_info *gpe_event_info;
  193. struct acpi_gpe_register_info *gpe_register_info;
  194. acpi_cpu_flags flags;
  195. u32 register_bit;
  196. ACPI_FUNCTION_TRACE(acpi_set_gpe_wake_mask);
  197. flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
  198. /* Ensure that we have a valid GPE number */
  199. gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number);
  200. if (!gpe_event_info) {
  201. status = AE_BAD_PARAMETER;
  202. goto unlock_and_exit;
  203. }
  204. if (!(gpe_event_info->flags & ACPI_GPE_CAN_WAKE)) {
  205. status = AE_TYPE;
  206. goto unlock_and_exit;
  207. }
  208. gpe_register_info = gpe_event_info->register_info;
  209. if (!gpe_register_info) {
  210. status = AE_NOT_EXIST;
  211. goto unlock_and_exit;
  212. }
  213. register_bit =
  214. acpi_hw_get_gpe_register_bit(gpe_event_info, gpe_register_info);
  215. /* Perform the action */
  216. switch (action) {
  217. case ACPI_GPE_ENABLE:
  218. ACPI_SET_BIT(gpe_register_info->enable_for_wake,
  219. (u8)register_bit);
  220. break;
  221. case ACPI_GPE_DISABLE:
  222. ACPI_CLEAR_BIT(gpe_register_info->enable_for_wake,
  223. (u8)register_bit);
  224. break;
  225. default:
  226. ACPI_ERROR((AE_INFO, "%u, Invalid action", action));
  227. status = AE_BAD_PARAMETER;
  228. break;
  229. }
  230. unlock_and_exit:
  231. acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
  232. return_ACPI_STATUS(status);
  233. }
  234. ACPI_EXPORT_SYMBOL(acpi_set_gpe_wake_mask)
  235. /*******************************************************************************
  236. *
  237. * FUNCTION: acpi_clear_gpe
  238. *
  239. * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1
  240. * gpe_number - GPE level within the GPE block
  241. *
  242. * RETURN: Status
  243. *
  244. * DESCRIPTION: Clear an ACPI event (general purpose)
  245. *
  246. ******************************************************************************/
  247. acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number)
  248. {
  249. acpi_status status = AE_OK;
  250. struct acpi_gpe_event_info *gpe_event_info;
  251. acpi_cpu_flags flags;
  252. ACPI_FUNCTION_TRACE(acpi_clear_gpe);
  253. flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
  254. /* Ensure that we have a valid GPE number */
  255. gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number);
  256. if (!gpe_event_info) {
  257. status = AE_BAD_PARAMETER;
  258. goto unlock_and_exit;
  259. }
  260. status = acpi_hw_clear_gpe(gpe_event_info);
  261. unlock_and_exit:
  262. acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
  263. return_ACPI_STATUS(status);
  264. }
  265. ACPI_EXPORT_SYMBOL(acpi_clear_gpe)
  266. /*******************************************************************************
  267. *
  268. * FUNCTION: acpi_get_gpe_status
  269. *
  270. * PARAMETERS: gpe_device - Parent GPE Device. NULL for GPE0/GPE1
  271. * gpe_number - GPE level within the GPE block
  272. * event_status - Where the current status of the event will
  273. * be returned
  274. *
  275. * RETURN: Status
  276. *
  277. * DESCRIPTION: Get status of an event (general purpose)
  278. *
  279. ******************************************************************************/
  280. acpi_status
  281. acpi_get_gpe_status(acpi_handle gpe_device,
  282. u32 gpe_number, acpi_event_status *event_status)
  283. {
  284. acpi_status status = AE_OK;
  285. struct acpi_gpe_event_info *gpe_event_info;
  286. acpi_cpu_flags flags;
  287. ACPI_FUNCTION_TRACE(acpi_get_gpe_status);
  288. flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
  289. /* Ensure that we have a valid GPE number */
  290. gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number);
  291. if (!gpe_event_info) {
  292. status = AE_BAD_PARAMETER;
  293. goto unlock_and_exit;
  294. }
  295. /* Obtain status on the requested GPE number */
  296. status = acpi_hw_get_gpe_status(gpe_event_info, event_status);
  297. if (gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK)
  298. *event_status |= ACPI_EVENT_FLAG_HANDLE;
  299. unlock_and_exit:
  300. acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
  301. return_ACPI_STATUS(status);
  302. }
  303. ACPI_EXPORT_SYMBOL(acpi_get_gpe_status)
  304. /******************************************************************************
  305. *
  306. * FUNCTION: acpi_disable_all_gpes
  307. *
  308. * PARAMETERS: None
  309. *
  310. * RETURN: Status
  311. *
  312. * DESCRIPTION: Disable and clear all GPEs in all GPE blocks
  313. *
  314. ******************************************************************************/
  315. acpi_status acpi_disable_all_gpes(void)
  316. {
  317. acpi_status status;
  318. ACPI_FUNCTION_TRACE(acpi_disable_all_gpes);
  319. status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS);
  320. if (ACPI_FAILURE(status)) {
  321. return_ACPI_STATUS(status);
  322. }
  323. status = acpi_hw_disable_all_gpes();
  324. (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
  325. return_ACPI_STATUS(status);
  326. }
  327. ACPI_EXPORT_SYMBOL(acpi_disable_all_gpes)
  328. /******************************************************************************
  329. *
  330. * FUNCTION: acpi_enable_all_runtime_gpes
  331. *
  332. * PARAMETERS: None
  333. *
  334. * RETURN: Status
  335. *
  336. * DESCRIPTION: Enable all "runtime" GPEs, in all GPE blocks
  337. *
  338. ******************************************************************************/
  339. acpi_status acpi_enable_all_runtime_gpes(void)
  340. {
  341. acpi_status status;
  342. ACPI_FUNCTION_TRACE(acpi_enable_all_runtime_gpes);
  343. status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS);
  344. if (ACPI_FAILURE(status)) {
  345. return_ACPI_STATUS(status);
  346. }
  347. status = acpi_hw_enable_all_runtime_gpes();
  348. (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
  349. return_ACPI_STATUS(status);
  350. }
  351. ACPI_EXPORT_SYMBOL(acpi_enable_all_runtime_gpes)
  352. /*******************************************************************************
  353. *
  354. * FUNCTION: acpi_install_gpe_block
  355. *
  356. * PARAMETERS: gpe_device - Handle to the parent GPE Block Device
  357. * gpe_block_address - Address and space_iD
  358. * register_count - Number of GPE register pairs in the block
  359. * interrupt_number - H/W interrupt for the block
  360. *
  361. * RETURN: Status
  362. *
  363. * DESCRIPTION: Create and Install a block of GPE registers
  364. *
  365. ******************************************************************************/
  366. acpi_status
  367. acpi_install_gpe_block(acpi_handle gpe_device,
  368. struct acpi_generic_address *gpe_block_address,
  369. u32 register_count, u32 interrupt_number)
  370. {
  371. acpi_status status;
  372. union acpi_operand_object *obj_desc;
  373. struct acpi_namespace_node *node;
  374. struct acpi_gpe_block_info *gpe_block;
  375. ACPI_FUNCTION_TRACE(acpi_install_gpe_block);
  376. if ((!gpe_device) || (!gpe_block_address) || (!register_count)) {
  377. return_ACPI_STATUS(AE_BAD_PARAMETER);
  378. }
  379. status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
  380. if (ACPI_FAILURE(status)) {
  381. return (status);
  382. }
  383. node = acpi_ns_validate_handle(gpe_device);
  384. if (!node) {
  385. status = AE_BAD_PARAMETER;
  386. goto unlock_and_exit;
  387. }
  388. /*
  389. * For user-installed GPE Block Devices, the gpe_block_base_number
  390. * is always zero
  391. */
  392. status =
  393. acpi_ev_create_gpe_block(node, gpe_block_address, register_count, 0,
  394. interrupt_number, &gpe_block);
  395. if (ACPI_FAILURE(status)) {
  396. goto unlock_and_exit;
  397. }
  398. /* Install block in the device_object attached to the node */
  399. obj_desc = acpi_ns_get_attached_object(node);
  400. if (!obj_desc) {
  401. /*
  402. * No object, create a new one (Device nodes do not always have
  403. * an attached object)
  404. */
  405. obj_desc = acpi_ut_create_internal_object(ACPI_TYPE_DEVICE);
  406. if (!obj_desc) {
  407. status = AE_NO_MEMORY;
  408. goto unlock_and_exit;
  409. }
  410. status =
  411. acpi_ns_attach_object(node, obj_desc, ACPI_TYPE_DEVICE);
  412. /* Remove local reference to the object */
  413. acpi_ut_remove_reference(obj_desc);
  414. if (ACPI_FAILURE(status)) {
  415. goto unlock_and_exit;
  416. }
  417. }
  418. /* Now install the GPE block in the device_object */
  419. obj_desc->device.gpe_block = gpe_block;
  420. unlock_and_exit:
  421. (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
  422. return_ACPI_STATUS(status);
  423. }
  424. ACPI_EXPORT_SYMBOL(acpi_install_gpe_block)
  425. /*******************************************************************************
  426. *
  427. * FUNCTION: acpi_remove_gpe_block
  428. *
  429. * PARAMETERS: gpe_device - Handle to the parent GPE Block Device
  430. *
  431. * RETURN: Status
  432. *
  433. * DESCRIPTION: Remove a previously installed block of GPE registers
  434. *
  435. ******************************************************************************/
  436. acpi_status acpi_remove_gpe_block(acpi_handle gpe_device)
  437. {
  438. union acpi_operand_object *obj_desc;
  439. acpi_status status;
  440. struct acpi_namespace_node *node;
  441. ACPI_FUNCTION_TRACE(acpi_remove_gpe_block);
  442. if (!gpe_device) {
  443. return_ACPI_STATUS(AE_BAD_PARAMETER);
  444. }
  445. status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
  446. if (ACPI_FAILURE(status)) {
  447. return (status);
  448. }
  449. node = acpi_ns_validate_handle(gpe_device);
  450. if (!node) {
  451. status = AE_BAD_PARAMETER;
  452. goto unlock_and_exit;
  453. }
  454. /* Get the device_object attached to the node */
  455. obj_desc = acpi_ns_get_attached_object(node);
  456. if (!obj_desc || !obj_desc->device.gpe_block) {
  457. return_ACPI_STATUS(AE_NULL_OBJECT);
  458. }
  459. /* Delete the GPE block (but not the device_object) */
  460. status = acpi_ev_delete_gpe_block(obj_desc->device.gpe_block);
  461. if (ACPI_SUCCESS(status)) {
  462. obj_desc->device.gpe_block = NULL;
  463. }
  464. unlock_and_exit:
  465. (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
  466. return_ACPI_STATUS(status);
  467. }
  468. ACPI_EXPORT_SYMBOL(acpi_remove_gpe_block)
  469. /*******************************************************************************
  470. *
  471. * FUNCTION: acpi_get_gpe_device
  472. *
  473. * PARAMETERS: Index - System GPE index (0-current_gpe_count)
  474. * gpe_device - Where the parent GPE Device is returned
  475. *
  476. * RETURN: Status
  477. *
  478. * DESCRIPTION: Obtain the GPE device associated with the input index. A NULL
  479. * gpe device indicates that the gpe number is contained in one of
  480. * the FADT-defined gpe blocks. Otherwise, the GPE block device.
  481. *
  482. ******************************************************************************/
  483. acpi_status
  484. acpi_get_gpe_device(u32 index, acpi_handle *gpe_device)
  485. {
  486. struct acpi_gpe_device_info info;
  487. acpi_status status;
  488. ACPI_FUNCTION_TRACE(acpi_get_gpe_device);
  489. if (!gpe_device) {
  490. return_ACPI_STATUS(AE_BAD_PARAMETER);
  491. }
  492. if (index >= acpi_current_gpe_count) {
  493. return_ACPI_STATUS(AE_NOT_EXIST);
  494. }
  495. /* Setup and walk the GPE list */
  496. info.index = index;
  497. info.status = AE_NOT_EXIST;
  498. info.gpe_device = NULL;
  499. info.next_block_base_index = 0;
  500. status = acpi_ev_walk_gpe_list(acpi_ev_get_gpe_device, &info);
  501. if (ACPI_FAILURE(status)) {
  502. return_ACPI_STATUS(status);
  503. }
  504. *gpe_device = ACPI_CAST_PTR(acpi_handle, info.gpe_device);
  505. return_ACPI_STATUS(info.status);
  506. }
  507. ACPI_EXPORT_SYMBOL(acpi_get_gpe_device)