HID: logitech: move dj devices to the HID++ module
Devices connected through the Logitech Wireless Receiver are HID++ devices. We can handle them here to benefit from this new module and activate enhaced support of the various wireless touchpad or mice with touch sensors on them. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Andrew de los Reyes <adlr@chromium.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
2f31c52529
commit
ab94e562ed
|
@ -371,6 +371,7 @@ config HID_LOGITECH_DJ
|
||||||
tristate "Logitech Unifying receivers full support"
|
tristate "Logitech Unifying receivers full support"
|
||||||
depends on HIDRAW
|
depends on HIDRAW
|
||||||
depends on HID_LOGITECH
|
depends on HID_LOGITECH
|
||||||
|
select HID_LOGITECH_HIDPP
|
||||||
---help---
|
---help---
|
||||||
Say Y if you want support for Logitech Unifying receivers and devices.
|
Say Y if you want support for Logitech Unifying receivers and devices.
|
||||||
Unifying receivers are capable of pairing up to 6 Logitech compliant
|
Unifying receivers are capable of pairing up to 6 Logitech compliant
|
||||||
|
|
|
@ -977,48 +977,8 @@ static struct hid_driver logi_djreceiver_driver = {
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
module_hid_driver(logi_djreceiver_driver);
|
||||||
|
|
||||||
static const struct hid_device_id logi_dj_devices[] = {
|
|
||||||
{ HID_DEVICE(BUS_USB, HID_GROUP_LOGITECH_DJ_DEVICE,
|
|
||||||
USB_VENDOR_ID_LOGITECH, HID_ANY_ID)},
|
|
||||||
{}
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct hid_driver logi_djdevice_driver = {
|
|
||||||
.name = "logitech-djdevice",
|
|
||||||
.id_table = logi_dj_devices,
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static int __init logi_dj_init(void)
|
|
||||||
{
|
|
||||||
int retval;
|
|
||||||
|
|
||||||
dbg_hid("Logitech-DJ:%s\n", __func__);
|
|
||||||
|
|
||||||
retval = hid_register_driver(&logi_djreceiver_driver);
|
|
||||||
if (retval)
|
|
||||||
return retval;
|
|
||||||
|
|
||||||
retval = hid_register_driver(&logi_djdevice_driver);
|
|
||||||
if (retval)
|
|
||||||
hid_unregister_driver(&logi_djreceiver_driver);
|
|
||||||
|
|
||||||
return retval;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit logi_dj_exit(void)
|
|
||||||
{
|
|
||||||
dbg_hid("Logitech-DJ:%s\n", __func__);
|
|
||||||
|
|
||||||
hid_unregister_driver(&logi_djdevice_driver);
|
|
||||||
hid_unregister_driver(&logi_djreceiver_driver);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(logi_dj_init);
|
|
||||||
module_exit(logi_dj_exit);
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_AUTHOR("Logitech");
|
MODULE_AUTHOR("Logitech");
|
||||||
MODULE_AUTHOR("Nestor Lopez Casado");
|
MODULE_AUTHOR("Nestor Lopez Casado");
|
||||||
|
|
|
@ -777,15 +777,17 @@ static int hidpp_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||||
hid_device_io_start(hdev);
|
hid_device_io_start(hdev);
|
||||||
|
|
||||||
connected = hidpp_is_connected(hidpp);
|
connected = hidpp_is_connected(hidpp);
|
||||||
if (!connected) {
|
if (id->group != HID_GROUP_LOGITECH_DJ_DEVICE) {
|
||||||
hid_err(hdev, "Device not connected");
|
if (!connected) {
|
||||||
goto hid_parse_fail;
|
hid_err(hdev, "Device not connected");
|
||||||
}
|
goto hid_parse_fail;
|
||||||
|
}
|
||||||
|
|
||||||
/* the device is connected, we can ask for its name */
|
/* the device is connected, we can ask for its name */
|
||||||
hid_info(hdev, "HID++ %u.%u device connected.\n",
|
hid_info(hdev, "HID++ %u.%u device connected.\n",
|
||||||
hidpp->protocol_major, hidpp->protocol_minor);
|
hidpp->protocol_major, hidpp->protocol_minor);
|
||||||
hidpp_overwrite_name(hdev);
|
hidpp_overwrite_name(hdev);
|
||||||
|
}
|
||||||
|
|
||||||
if (hidpp->quirks & HIDPP_QUIRK_CLASS_WTP) {
|
if (hidpp->quirks & HIDPP_QUIRK_CLASS_WTP) {
|
||||||
ret = wtp_get_config(hidpp);
|
ret = wtp_get_config(hidpp);
|
||||||
|
@ -824,6 +826,9 @@ static const struct hid_device_id hidpp_devices[] = {
|
||||||
HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH,
|
HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH,
|
||||||
USB_DEVICE_ID_LOGITECH_T651),
|
USB_DEVICE_ID_LOGITECH_T651),
|
||||||
.driver_data = HIDPP_QUIRK_CLASS_WTP },
|
.driver_data = HIDPP_QUIRK_CLASS_WTP },
|
||||||
|
|
||||||
|
{ HID_DEVICE(BUS_USB, HID_GROUP_LOGITECH_DJ_DEVICE,
|
||||||
|
USB_VENDOR_ID_LOGITECH, HID_ANY_ID)},
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue