linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: Add quirk for Apple Magic Keyboard over Bluetooth
@ 2020-01-30 19:21 Daniel Lockyer
  2020-01-31  9:18 ` Benjamin Tissoires
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Lockyer @ 2020-01-30 19:21 UTC (permalink / raw)
  To: jikos; +Cc: benjamin.tissoires, linux-input

The Apple Magic Keyboard works flawlessly over USB but has weird bugs
over Bluetooth. This patch adds the missing quirk.

Signed-off-by: Daniel Lockyer <hi@daniellockyer.com>
---
 drivers/hid/hid-quirks.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
index 0e7b2d998395..6d68a9201e1d 100644
--- a/drivers/hid/hid-quirks.c
+++ b/drivers/hid/hid-quirks.c
@@ -280,6 +280,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI) },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO) },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_JIS) },
+	{ HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_ANSI) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_ANSI) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
-- 
2.25.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] HID: Add quirk for Apple Magic Keyboard over Bluetooth
  2020-01-30 19:21 [PATCH] HID: Add quirk for Apple Magic Keyboard over Bluetooth Daniel Lockyer
@ 2020-01-31  9:18 ` Benjamin Tissoires
  2020-01-31 15:15   ` Daniel Lockyer
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Tissoires @ 2020-01-31  9:18 UTC (permalink / raw)
  To: Daniel Lockyer; +Cc: Jiri Kosina, open list:HID CORE LAYER

Hi Daniel,

On Thu, Jan 30, 2020 at 8:31 PM Daniel Lockyer <hi@daniellockyer.com> wrote:
>
> The Apple Magic Keyboard works flawlessly over USB but has weird bugs
> over Bluetooth. This patch adds the missing quirk.
>
> Signed-off-by: Daniel Lockyer <hi@daniellockyer.com>
> ---
>  drivers/hid/hid-quirks.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
> index 0e7b2d998395..6d68a9201e1d 100644
> --- a/drivers/hid/hid-quirks.c
> +++ b/drivers/hid/hid-quirks.c
> @@ -280,6 +280,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
>         { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI) },
>         { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO) },
>         { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_JIS) },
> +       { HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_ANSI) },

That is weird. The whole purpose of this list (which I'd like to
remove in the future) is to prevent hid-generic to ever bind to those
devices. This can be problematic in situations where you do not have
the corresponding driver, in the initrd for instance.

Can you share your dmesg before and after applying this patch so I get
a grasp on why you need that change?

Cheers,
Benjamin

>         { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_ANSI) },
>         { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
>         { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
> --
> 2.25.0
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] HID: Add quirk for Apple Magic Keyboard over Bluetooth
  2020-01-31  9:18 ` Benjamin Tissoires
@ 2020-01-31 15:15   ` Daniel Lockyer
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Lockyer @ 2020-01-31 15:15 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: Jiri Kosina, open list:HID CORE LAYER

Hi Benjamin,

Please ignore my patch. I was experiencing weird things with the hid-generic driver constantly binding over the hid-apple one, but can't seem to reproduce it now.

The actual fix for my issue was posted by Mansour Behabadi to this mailing list on January 29th - "HID: apple: Add support for recent firmware". I have tested this locally and it works great.

Kind regards,
Daniel

On Fri, 31 Jan 2020, at 09:18, Benjamin Tissoires wrote:
> Hi Daniel,
> 
> On Thu, Jan 30, 2020 at 8:31 PM Daniel Lockyer <hi@daniellockyer.com> wrote:
> >
> > The Apple Magic Keyboard works flawlessly over USB but has weird bugs
> > over Bluetooth. This patch adds the missing quirk.
> >
> > Signed-off-by: Daniel Lockyer <hi@daniellockyer.com>
> > ---
> >  drivers/hid/hid-quirks.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
> > index 0e7b2d998395..6d68a9201e1d 100644
> > --- a/drivers/hid/hid-quirks.c
> > +++ b/drivers/hid/hid-quirks.c
> > @@ -280,6 +280,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
> >         { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI) },
> >         { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO) },
> >         { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_JIS) },
> > +       { HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_ANSI) },
> 
> That is weird. The whole purpose of this list (which I'd like to
> remove in the future) is to prevent hid-generic to ever bind to those
> devices. This can be problematic in situations where you do not have
> the corresponding driver, in the initrd for instance.
> 
> Can you share your dmesg before and after applying this patch so I get
> a grasp on why you need that change?
> 
> Cheers,
> Benjamin
> 
> >         { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_ANSI) },
> >         { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
> >         { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
> > --
> > 2.25.0
> >
> 
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-31 15:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-30 19:21 [PATCH] HID: Add quirk for Apple Magic Keyboard over Bluetooth Daniel Lockyer
2020-01-31  9:18 ` Benjamin Tissoires
2020-01-31 15:15   ` Daniel Lockyer

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).