Re: [PATCH] Add MacBookAir4,1 keyboard support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2011-09-16 at 17:05 +0100, Bastien Nocera wrote:
> On Wed, 2011-09-07 at 16:15 -0400, Pieter-Augustijn Van Malleghem wrote:
> > This patch adds support for the Apple MacBookAir4,1 released in July 
> > 2011. It was inspired by Joshua Dillon's patch for the MacBookAir4,2
> > posted on http://www.almostsure.com/mba42/hid-apple-dkms.patch.
> 
> > Signed-off-by: Pieter-Augustijn Van Malleghem <p-a@xxxxxxxxxx>
> > diff -uNr linux/drivers/hid/hid-apple.c patched/drivers/hid/hid-apple.c
> > --- linux/drivers/hid/hid-apple.c	2011-09-06 23:41:58.000000000 -0400
> > +++ patched/drivers/hid/hid-apple.c	2011-09-06 23:53:05.000000000 -0400
> > @@ -183,6 +183,9 @@
> >  		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_WELLSPRING6A_ANSI &&
> > +				hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS)
> > +			table = macbookair_fn_keys;
> >  		else if (hid->product < 0x21d || hid->product >= 0x300)
> >  			table = powerbook_fn_keys;
> >  		else
> 
> This is broken, the macbookair_fn_keys above are for earlier revisions
> of the MacBook Air. MacBookAir4,1 and 4,1 don't have an eject button
> anymore, so should use the apple_fn_keys[] translation table.

Works with this patch applied on top of yours:
@@ -59,7 +59,7 @@ diff -uNr linux/drivers/hid/hid-apple.c patched/drivers/hid/hid-apple.c
                        table = macbookair_fn_keys;
 +              else if (hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI &&
 +                              hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS)
-+                      table = macbookair_fn_keys;
++                      table = apple_fn_keys;
                else if (hid->product < 0x21d || hid->product >= 0x300)
                        table = powerbook_fn_keys;
                else

Tested-by: Bastien Nocera <hadess@xxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux