linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Henrik Rydberg" <rydberg@euromail.se>
To: Jeff Mitchell <jeff@jefferai.org>
Cc: Jiri Kosina <jkosina@suse.cz>,
	linux-input@vger.kernel.org, jvdillon@gmail.com,
	Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Subject: Re: [PATCH] This adds support for keyboards on mid-2011 MacBook Airs
Date: Wed, 5 Oct 2011 19:28:57 +0200	[thread overview]
Message-ID: <20111005172857.GA2195@polaris.bitmath.org> (raw)
In-Reply-To: <4E8C66C2.6010503@jefferai.org>

> Great.
> 
> To clear up an earlier point: AFAIK the new MBAs have the same keyboard
> layout as normal MacBooks and hence uses the same table. An earlier
> patch that was floating around added another table for the new MBAs but
> if you looked at the mappings it was the exact same table as the normal
> MacBook one.

I see. The current tree actually contains two identical tables. Yikes.
Using your patch would have prevented this, but it might be too late
now. If so, the (untested) patch below might fix things up. Does it
still work for you?

Thanks,
Henrik

>From deed345085e90505c4534116cc58e0bee98a431f Mon Sep 17 00:00:00 2001
From: Henrik Rydberg <rydberg@euromail.se>
Date: Wed, 5 Oct 2011 19:27:27 +0200
Subject: [PATCH] hid-apple: Remove duplicate key table

Commit d762cc290 introduced keyboard support for the WELLSPRING6A
devices, but the added key table is actually identical to the default
one. This patch removes the duplicate.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
---
 drivers/hid/hid-apple.c |   25 -------------------------
 1 files changed, 0 insertions(+), 25 deletions(-)

diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index 2bab9ab..9bc7b03 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -82,28 +82,6 @@ static const struct apple_key_translation macbookair_fn_keys[] = {
 	{ }
 };
 
-static const struct apple_key_translation macbookair4_fn_keys[] = {
-	{ KEY_BACKSPACE, KEY_DELETE },
-	{ KEY_ENTER,	KEY_INSERT },
-	{ KEY_F1,	KEY_BRIGHTNESSDOWN, APPLE_FLAG_FKEY },
-	{ KEY_F2,	KEY_BRIGHTNESSUP,   APPLE_FLAG_FKEY },
-	{ KEY_F3,	KEY_SCALE,          APPLE_FLAG_FKEY },
-	{ KEY_F4,	KEY_DASHBOARD,      APPLE_FLAG_FKEY },
-	{ KEY_F5,	KEY_KBDILLUMDOWN,   APPLE_FLAG_FKEY },
-	{ KEY_F6,	KEY_KBDILLUMUP,     APPLE_FLAG_FKEY },
-	{ KEY_F7,	KEY_PREVIOUSSONG,   APPLE_FLAG_FKEY },
-	{ KEY_F8,	KEY_PLAYPAUSE,      APPLE_FLAG_FKEY },
-	{ KEY_F9,	KEY_NEXTSONG,       APPLE_FLAG_FKEY },
-	{ KEY_F10,	KEY_MUTE,           APPLE_FLAG_FKEY },
-	{ KEY_F11,	KEY_VOLUMEDOWN,     APPLE_FLAG_FKEY },
-	{ KEY_F12,	KEY_VOLUMEUP,       APPLE_FLAG_FKEY },
-	{ KEY_UP,	KEY_PAGEUP },
-	{ KEY_DOWN,	KEY_PAGEDOWN },
-	{ KEY_LEFT,	KEY_HOME },
-	{ KEY_RIGHT,	KEY_END },
-	{ }
-};
-
 static const struct apple_key_translation apple_fn_keys[] = {
 	{ KEY_BACKSPACE, KEY_DELETE },
 	{ KEY_ENTER,	KEY_INSERT },
@@ -208,9 +186,6 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
 		else if (hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI &&
 				hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING6_JIS)
 			table = macbookair_fn_keys;
-		else if (hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI &&
-				hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS)
-			table = macbookair4_fn_keys;
 		else if (hid->product < 0x21d || hid->product >= 0x300)
 			table = powerbook_fn_keys;
 		else
-- 
1.7.6.4


  reply	other threads:[~2011-10-05 17:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-21 22:35 [PATCH] This adds support for keyboards on mid-2011 MacBook Airs Jeff Mitchell
2011-10-05  9:07 ` Henrik Rydberg
2011-10-05  9:04   ` Jiri Kosina
2011-10-05  9:48     ` Henrik Rydberg
2011-10-05 10:13       ` Jiri Kosina
2011-10-05 14:16         ` Jeff Mitchell
2011-10-05 17:28           ` Henrik Rydberg [this message]
2011-10-05 17:28             ` Jiri Kosina
2011-10-05 17:43               ` Henrik Rydberg
2011-10-06 14:56                 ` Jeff Mitchell

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=20111005172857.GA2195@polaris.bitmath.org \
    --to=rydberg@euromail.se \
    --cc=iwamatsu@nigauri.org \
    --cc=jeff@jefferai.org \
    --cc=jkosina@suse.cz \
    --cc=jvdillon@gmail.com \
    --cc=linux-input@vger.kernel.org \
    /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).