From patchwork Sat Sep 12 18:22:17 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henrique de Moraes Holschuh X-Patchwork-Id: 47102 X-Patchwork-Delegate: lenb@kernel.org 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 n8CIMRJV018286 for ; Sat, 12 Sep 2009 18:22:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754755AbZILSW3 (ORCPT ); Sat, 12 Sep 2009 14:22:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754695AbZILSW2 (ORCPT ); Sat, 12 Sep 2009 14:22:28 -0400 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:32899 "EHLO out1.smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754558AbZILSWX (ORCPT ); Sat, 12 Sep 2009 14:22:23 -0400 Received: from compute1.internal (compute1.internal [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id B46726BC38; Sat, 12 Sep 2009 14:22:26 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Sat, 12 Sep 2009 14:22:26 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=from:to:cc:subject:date:message-id:in-reply-to:references; s=smtpout; bh=Z71xfyiEPFLCtaPd8yDBJZyqpis=; b=DImK8DCkbRiO9ufNFMtMChYHyDt8PMoGN66egx2LznIhUouw4ud5zDzkig6wnY095ALkIUNGjKbQQxfSRbUmhKNAtlb9Mgpbyr1nq2+wh8anPjVrdDAnhclhjKaOQO0Jwz3rpWI8bbrxpBpkTWOX0Ys8eJPoL4jG4fj6cN//a/s= X-Sasl-enc: xuyIAYxJc1CCOSB2x/ba/32Y1sEckxCLPUFXDABOYmN3 1252779746 Received: from thorin.khazad-dum.debian.net (unknown [201.82.170.176]) by mail.messagingengine.com (Postfix) with ESMTPSA id 64F9727BE8; Sat, 12 Sep 2009 14:22:26 -0400 (EDT) Received: by thorin.khazad-dum.debian.net (Postfix, from userid 1000) id F0ED11E979A; Sat, 12 Sep 2009 15:22:22 -0300 (BRT) From: Henrique de Moraes Holschuh To: Len Brown Cc: linux-acpi@vger.kernel.org, ibm-acpi-devel@lists.sourceforge.net, Henrique de Moraes Holschuh Subject: [PATCH 7/8] thinkpad-acpi: don't poll by default any of the reserved hotkeys Date: Sat, 12 Sep 2009 15:22:17 -0300 Message-Id: <1252779738-7459-8-git-send-email-hmh@hmh.eng.br> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1252779738-7459-1-git-send-email-hmh@hmh.eng.br> References: <1252779738-7459-1-git-send-email-hmh@hmh.eng.br> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Init hotkey_source_mask late, so that we can make use of hotkey_reserved_mask to avoid polling any of the reserved hotkeys by default. Signed-off-by: Henrique de Moraes Holschuh --- drivers/platform/x86/thinkpad_acpi.c | 28 +++++++++++++++------------- 1 files changed, 15 insertions(+), 13 deletions(-) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index dd779e5..9c3bb0c 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -3062,19 +3062,6 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) goto err_exit; } -#ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL - if (tp_features.hotkey_mask) { - hotkey_source_mask = TPACPI_HKEY_NVRAM_GOOD_MASK - & ~hotkey_all_mask; - } else { - hotkey_source_mask = TPACPI_HKEY_NVRAM_GOOD_MASK; - } - - vdbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_HKEY, - "hotkey source mask 0x%08x, polling freq %u\n", - hotkey_source_mask, hotkey_poll_freq); -#endif - #ifdef CONFIG_THINKPAD_ACPI_DEBUGFACILITIES if (dbg_wlswemul) { tp_features.hotkey_wlsw = 1; @@ -3186,6 +3173,21 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) | (1 << TP_ACPI_HOTKEYSCAN_FNEND); } +#ifdef CONFIG_THINKPAD_ACPI_HOTKEY_POLL + if (tp_features.hotkey_mask) { + hotkey_source_mask = TPACPI_HKEY_NVRAM_GOOD_MASK + & ~hotkey_all_mask + & ~hotkey_reserved_mask; + } else { + hotkey_source_mask = TPACPI_HKEY_NVRAM_GOOD_MASK + & ~hotkey_reserved_mask; + } + + vdbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_HKEY, + "hotkey source mask 0x%08x, polling freq %u\n", + hotkey_source_mask, hotkey_poll_freq); +#endif + dbg_printk(TPACPI_DBG_INIT | TPACPI_DBG_HKEY, "enabling firmware HKEY event interface...\n"); res = hotkey_status_set(true);