From patchwork Wed Mar 4 10:54:09 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Hughes X-Patchwork-Id: 9835 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 n24AtQrb021943 for ; Wed, 4 Mar 2009 10:55:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753627AbZCDKz0 (ORCPT ); Wed, 4 Mar 2009 05:55:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753578AbZCDKz0 (ORCPT ); Wed, 4 Mar 2009 05:55:26 -0500 Received: from yx-out-2324.google.com ([74.125.44.29]:43320 "EHLO yx-out-2324.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753445AbZCDKzZ (ORCPT ); Wed, 4 Mar 2009 05:55:25 -0500 Received: by yx-out-2324.google.com with SMTP id 8so2117950yxm.1 for ; Wed, 04 Mar 2009 02:55:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer; bh=YwFfFHqjIrACUNlnv3SgVmjndtXT38ma9ZvN1tCvlgc=; b=p7QM2exwUPwQgU16prqzqEUvdIsb60QKceiQXkjTFNio80fEWviElQCpJET2HInsjq tsPRrBM8lvyMilQIf+Cg8//Y00TqcOBddmSxIWK2w/W2W/5igmizY1D+cykSpGDxOGnP gIAKlnbpeeA/7dY1LgYHc/tNCjqz7cftFDFCc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer; b=do61IfRUiJPsuxfjKIKxniykkJ6EawUsIDyXXoQc3vYmt849PyN1fNrrE5JkHE5dxe VlxBFMGZY5G2mHK2DCRSz5XFCSLTQ98r+qWtBBdU2ZZWLePVtv4ax1weruhviV9KrdPg 6U0kmJ1x0x8hz5N9XL/Ald48pwku9W7YSOD9A= Received: by 10.100.43.10 with SMTP id q10mr6521398anq.1.1236164122225; Wed, 04 Mar 2009 02:55:22 -0800 (PST) Received: from ?192.168.1.64? ([78.86.247.183]) by mx.google.com with ESMTPS id b14sm6442722ana.36.2009.03.04.02.55.20 (version=SSLv3 cipher=RC4-MD5); Wed, 04 Mar 2009 02:55:21 -0800 (PST) Subject: [PATCH] thinkpad-acpi: use correct key names for sleep states in driver From: Richard Hughes To: Henrique de Moraes Holschuh Cc: linux-acpi , Peter Hutterer , mjg , linux-input , Matthias Clasen In-Reply-To: <20090302112400.GA2356@khazad-dum.debian.net> References: <1235992429.3858.58.camel@hughsie-work.lan> <20090302112400.GA2356@khazad-dum.debian.net> Date: Wed, 04 Mar 2009 10:54:09 +0000 Message-Id: <1236164049.3936.17.camel@hughsie-work.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.25.91 (2.25.91-3.fc11) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Mon, 2009-03-02 at 08:24 -0300, Henrique de Moraes Holschuh wrote: > FWIW, I think it is a good idea, and I'd take patches for > thinkpad-acpi. Patch attached for thinkpad-acpi. KEY_HIBERNATE is already in linux-next, but has not yet been pushed to master. Please review, thanks. Richard. Acked-by: Henrique de Moraes Holschuh From d3ce499f80ba7526e83e7b16f85124ccf77ac1f4 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Wed, 4 Mar 2009 10:51:52 +0000 Subject: thinkpad-acpi: use correct key names for sleep keys in driver Use the new key KEY_HIBERNATE and correct the use of KEY_SUSPEND. KEY_HIBERNATE is used when the decal on the key indicates sleep to disk, KEY_SUSPEND is used when the decal indicates sleep to memory, and KEY_SLEEP is used when the sleep type is unknown or unspecified We've already converted Xorg, HAL, and most of userspace to use the same names. With this patch, the sleep keys can be labeled consistently all the way through the stack. More patches to other device drivers are to follow. Signed-off-by: Richard Hughes --- drivers/platform/x86/thinkpad_acpi.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index bcbc051..d89015d 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -2241,9 +2241,9 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) */ static u16 ibm_keycode_map[] __initdata = { /* Scan Codes 0x00 to 0x0B: ACPI HKEY FN+F1..F12 */ - KEY_FN_F1, KEY_FN_F2, KEY_COFFEE, KEY_SLEEP, + KEY_FN_F1, KEY_FN_F2, KEY_COFFEE, KEY_SUSPEND, KEY_WLAN, KEY_FN_F6, KEY_SWITCHVIDEOMODE, KEY_FN_F8, - KEY_FN_F9, KEY_FN_F10, KEY_FN_F11, KEY_SUSPEND, + KEY_FN_F9, KEY_FN_F10, KEY_FN_F11, KEY_HIBERNATE, /* Scan codes 0x0C to 0x1F: Other ACPI HKEY hot keys */ KEY_UNKNOWN, /* 0x0C: FN+BACKSPACE */ @@ -2277,9 +2277,9 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) }; static u16 lenovo_keycode_map[] __initdata = { /* Scan Codes 0x00 to 0x0B: ACPI HKEY FN+F1..F12 */ - KEY_FN_F1, KEY_COFFEE, KEY_BATTERY, KEY_SLEEP, + KEY_FN_F1, KEY_COFFEE, KEY_BATTERY, KEY_SUSPEND, KEY_WLAN, KEY_FN_F6, KEY_SWITCHVIDEOMODE, KEY_FN_F8, - KEY_FN_F9, KEY_FN_F10, KEY_FN_F11, KEY_SUSPEND, + KEY_FN_F9, KEY_FN_F10, KEY_FN_F11, KEY_HIBERNATE, /* Scan codes 0x0C to 0x1F: Other ACPI HKEY hot keys */ KEY_UNKNOWN, /* 0x0C: FN+BACKSPACE */ -- 1.6.1.3