From patchwork Sun Apr 12 11:26:29 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mattia Dongili X-Patchwork-Id: 17817 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3CBQZqU007056 for ; Sun, 12 Apr 2009 11:26:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758619AbZDLL0f (ORCPT ); Sun, 12 Apr 2009 07:26:35 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759343AbZDLL0f (ORCPT ); Sun, 12 Apr 2009 07:26:35 -0400 Received: from static-220-247-10-204.b-man.svips.gol.ne.jp ([220.247.10.204]:41434 "EHLO smtp.kamineko.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758619AbZDLL0d (ORCPT ); Sun, 12 Apr 2009 07:26:33 -0400 Received: by smtp.kamineko.org (Postfix, from userid 8) id 72B1E6C00E; Sun, 12 Apr 2009 20:26:32 +0900 (JST) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on enma.kamineko.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=ham version=3.2.5 Received: from caligola.kamineko.org (unknown [192.168.1.34]) by smtp.kamineko.org (Postfix) with ESMTP id C8C46390DF; Sun, 12 Apr 2009 20:26:31 +0900 (JST) Received: by caligola.kamineko.org (Postfix, from userid 1000) id 92F2A15FFD; Sun, 12 Apr 2009 20:26:31 +0900 (JST) From: Mattia Dongili To: Len Brown Cc: linux-acpi@vger.kernel.org, "Almer S. Tigelaar" , Mattia Dongili , Alexey Starikovskiy Subject: [PATCH 4/6] ec.c: Fix ACPI EC resume non-query interrupt message Date: Sun, 12 Apr 2009 20:26:29 +0900 Message-Id: <1239535591-15514-5-git-send-email-malattia@linux.it> X-Mailer: git-send-email 1.6.2.2 In-Reply-To: <1239535591-15514-4-git-send-email-malattia@linux.it> References: <1239535591-15514-1-git-send-email-malattia@linux.it> <1239535591-15514-2-git-send-email-malattia@linux.it> <1239535591-15514-3-git-send-email-malattia@linux.it> <1239535591-15514-4-git-send-email-malattia@linux.it> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Almer S. Tigelaar When resuming from standby (on a laptop) I see the following message in my kernel.log: "ACPI: EC: non-query interrupt received, switching to interrupt mode" This apparently prevented sony-laptop to properly restore the brightness level on resume. The cause: In drivers/acpi/ec.c the acpi_ec_suspend function clears the GPE mode bit, but this is not restored in acpi_ec_resume (the function below it). The patch below fixes this by properly restoring the GPE_MODE bit. Tested and confirmed to work. Signed-off-by: Almer S. Tigelaar Signed-off-by: Mattia Dongili Cc: Alexey Starikovskiy --- drivers/acpi/ec.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 04e9044..391f331 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1065,6 +1065,7 @@ static int acpi_ec_resume(struct acpi_device *device) struct acpi_ec *ec = acpi_driver_data(device); /* Enable use of GPE back */ clear_bit(EC_FLAGS_NO_GPE, &ec->flags); + set_bit(EC_FLAGS_GPE_MODE, &ec->flags); acpi_enable_gpe(NULL, ec->gpe); return 0; }