From patchwork Wed Mar 4 10:58:26 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Hughes X-Patchwork-Id: 9836 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 n24AxMGg022149 for ; Wed, 4 Mar 2009 10:59:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752020AbZCDK7W (ORCPT ); Wed, 4 Mar 2009 05:59:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752816AbZCDK7W (ORCPT ); Wed, 4 Mar 2009 05:59:22 -0500 Received: from an-out-0708.google.com ([209.85.132.244]:30271 "EHLO an-out-0708.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752020AbZCDK7V (ORCPT ); Wed, 4 Mar 2009 05:59:21 -0500 Received: by an-out-0708.google.com with SMTP id c2so2349575anc.1 for ; Wed, 04 Mar 2009 02:59:19 -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=kgdvWe9sCjqrsDIwzNkb+FdQN5i/9lt03fSzDGtYVSM=; b=b+OP63scqgVdWrfv6P/K2GN8tI9DZ4dtN4GQeUVY8byHwpMYcvb15nUssfbQfIL1sG GBte8E4TlFjzU6//6zXVOsegP5/9QUiNZdSJYtGdKfotZfb5wtJ5QxY+HmV/zdBFbCS/ vh06L9IsRUTV32huPPkOOWx8iVWn17514q55I= 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=HmksDOFVISKkJLW6RUf7qqeaAgyC4CsTniuPyBzANBOxIla953rPh/2Mk/aWPa9n0u +CtQ9axbskyRFAjiZlnwxpUFx4sD/i2iaYKwOGRjwAS7VxEGq3qI9mkc5myPqlnP2C46 dcsRKxarlYexlsUB3ZpmQdeoJwI5AfeIEYZjo= Received: by 10.100.125.14 with SMTP id x14mr43545anc.66.1236164358981; Wed, 04 Mar 2009 02:59:18 -0800 (PST) Received: from ?192.168.1.64? ([78.86.247.183]) by mx.google.com with ESMTPS id c37sm1564131ana.42.2009.03.04.02.59.16 (version=SSLv3 cipher=RC4-MD5); Wed, 04 Mar 2009 02:59:17 -0800 (PST) Subject: [PATCH] panasonic-laptop: use correct key names for sleep states in driver From: Richard Hughes To: Harald Welte Cc: linux-acpi , Peter Hutterer , mjg , linux-input , Matthias Clasen In-Reply-To: <1236164049.3936.17.camel@hughsie-work.lan> References: <1235992429.3858.58.camel@hughsie-work.lan> <20090302112400.GA2356@khazad-dum.debian.net> <1236164049.3936.17.camel@hughsie-work.lan> Date: Wed, 04 Mar 2009 10:58:26 +0000 Message-Id: <1236164306.3936.20.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 Wed, 2009-03-04 at 10:54 +0000, Richard Hughes wrote: > 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. Patch also attached for panasonic-laptop. Harald, can you please review this. Thanks. Richard Acked-by: Harald Welte From 11df58e5c55e6286f03b29b6b9820ed4b13095db Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Wed, 4 Mar 2009 10:57:36 +0000 Subject: panasonic-laptop: 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/panasonic-laptop.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c index c47a44d..63a1828 100644 --- a/drivers/platform/x86/panasonic-laptop.c +++ b/drivers/platform/x86/panasonic-laptop.c @@ -205,10 +205,10 @@ static const int initial_keymap[KEYMAP_SIZE] = { /* 4 */ KEY_MUTE, /* 5 */ KEY_VOLUMEDOWN, /* 6 */ KEY_VOLUMEUP, - /* 7 */ KEY_SLEEP, + /* 7 */ KEY_SUSPEND, /* 8 */ KEY_PROG1, /* Change CPU boost */ /* 9 */ KEY_BATTERY, - /* 10 */ KEY_SUSPEND, + /* 10 */ KEY_HIBERNATE, }; struct pcc_acpi { -- 1.6.1.3