RE: [PATCH] acpi: update return value in EC gpe handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm not sure that this is the correct thing to do.

ACPI_REENABLE_GPE is a new GPE handler return value that implies to ACPICA that the GPE has been fully handled within the (synchronous, interrupt-level) GPE handler and is ready to be cleared (if necessary) and re-enabled.

The acpi_finish_gpe is a new interface does the same thing, but is intended to be called from an asynchronous GPE handler after the GPE processing is completed. It looks to me that the EC GPE handler is mostly asynchronous, so I suspect that somewhere in the EC driver, a call to acpi_finish_gpe should replace a couple of calls to clear the GPE and re-enable it. That is the purpose of this interface, to relieve the handler of deciding whether to clear the GPE or not (level vs. edge) and then re-enabling it.

Bob


-----Original Message-----
From: Lin, Ming M 
Sent: Tuesday, December 14, 2010 11:47 PM
To: lenb
Cc: Moore, Robert; Rafael J. Wysocki; linux-acpi
Subject: [PATCH] acpi: update return value in EC gpe handler

EC gpe handler should return ACPI_REENABLE_GPE, so acpi_ev_gpe_dispatch
can clear and reenable the GPE.

Signed-off-by: Lin Ming <ming.m.lin@xxxxxxxxx>
---

Len, 

I forgot to update EC gpe handler return value in the series of 
"[PATCH v2 0/8] Minimize ACPICA/linux GPE code divergence".
This is the fix.

 drivers/acpi/ec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index e15439a..8a0e907 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -619,7 +619,7 @@ static u32 acpi_ec_gpe_handler(acpi_handle gpe_device,
 		wake_up(&ec->wait);
 		ec_check_sci(ec, acpi_ec_read_status(ec));
 	}
-	return ACPI_INTERRUPT_HANDLED;
+	return ACPI_REENABLE_GPE;
 }
 
 /* --------------------------------------------------------------------------


ÿô.nlj·Ÿ®‰­†+%ŠË±é¥Šwÿº{.nlj·¥Š{±ý¶›¡Ü}©ž²ÆzÚj:+v‰¨þø®w¥þŠàÞ¨è&¢)ß«a¶Úÿûz¹ÞúŽŠÝjÿŠwèf



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux