The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Dirk Hohndel <hohndel@infradead.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Joshua V Dillon <jvdillon@gmail.com>,
	Chase Douglas <chase.douglas@canonical.com>,
	Jiri Kosina <jkosina@suse.cz>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Add support for the Mid 2011 MacBook Air keyboard layout
Date: Sun, 06 Nov 2011 15:22:40 -0800	[thread overview]
Message-ID: <87fwi0j0ov.fsf@hohndel.org> (raw)
In-Reply-To: <CA+55aFw22MKWqwUaWpj-=gquEmUjdTWmk_ibe3bxYPySq_mCSA@mail.gmail.com>

On Sun, 6 Nov 2011 12:12:49 -0800, Linus Torvalds <torvalds@linux-foundation.org> wrote:
> Now, I have the 11" one which apparently has a different keyboard ID,
> but the *reason* it works for me is that my keyboard ID is apparently
> 0x0249, which is USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI.
> 
> And because that one isn't known by the broken quirks at all, it falls
> back on the standard apple_fn_keys[] translation.
> 
> Which is the *right* translation for me, and judging by your patch,
> it's the right translation for you too.

Correct. 
 
> So I suspect that the *right* thing to do is to just remove the broken
> WELLSPRING6 cases. Exactly the same way that da617c7cb915 ("HID:
> consolidate MacbookAir 4,1 mappings") did for the WELLSPRING6A ones.
> 
> So I suspect the only case that should use the "macbookair_fn_keys"
> thing is the *old* macbook air ("WELLSPRING4"). They were added in
> commit 5d922baa6310, and that commit implies that it was never tested
> all that much ("reportedly unchanged from the 3,2 predecessor and
> seems to work well.")
> 
> So I think the right patch is just this one:
> 
>      drivers/hid/hid-apple.c |    3 ---
>      1 files changed, 0 insertions(+), 3 deletions(-)
> 
>     diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
>     index 8cdb4b45b30a..299d23871122 100644
>     --- a/drivers/hid/hid-apple.c
>     +++ b/drivers/hid/hid-apple.c
>     @@ -183,9 +183,6 @@ static int hidinput_apple_event(struct
> hid_device *hid, struct input_dev *input,
>      		if (hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI &&
>      				hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS)
>      			table = macbookair_fn_keys;
>     -		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 < 0x21d || hid->product >= 0x300)
>      			table = powerbook_fn_keys;
>      		else
> 
> instead. Hmm? Does that work for you?

Tested-by: Dirk Hohndel <hohndel@infradead.org>

/D

      reply	other threads:[~2011-11-07  2:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-06 17:16 [PATCH] Add support for the Mid 2011 MacBook Air keyboard layout Dirk Hohndel
2011-11-06 20:12 ` Linus Torvalds
2011-11-06 23:22   ` Dirk Hohndel [this message]

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=87fwi0j0ov.fsf@hohndel.org \
    --to=hohndel@infradead.org \
    --cc=chase.douglas@canonical.com \
    --cc=jkosina@suse.cz \
    --cc=jvdillon@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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