Re: [PATCH] HID: apple: Add 2021 magic keyboard FN key mapping

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

 



Hej,

On 2022-01-03 19:04:18 +0100, José Expósito wrote:
> On Sun, Jan 02, 2022 at 06:54:39PM +0100, José Expósito wrote: 
> > Works as expected a code looks good to me.
> 
> Actually, just a little comment on the code, sorry for the extra email:
> 
> > diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
> > index 2c9c5faa74a9..61dfe983828f 100644
> > --- a/drivers/hid/hid-apple.c
> > +++ b/drivers/hid/hid-apple.c
> > @@ -70,6 +70,28 @@ struct apple_key_translation {
> >  	u8 flags;
> > };
> >
> > +static const struct apple_key_translation apple2021_fn_keys[] = {
> 
> Since this driver handles many devices, I think that renaming this
> struct to "magic_keyboard_2021_fn_keys" would help to quickly
> understand which is the target device.

A more generic name will make sense in the future since the Apple 
silicon based MacBooks (except for the 2020 13-inch MacBook Pro) use the 
same mapping. Keyboard and trackpad on those devices use HID over SPI 
and identify themself as "Apple Internal Keyboard / Trackpad".

The HID over SPI low level transport is still work in progress but the 
keyboard works as expected with minimal changes to hid-apple.c.

I can of course just rename the struct in the commit adding support for 
the MacBooks.

best regards

Janne



[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