evgpe.c (2e578044134b742546a8cf7d49597f34528bdbec) evgpe.c (37d7a5bcc0d1b717c16ee4eb4c6068501bf813fb)
1/******************************************************************************
2 *
3 * Module Name: evgpe - General Purpose Event handling and dispatch
4 *
5 *****************************************************************************/
6
7/******************************************************************************
8 *

--- 302 unchanged lines hidden (view full) ---

311}
312
313
314/*******************************************************************************
315 *
316 * FUNCTION: AcpiEvAddGpeReference
317 *
318 * PARAMETERS: GpeEventInfo - Add a reference to this GPE
1/******************************************************************************
2 *
3 * Module Name: evgpe - General Purpose Event handling and dispatch
4 *
5 *****************************************************************************/
6
7/******************************************************************************
8 *

--- 302 unchanged lines hidden (view full) ---

311}
312
313
314/*******************************************************************************
315 *
316 * FUNCTION: AcpiEvAddGpeReference
317 *
318 * PARAMETERS: GpeEventInfo - Add a reference to this GPE
319 * ClearOnEnable - Clear GPE status before enabling it
319 *
320 * RETURN: Status
321 *
322 * DESCRIPTION: Add a reference to a GPE. On the first reference, the GPE is
323 * hardware-enabled.
324 *
325 ******************************************************************************/
326
327ACPI_STATUS
328AcpiEvAddGpeReference (
320 *
321 * RETURN: Status
322 *
323 * DESCRIPTION: Add a reference to a GPE. On the first reference, the GPE is
324 * hardware-enabled.
325 *
326 ******************************************************************************/
327
328ACPI_STATUS
329AcpiEvAddGpeReference (
329 ACPI_GPE_EVENT_INFO *GpeEventInfo)
330 ACPI_GPE_EVENT_INFO *GpeEventInfo,
331 BOOLEAN ClearOnEnable)
330{
331 ACPI_STATUS Status = AE_OK;
332
333
334 ACPI_FUNCTION_TRACE (EvAddGpeReference);
335
336
337 if (GpeEventInfo->RuntimeCount == ACPI_UINT8_MAX)
338 {
339 return_ACPI_STATUS (AE_LIMIT);
340 }
341
342 GpeEventInfo->RuntimeCount++;
343 if (GpeEventInfo->RuntimeCount == 1)
344 {
345 /* Enable on first reference */
346
332{
333 ACPI_STATUS Status = AE_OK;
334
335
336 ACPI_FUNCTION_TRACE (EvAddGpeReference);
337
338
339 if (GpeEventInfo->RuntimeCount == ACPI_UINT8_MAX)
340 {
341 return_ACPI_STATUS (AE_LIMIT);
342 }
343
344 GpeEventInfo->RuntimeCount++;
345 if (GpeEventInfo->RuntimeCount == 1)
346 {
347 /* Enable on first reference */
348
349 if (ClearOnEnable)
350 {
351 (void) AcpiHwClearGpe (GpeEventInfo);
352 }
353
347 Status = AcpiEvUpdateGpeEnableMask (GpeEventInfo);
348 if (ACPI_SUCCESS (Status))
349 {
350 Status = AcpiEvEnableGpe (GpeEventInfo);
351 }
352
353 if (ACPI_FAILURE (Status))
354 {

--- 700 unchanged lines hidden ---
354 Status = AcpiEvUpdateGpeEnableMask (GpeEventInfo);
355 if (ACPI_SUCCESS (Status))
356 {
357 Status = AcpiEvEnableGpe (GpeEventInfo);
358 }
359
360 if (ACPI_FAILURE (Status))
361 {

--- 700 unchanged lines hidden ---