mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 13:41:51 +00:00
HID: logitech-hidpp: Drop HIDPP_QUIRK_UNIFYING
HIDPP unifying is only checked once in probe() and it is also set by probe() itself. Drop the quirk and replace its one check by the condition which is used to set the quirk in the first place. This series has been tested on the following devices: Logitech Bluetooth Laser Travel Mouse (bluetooth, HID++ 1.0) Logitech M720 Triathlon (bluetooth, HID++ 4.5) Logitech M720 Triathlon (unifying, HID++ 4.5) Logitech K400 Pro (unifying, HID++ 4.1) Logitech K270 (eQUAD nano Lite, HID++ 2.0) Logitech M185 (eQUAD nano Lite, HID++ 4.5) Logitech LX501 keyboard (27 Mhz, HID++ builtin scroll-wheel, HID++ 1.0) Logitech M-RAZ105 mouse (27 Mhz, HID++ extra mouse buttons, HID++ 1.0) And by bentiss: Logitech Touchpad T650 (unifying) Logitech Touchpad T651 (bluetooth) Logitech MX Master 3B (BLE) Logitech G403 (plain USB / Gaming receiver) Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20231010102029.111003-13-hdegoede@redhat.com Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
This commit is contained in:
parent
f3c4ee7166
commit
9ce363aa00
@ -69,12 +69,11 @@ MODULE_PARM_DESC(disable_tap_to_click,
|
||||
#define HIDPP_QUIRK_WTP_PHYSICAL_BUTTONS BIT(22)
|
||||
#define HIDPP_QUIRK_DELAYED_INIT BIT(23)
|
||||
#define HIDPP_QUIRK_FORCE_OUTPUT_REPORTS BIT(24)
|
||||
#define HIDPP_QUIRK_UNIFYING BIT(25)
|
||||
#define HIDPP_QUIRK_HIDPP_WHEELS BIT(26)
|
||||
#define HIDPP_QUIRK_HIDPP_EXTRA_MOUSE_BTNS BIT(27)
|
||||
#define HIDPP_QUIRK_HIDPP_CONSUMER_VENDOR_KEYS BIT(28)
|
||||
#define HIDPP_QUIRK_HI_RES_SCROLL_1P0 BIT(29)
|
||||
#define HIDPP_QUIRK_WIRELESS_STATUS BIT(30)
|
||||
#define HIDPP_QUIRK_HIDPP_WHEELS BIT(25)
|
||||
#define HIDPP_QUIRK_HIDPP_EXTRA_MOUSE_BTNS BIT(26)
|
||||
#define HIDPP_QUIRK_HIDPP_CONSUMER_VENDOR_KEYS BIT(27)
|
||||
#define HIDPP_QUIRK_HI_RES_SCROLL_1P0 BIT(28)
|
||||
#define HIDPP_QUIRK_WIRELESS_STATUS BIT(29)
|
||||
|
||||
/* These are just aliases for now */
|
||||
#define HIDPP_QUIRK_KBD_SCROLL_WHEEL HIDPP_QUIRK_HIDPP_WHEELS
|
||||
@ -4405,9 +4404,6 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
return hid_hw_start(hdev, HID_CONNECT_DEFAULT);
|
||||
}
|
||||
|
||||
if (id->group == HID_GROUP_LOGITECH_DJ_DEVICE)
|
||||
hidpp->quirks |= HIDPP_QUIRK_UNIFYING;
|
||||
|
||||
if (id->group == HID_GROUP_LOGITECH_27MHZ_DEVICE &&
|
||||
hidpp_application_equals(hdev, HID_GD_MOUSE))
|
||||
hidpp->quirks |= HIDPP_QUIRK_HIDPP_WHEELS |
|
||||
@ -4460,7 +4456,7 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
hid_device_io_start(hdev);
|
||||
|
||||
/* Get name + serial, store in hdev->name + hdev->uniq */
|
||||
if (hidpp->quirks & HIDPP_QUIRK_UNIFYING)
|
||||
if (id->group == HID_GROUP_LOGITECH_DJ_DEVICE)
|
||||
hidpp_unifying_init(hidpp);
|
||||
else
|
||||
hidpp_non_unifying_init(hidpp);
|
||||
|
Loading…
Reference in New Issue
Block a user