linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: logitech-hidpp: Enable HID++ for all the Logitech Bluetooth devices
@ 2022-08-25 12:29 Bastien Nocera
  2022-08-25 15:59 ` Nestor Lopez Casado
  2022-08-30 11:37 ` Bastien Nocera
  0 siblings, 2 replies; 13+ messages in thread
From: Bastien Nocera @ 2022-08-25 12:29 UTC (permalink / raw)
  To: Filipe Laíns, Jiri Kosina, Benjamin Tissoires, linux-input,
	Nestor Lopez Casado

Probe for HID++ support over Bluetooth for all the Logitech Bluetooth
devices. As Logitech doesn't have a list of Bluetooth devices that
support HID++ over Bluetooth, probe every device. The HID++ driver
will fall back to plain HID if the device does not support HID++.

Note that this change might cause upower to export 2 batteries for
certain Bluetooth LE devices which export their battery information
through the Bluetooth BATT profile. This particular bug is tracked at:
https://gitlab.freedesktop.org/upower/upower/-/issues/166

Tested with a Logitech Signature M650 mouse, over Bluetooth

Signed-off-by: Bastien Nocera <hadess@hadess.net>
---

Note that I could not test whether the Harmony PS3 (handled in hid-sony.c)
or DiNovo Edge keyboard (handled in hid-input.c) devices would correctly fallback
to those drivers in that case.

Ways to test this would be appreciated (or merge this, and wait for feedback...)

 drivers/hid/hid-logitech-hidpp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index 81de88ab2ecc..86e7a38d8a9a 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -4347,6 +4347,9 @@ static const struct hid_device_id hidpp_devices[] = {
        { /* MX Master 3 mouse over Bluetooth */
          HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb023),
          .driver_data = HIDPP_QUIRK_HI_RES_SCROLL_X2121 },
+
+       { /* And try to enable HID++ for all the Logitech Bluetooth devices */
+         HID_DEVICE(BUS_BLUETOOTH, HID_GROUP_ANY, USB_VENDOR_ID_LOGITECH, HID_ANY_ID) },
        {}
 };
 
-- 
2.37.2


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

end of thread, other threads:[~2022-08-30 11:39 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-25 12:29 [PATCH] HID: logitech-hidpp: Enable HID++ for all the Logitech Bluetooth devices Bastien Nocera
2022-08-25 15:59 ` Nestor Lopez Casado
2022-08-25 16:27   ` Bastien Nocera
2022-08-25 20:47   ` Peter F. Patel-Schneider
2022-08-26 14:35     ` Bastien Nocera
2022-08-26 15:31       ` Peter F. Patel-Schneider
2022-08-26 15:37       ` Peter F. Patel-Schneider
2022-08-29 13:41         ` Bastien Nocera
2022-08-29 14:20           ` Peter F. Patel-Schneider
2022-08-29 11:52     ` Bastien Nocera
2022-08-29 13:45     ` Bastien Nocera
2022-08-29 14:01       ` Peter F. Patel-Schneider
2022-08-30 11:37 ` Bastien Nocera

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