All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] HID: add Apple Magic Mouse 2 support
@ 2021-03-27 13:05 John Chen
  2021-03-27 13:05 ` [PATCH 1/4] HID: magicmouse: " John Chen
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: John Chen @ 2021-03-27 13:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Rohit Pidaparthi, RicardoEPRodrigues, Jiri Kosina,
	Benjamin Tissoires, John Chen

The HID descriptor of Magic Mouse 2 contains BTN_LEFT, BTN_RIGHT, REL_X,
REL_Y, whether it's charging, whether it's fully charged, and battery
capacity.

$ xxd -p report_descriptor
05010902a101851205091901290215002501950275018102950175068103
05010901a1001601f826ff073601fb46ff046513550d0930093175109502
8106750895028101c00602ff09558555150026ff0075089540b1a2c00600
ff0914a10185900584750195031500250109610585094409468102950581
0175089501150026ff0009658102c000

As hidinput can handle the BTNs and RELs, the Magic Mouse 2 already
functions as a basic mouse. Nevertheless, It should be reasonable to
extend hid-magicmouse to support Magic Mouse 2 as well. Furthermore,
hidinput is patched to handle the battery capacity.

This work is based on Recardo's, which is in turned based on Rohitpid's.
Their GitHub repositories are linked below:
https://github.com/RicardoEPRodrigues/magicmouse-hid
https://github.com/rohitpid/Linux-Magic-Trackpad-2-Driver

John Chen (4):
  HID: magicmouse: add Apple Magic Mouse 2 support
  HID: magicmouse: fix 3 button emulation of Mouse 2
  HID: magicmouse: fix reconnection of Magic Mouse 2
  HID: input: map battery capacity (00850065)

 drivers/hid/hid-debug.c      |   1 +
 drivers/hid/hid-ids.h        |   1 +
 drivers/hid/hid-input.c      |  11 +++
 drivers/hid/hid-magicmouse.c | 156 ++++++++++++++++++++++++++++-------
 include/linux/hid.h          |   3 +
 5 files changed, 140 insertions(+), 32 deletions(-)

-- 
2.31.0


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

end of thread, other threads:[~2021-03-27 17:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-27 13:05 [PATCH 0/4] HID: add Apple Magic Mouse 2 support John Chen
2021-03-27 13:05 ` [PATCH 1/4] HID: magicmouse: " John Chen
2021-03-27 13:05 ` [PATCH 2/4] HID: magicmouse: fix 3 button emulation of Mouse 2 John Chen
2021-03-27 13:05 ` [PATCH 3/4] HID: magicmouse: fix reconnection of Magic " John Chen
2021-03-27 13:05 ` [PATCH 4/4] HID: input: map battery capacity (00850065) John Chen
2021-03-27 14:14   ` Pochang Chen
2021-03-27 17:22   ` kernel test robot
2021-03-27 17:22     ` kernel test robot
2021-03-27 17:50   ` kernel test robot
2021-03-27 17:50     ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.