From patchwork Tue Mar 3 17:20:18 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Hughes X-Patchwork-Id: 9742 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 n23HLEFg016535 for ; Tue, 3 Mar 2009 17:21:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752864AbZCCRVN (ORCPT ); Tue, 3 Mar 2009 12:21:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753359AbZCCRVN (ORCPT ); Tue, 3 Mar 2009 12:21:13 -0500 Received: from mail-ew0-f177.google.com ([209.85.219.177]:59243 "EHLO mail-ew0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752864AbZCCRVM (ORCPT ); Tue, 3 Mar 2009 12:21:12 -0500 Received: by ewy25 with SMTP id 25so2414806ewy.37 for ; Tue, 03 Mar 2009 09:21:09 -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=p55rFnYMJVEO2qapgn2VEkSqbDSIv6zi3DnhSkHqcfs=; b=RXtXpj2qsdxZZo5fre+rRIPAfvT0RGiWoaXcxFUrthusy9HCXjufKh35n+GkrnxnBF WorTt+waIv9NWJk6TSlZZbJPB+PK59gQv9AOzWCFSMfDxFsnLnWOFJQw467sMY/UdD6c Kqt3duUyNY6djgxDmHX+VT2bjOK2Xwt0+CeHc= 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=uMHzoR9LI91e6y0LG0QfEMFW7SCvsYtcRZeshyh7R/AtkXPSiSO1YjG+lAeGvrU5Bl jCi9YY8eFEeoUHjXOEBfz9JUsIYHiwko6EkV22RKJTUZk+6I/A0KIvnjWom/+mWn6+RG A56qHSyP3a5KN03q/qoBRqVimwihLyfZLeNWA= Received: by 10.216.54.194 with SMTP id i44mr326114wec.93.1236100869134; Tue, 03 Mar 2009 09:21:09 -0800 (PST) Received: from ?192.168.1.71? ([78.86.247.183]) by mx.google.com with ESMTPS id 23sm582578eya.56.2009.03.03.09.21.07 (version=SSLv3 cipher=RC4-MD5); Tue, 03 Mar 2009 09:21:08 -0800 (PST) Subject: [patch] add KEY_HIBERNATE and clarify the uses of KEY_SUSPEND and KEY_SLEEP From: Richard Hughes To: Henrique de Moraes Holschuh Cc: linux-acpi , Peter Hutterer , mjg , linux-input , Matthias Clasen In-Reply-To: <1235995903.3858.83.camel@localhost.localdomain> References: <1235992429.3858.58.camel@hughsie-work.lan> <20090302112400.GA2356@khazad-dum.debian.net> <1235995903.3858.83.camel@localhost.localdomain> Date: Tue, 03 Mar 2009 17:20:18 +0000 Message-Id: <1236100818.3900.36.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 I've attached a patch that adds KEY_HIBERNATE and clarifies the uses of KEY_SUSPEND and KEY_SLEEP. Please consider. Thanks. Richard Hughes From bc161c6e4253d94dee3b1c42dfcf32a0120921a1 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Tue, 3 Mar 2009 17:16:49 +0000 Subject: [PATCH] INPUT: add KEY_HIBERNATE and clarify the uses of KEY_SUSPEND and KEY_SLEEP Add a new key define that is used for sleeping to disk. In userspace we've agreed with the following nomenclature: - standby = sleep CPU and devices (not really used any more) - suspend = sleep to memory (quite fast) - hibernate = sleep to disk (slow) We've already converted Xorg, HAL, and most of userspace to use the same names. Adding a new key should reduce the confusion where: KEY_SUSPEND was mapped to XF86Standby, XF86Hibernate or XF86Sleep KEY_SLEEP was mapped to XF86Hibernate or XF86Standby With this patch, the sleep keys can be labeled consistently all the way through the stack. Other patches to device drivers are to follow. Signed-off-by: Richard Hughes --- include/linux/input.h | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/input.h b/include/linux/input.h index 1249a0c..f5dee33 100644 --- a/include/linux/input.h +++ b/include/linux/input.h @@ -263,7 +263,7 @@ struct input_absinfo { #define KEY_MENU 139 /* Menu (show menu) */ #define KEY_CALC 140 /* AL Calculator */ #define KEY_SETUP 141 -#define KEY_SLEEP 142 /* SC System Sleep */ +#define KEY_SLEEP 142 /* SC System Sleep (either RAM or disk) */ #define KEY_WAKEUP 143 /* System Wake Up */ #define KEY_FILE 144 /* AL Local Machine Browser */ #define KEY_SENDFILE 145 @@ -324,7 +324,7 @@ struct input_absinfo { #define KEY_PROG3 202 #define KEY_PROG4 203 #define KEY_DASHBOARD 204 /* AL Dashboard */ -#define KEY_SUSPEND 205 +#define KEY_SUSPEND 205 /* Sleep state, typically to RAM */ #define KEY_CLOSE 206 /* AC Close */ #define KEY_PLAY 207 #define KEY_FASTFORWARD 208 @@ -375,6 +375,8 @@ struct input_absinfo { #define KEY_WIMAX 246 +#define KEY_HIBERNATE 247 /* Sleep state, typically to disk */ + /* Range 248 - 255 is reserved for special needs of AT keyboard driver */ #define BTN_MISC 0x100 -- 1.6.1.3