Sergey Dolgov wrote:
> On Mon, Aug 13, 2007 at 07:44:48PM +0100, Hugh Dickins wrote:
>
>
>> Git bisection (with manual fixups to i386 mmiocfg horror, thanks
>> for drawing attention to that in your changelog) accuses Alexey's
>> ACPI: EC: If ECDT is not found, look up EC in DSDT
>> cd8c93a4e04dce8f00d1ef3a476aac8bd65ae40b
>> and if I revert that along with Len's subsequent
>> ACPI: EC: fix build warning
>> 52fe4bdf40bc07498c5f7935551774e8f8458190
>> then I have Fn-F4 suspending to RAM again.
>>
>>
>
> I've also noticed a regression since -rc2 in battery status reporting
> on my HP nx7300 laptop: the output of
>
> cat /proc/acpi/battery/C1BE/state
>
> does not change after this file has been read for the the first time;
> for exaple, the line "charging state: charged" does not change to
> "charging state: discharging" upon unplugging the power cord.
>
> Reverting the above 2 commits fixes this issue for me.
>
> --
> Sergey
>
Function to register query methods (means by which EC talks to ACPI)
was deleted by mistake.
Could you please try the attached patch?
Sorry for all the trouble, and thanks for bisect.
Alex.
ACPI: EC: Fix regression
From: Alexey Starikovskiy <[email protected]>
Undelete call to register query methods.
Signed-off-by: Alexey Starikovskiy <[email protected]>
---
drivers/acpi/ec.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 2300d81..56bee9e 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -652,6 +652,19 @@ static struct acpi_ec *make_acpi_ec(void)
}
static acpi_status
+acpi_ec_register_query_methods(acpi_handle handle, u32 level,
+ void *context, void **return_value)
+{
+ struct acpi_namespace_node *node = handle;
+ struct acpi_ec *ec = context;
+ int value = 0;
+ if (sscanf(node->name.ascii, "_Q%x", &value) == 1) {
+ acpi_ec_add_query_handler(ec, value, handle, NULL, NULL);
+ }
+ return AE_OK;
+}
+
+static acpi_status
ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
{
acpi_status status;
@@ -668,6 +681,10 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
if (ACPI_FAILURE(status))
return status;
+ /* Find and register all query methods */
+ acpi_walk_namespace(ACPI_TYPE_METHOD, handle, 1,
+ acpi_ec_register_query_methods, ec, NULL);
+
/* Use the global lock for all EC transactions? */
acpi_evaluate_integer(handle, "_GLK", NULL, &ec->global_lock);
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]