linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Hughes <hughsient@gmail.com>
To: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: linux-acpi <linux-acpi@vger.kernel.org>,
	Peter Hutterer <peter.hutterer@redhat.com>, mjg <mjg@redhat.com>,
	linux-input <linux-input@vger.kernel.org>,
	Matthias Clasen <mclasen@redhat.com>
Subject: [patch] add KEY_HIBERNATE and clarify the uses of KEY_SUSPEND and KEY_SLEEP
Date: Tue, 03 Mar 2009 17:20:18 +0000	[thread overview]
Message-ID: <1236100818.3900.36.camel@hughsie-work.lan> (raw)
In-Reply-To: <1235995903.3858.83.camel@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 142 bytes --]

I've attached a patch that adds KEY_HIBERNATE and clarifies the uses of
KEY_SUSPEND and KEY_SLEEP.

Please consider. Thanks.

Richard Hughes


[-- Attachment #2: 0001-INPUT-add-KEY_HIBERNATE-and-clarify-the-uses-of-KEY.patch --]
[-- Type: text/x-patch, Size: 2150 bytes --]

>From bc161c6e4253d94dee3b1c42dfcf32a0120921a1 Mon Sep 17 00:00:00 2001
From: Richard Hughes <richard@hughsie.com>
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 <hughsient@gmail.com>
---
 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


  reply	other threads:[~2009-03-03 17:20 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-02 11:13 suspend / hibernate nomenclature Richard Hughes
2009-03-02 11:24 ` Henrique de Moraes Holschuh
2009-03-02 12:11   ` Richard Hughes
2009-03-03 17:20     ` Richard Hughes [this message]
2009-03-03 19:53       ` [patch] add KEY_HIBERNATE and clarify the uses of KEY_SUSPEND and KEY_SLEEP Rafael J. Wysocki
2009-03-04  8:42         ` Dmitry Torokhov
2009-03-04 10:54   ` [PATCH] thinkpad-acpi: use correct key names for sleep states in driver Richard Hughes
2009-03-04 10:58     ` [PATCH] panasonic-laptop: " Richard Hughes
2009-03-04 23:58       ` Harald Welte
2009-03-05  9:09         ` Richard Hughes
2009-03-04 11:09     ` [PATCH] DVB-USB: correct the comment about KEY_SLEEP Richard Hughes
2009-03-10 10:31       ` Antti Palosaari
2009-03-04 12:04     ` [PATCH] thinkpad-acpi: use correct key names for sleep states in driver Henrique de Moraes Holschuh
2009-08-18 20:02       ` Yves-Alexis Perez
2009-08-18 20:10         ` Matthew Garrett
2009-08-18 20:27           ` Yves-Alexis Perez
2009-08-18 20:45             ` Matthew Garrett
2009-08-22 18:02               ` Henrique de Moraes Holschuh
2009-08-19  9:18             ` Ali Abdallah
2009-08-26 11:36           ` Yves-Alexis Perez
2009-08-26 13:43             ` Matthew Garrett
2009-08-26 17:52               ` Yves-Alexis Perez
2009-08-26 22:51                 ` Henrique de Moraes Holschuh
2009-08-27  6:18                   ` Dmitry Torokhov
2009-08-28  0:34                     ` Henrique de Moraes Holschuh
2009-03-07  8:37 ` suspend / hibernate nomenclature Andrey Borzenkov
2009-03-07 15:48 ` Matthew Garrett
2009-03-07 16:41   ` Henrique de Moraes Holschuh
2009-03-07 16:48     ` Matthew Garrett
2009-03-07 17:17       ` Henrique de Moraes Holschuh
2009-03-07 20:25       ` Richard Hughes
2009-03-07 20:39         ` Matthew Garrett
2009-03-08  8:45           ` Richard Hughes
2009-03-08 14:41             ` Matthew Garrett
2009-03-08 20:56               ` Rafael J. Wysocki
2009-03-08 23:07                 ` Dmitry Torokhov
2009-03-08 23:19                   ` Matthew Garrett
2009-03-09 13:52                     ` Ville Syrjälä
2009-03-09 14:00                       ` Matthew Garrett
2009-03-09 15:10                         ` Ville Syrjälä
2009-03-09  8:31                   ` Andrey Borzenkov
2009-03-09 13:26                     ` Matthew Garrett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1236100818.3900.36.camel@hughsie-work.lan \
    --to=hughsient@gmail.com \
    --cc=hmh@hmh.eng.br \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=mclasen@redhat.com \
    --cc=mjg@redhat.com \
    --cc=peter.hutterer@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).