2 * HIDPP protocol for Logitech Unifying receivers
4 * Copyright (c) 2011 Logitech (c)
5 * Copyright (c) 2012-2013 Google (c)
6 * Copyright (c) 2013-2014 Red Hat Inc.
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the Free
12 * Software Foundation; version 2 of the License.
15 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
17 #include <linux/device.h>
18 #include <linux/hid.h>
19 #include <linux/module.h>
20 #include <linux/slab.h>
21 #include <linux/sched.h>
22 #include <linux/kfifo.h>
23 #include <linux/input/mt.h>
24 #include <asm/unaligned.h>
27 MODULE_LICENSE("GPL");
28 MODULE_AUTHOR("Benjamin Tissoires <benjamin.tissoires@gmail.com>");
29 MODULE_AUTHOR("Nestor Lopez Casado <nlopezcasad@logitech.com>");
31 #define REPORT_ID_HIDPP_SHORT 0x10
32 #define REPORT_ID_HIDPP_LONG 0x11
34 #define HIDPP_REPORT_SHORT_LENGTH 7
35 #define HIDPP_REPORT_LONG_LENGTH 20
37 #define HIDPP_QUIRK_CLASS_WTP BIT(0)
40 * There are two hidpp protocols in use, the first version hidpp10 is known
41 * as register access protocol or RAP, the second version hidpp20 is known as
42 * feature access protocol or FAP
44 * Most older devices (including the Unifying usb receiver) use the RAP protocol
45 * where as most newer devices use the FAP protocol. Both protocols are
46 * compatible with the underlying transport, which could be usb, Unifiying, or
47 * bluetooth. The message lengths are defined by the hid vendor specific report
48 * descriptor for the HIDPP_SHORT report type (total message lenth 7 bytes) and
49 * the HIDPP_LONG report type (total message length 20 bytes)
51 * The RAP protocol uses both report types, whereas the FAP only uses HIDPP_LONG
52 * messages. The Unifying receiver itself responds to RAP messages (device index
53 * is 0xFF for the receiver), and all messages (short or long) with a device
54 * index between 1 and 6 are passed untouched to the corresponding paired
57 * The paired device can be RAP or FAP, it will receive the message untouched
58 * from the Unifiying receiver.
63 u8 funcindex_clientid
;
64 u8 params
[HIDPP_REPORT_LONG_LENGTH
- 4U];
70 u8 params
[HIDPP_REPORT_LONG_LENGTH
- 4U];
79 u8 rawbytes
[sizeof(struct fap
)];
84 struct hid_device
*hid_dev
;
85 struct mutex send_mutex
;
86 void *send_receive_buf
;
87 wait_queue_head_t wait
;
88 bool answer_available
;
98 #define HIDPP_ERROR 0x8f
99 #define HIDPP_ERROR_SUCCESS 0x00
100 #define HIDPP_ERROR_INVALID_SUBID 0x01
101 #define HIDPP_ERROR_INVALID_ADRESS 0x02
102 #define HIDPP_ERROR_INVALID_VALUE 0x03
103 #define HIDPP_ERROR_CONNECT_FAIL 0x04
104 #define HIDPP_ERROR_TOO_MANY_DEVICES 0x05
105 #define HIDPP_ERROR_ALREADY_EXISTS 0x06
106 #define HIDPP_ERROR_BUSY 0x07
107 #define HIDPP_ERROR_UNKNOWN_DEVICE 0x08
108 #define HIDPP_ERROR_RESOURCE_ERROR 0x09
109 #define HIDPP_ERROR_REQUEST_UNAVAILABLE 0x0a
110 #define HIDPP_ERROR_INVALID_PARAM_VALUE 0x0b
111 #define HIDPP_ERROR_WRONG_PIN_CODE 0x0c
113 static int __hidpp_send_report(struct hid_device
*hdev
,
114 struct hidpp_report
*hidpp_report
)
116 int fields_count
, ret
;
118 switch (hidpp_report
->report_id
) {
119 case REPORT_ID_HIDPP_SHORT
:
120 fields_count
= HIDPP_REPORT_SHORT_LENGTH
;
122 case REPORT_ID_HIDPP_LONG
:
123 fields_count
= HIDPP_REPORT_LONG_LENGTH
;
130 * set the device_index as the receiver, it will be overwritten by
131 * hid_hw_request if needed
133 hidpp_report
->device_index
= 0xff;
135 ret
= hid_hw_raw_request(hdev
, hidpp_report
->report_id
,
136 (u8
*)hidpp_report
, fields_count
, HID_OUTPUT_REPORT
,
139 return ret
== fields_count
? 0 : -1;
142 static int hidpp_send_message_sync(struct hidpp_device
*hidpp
,
143 struct hidpp_report
*message
,
144 struct hidpp_report
*response
)
148 mutex_lock(&hidpp
->send_mutex
);
150 hidpp
->send_receive_buf
= response
;
151 hidpp
->answer_available
= false;
154 * So that we can later validate the answer when it arrives
157 *response
= *message
;
159 ret
= __hidpp_send_report(hidpp
->hid_dev
, message
);
162 dbg_hid("__hidpp_send_report returned err: %d\n", ret
);
163 memset(response
, 0, sizeof(struct hidpp_report
));
167 if (!wait_event_timeout(hidpp
->wait
, hidpp
->answer_available
,
169 dbg_hid("%s:timeout waiting for response\n", __func__
);
170 memset(response
, 0, sizeof(struct hidpp_report
));
174 if (response
->report_id
== REPORT_ID_HIDPP_SHORT
&&
175 response
->fap
.feature_index
== HIDPP_ERROR
) {
176 ret
= response
->fap
.params
[1];
177 dbg_hid("__hidpp_send_report got hidpp error %02X\n", ret
);
182 mutex_unlock(&hidpp
->send_mutex
);
187 static int hidpp_send_fap_command_sync(struct hidpp_device
*hidpp
,
188 u8 feat_index
, u8 funcindex_clientid
, u8
*params
, int param_count
,
189 struct hidpp_report
*response
)
191 struct hidpp_report
*message
= kzalloc(sizeof(struct hidpp_report
),
195 if (param_count
> sizeof(message
->fap
.params
))
198 message
->report_id
= REPORT_ID_HIDPP_LONG
;
199 message
->fap
.feature_index
= feat_index
;
200 message
->fap
.funcindex_clientid
= funcindex_clientid
;
201 memcpy(&message
->fap
.params
, params
, param_count
);
203 ret
= hidpp_send_message_sync(hidpp
, message
, response
);
208 static inline bool hidpp_match_answer(struct hidpp_report
*question
,
209 struct hidpp_report
*answer
)
211 return (answer
->fap
.feature_index
== question
->fap
.feature_index
) &&
212 (answer
->fap
.funcindex_clientid
== question
->fap
.funcindex_clientid
);
215 static inline bool hidpp_match_error(struct hidpp_report
*question
,
216 struct hidpp_report
*answer
)
218 return (answer
->fap
.feature_index
== HIDPP_ERROR
) &&
219 (answer
->fap
.funcindex_clientid
== question
->fap
.feature_index
) &&
220 (answer
->fap
.params
[0] == question
->fap
.funcindex_clientid
);
223 /* -------------------------------------------------------------------------- */
225 /* -------------------------------------------------------------------------- */
227 #define HIDPP_PAGE_ROOT 0x0000
228 #define HIDPP_PAGE_ROOT_IDX 0x00
230 #define CMD_ROOT_GET_FEATURE 0x01
231 #define CMD_ROOT_GET_PROTOCOL_VERSION 0x11
233 static int hidpp_root_get_feature(struct hidpp_device
*hidpp
, u16 feature
,
234 u8
*feature_index
, u8
*feature_type
)
236 struct hidpp_report response
;
238 u8 params
[2] = { feature
>> 8, feature
& 0x00FF };
240 ret
= hidpp_send_fap_command_sync(hidpp
,
242 CMD_ROOT_GET_FEATURE
,
243 params
, 2, &response
);
247 *feature_index
= response
.fap
.params
[0];
248 *feature_type
= response
.fap
.params
[1];
253 static int hidpp_root_get_protocol_version(struct hidpp_device
*hidpp
)
255 struct hidpp_report response
;
258 ret
= hidpp_send_fap_command_sync(hidpp
,
260 CMD_ROOT_GET_PROTOCOL_VERSION
,
264 hidpp
->protocol_major
= 1;
265 hidpp
->protocol_minor
= 0;
272 hidpp
->protocol_major
= response
.fap
.params
[0];
273 hidpp
->protocol_minor
= response
.fap
.params
[1];
278 static bool hidpp_is_connected(struct hidpp_device
*hidpp
)
282 ret
= hidpp_root_get_protocol_version(hidpp
);
284 hid_dbg(hidpp
->hid_dev
, "HID++ %u.%u device connected.\n",
285 hidpp
->protocol_major
, hidpp
->protocol_minor
);
289 /* -------------------------------------------------------------------------- */
290 /* 0x0005: GetDeviceNameType */
291 /* -------------------------------------------------------------------------- */
293 #define HIDPP_PAGE_GET_DEVICE_NAME_TYPE 0x0005
295 #define CMD_GET_DEVICE_NAME_TYPE_GET_COUNT 0x01
296 #define CMD_GET_DEVICE_NAME_TYPE_GET_DEVICE_NAME 0x11
297 #define CMD_GET_DEVICE_NAME_TYPE_GET_TYPE 0x21
299 static int hidpp_devicenametype_get_count(struct hidpp_device
*hidpp
,
300 u8 feature_index
, u8
*nameLength
)
302 struct hidpp_report response
;
305 ret
= hidpp_send_fap_command_sync(hidpp
, feature_index
,
306 CMD_GET_DEVICE_NAME_TYPE_GET_COUNT
, NULL
, 0, &response
);
311 *nameLength
= response
.fap
.params
[0];
316 static int hidpp_devicenametype_get_device_name(struct hidpp_device
*hidpp
,
317 u8 feature_index
, u8 char_index
, char *device_name
, int len_buf
)
319 struct hidpp_report response
;
323 ret
= hidpp_send_fap_command_sync(hidpp
, feature_index
,
324 CMD_GET_DEVICE_NAME_TYPE_GET_DEVICE_NAME
, &char_index
, 1,
330 if (response
.report_id
== REPORT_ID_HIDPP_LONG
)
331 count
= HIDPP_REPORT_LONG_LENGTH
- 4;
333 count
= HIDPP_REPORT_SHORT_LENGTH
- 4;
338 for (i
= 0; i
< count
; i
++)
339 device_name
[i
] = response
.fap
.params
[i
];
344 static char *hidpp_get_device_name(struct hidpp_device
*hidpp
, u8
*name_length
)
353 ret
= hidpp_root_get_feature(hidpp
, HIDPP_PAGE_GET_DEVICE_NAME_TYPE
,
354 &feature_index
, &feature_type
);
358 ret
= hidpp_devicenametype_get_count(hidpp
, feature_index
,
363 name
= kzalloc(__name_length
+ 1, GFP_KERNEL
);
367 *name_length
= __name_length
+ 1;
368 while (index
< __name_length
)
369 index
+= hidpp_devicenametype_get_device_name(hidpp
,
370 feature_index
, index
, name
+ index
,
371 __name_length
- index
);
380 /* -------------------------------------------------------------------------- */
381 /* 0x6100: TouchPadRawXY */
382 /* -------------------------------------------------------------------------- */
384 #define HIDPP_PAGE_TOUCHPAD_RAW_XY 0x6100
386 #define CMD_TOUCHPAD_GET_RAW_INFO 0x01
388 #define TOUCHPAD_RAW_XY_ORIGIN_LOWER_LEFT 0x01
389 #define TOUCHPAD_RAW_XY_ORIGIN_UPPER_LEFT 0x03
391 struct hidpp_touchpad_raw_info
{
402 struct hidpp_touchpad_raw_xy_finger
{
412 struct hidpp_touchpad_raw_xy
{
414 struct hidpp_touchpad_raw_xy_finger fingers
[2];
421 static int hidpp_touchpad_get_raw_info(struct hidpp_device
*hidpp
,
422 u8 feature_index
, struct hidpp_touchpad_raw_info
*raw_info
)
424 struct hidpp_report response
;
426 u8
*params
= (u8
*)response
.fap
.params
;
428 ret
= hidpp_send_fap_command_sync(hidpp
, feature_index
,
429 CMD_TOUCHPAD_GET_RAW_INFO
, NULL
, 0, &response
);
434 raw_info
->x_size
= get_unaligned_be16(¶ms
[0]);
435 raw_info
->y_size
= get_unaligned_be16(¶ms
[2]);
436 raw_info
->z_range
= params
[4];
437 raw_info
->area_range
= params
[5];
438 raw_info
->maxcontacts
= params
[7];
439 raw_info
->origin
= params
[8];
440 /* res is given in unit per inch */
441 raw_info
->res
= get_unaligned_be16(¶ms
[13]) * 2 / 51;
446 /* ************************************************************************** */
450 /* ************************************************************************** */
452 /* -------------------------------------------------------------------------- */
453 /* Touchpad HID++ devices */
454 /* -------------------------------------------------------------------------- */
457 struct input_dev
*input
;
461 u8 button_feature_index
;
464 unsigned int resolution
;
467 static int wtp_input_mapping(struct hid_device
*hdev
, struct hid_input
*hi
,
468 struct hid_field
*field
, struct hid_usage
*usage
,
469 unsigned long **bit
, int *max
)
474 static void wtp_input_configured(struct hid_device
*hdev
,
475 struct hid_input
*hidinput
)
477 struct hidpp_device
*hidpp
= hid_get_drvdata(hdev
);
478 struct wtp_data
*wd
= hidpp
->private_data
;
479 struct input_dev
*input_dev
= hidinput
->input
;
481 __set_bit(EV_ABS
, input_dev
->evbit
);
482 __set_bit(EV_KEY
, input_dev
->evbit
);
483 __clear_bit(EV_REL
, input_dev
->evbit
);
484 __clear_bit(EV_LED
, input_dev
->evbit
);
486 input_set_abs_params(input_dev
, ABS_MT_POSITION_X
, 0, wd
->x_size
, 0, 0);
487 input_abs_set_res(input_dev
, ABS_MT_POSITION_X
, wd
->resolution
);
488 input_set_abs_params(input_dev
, ABS_MT_POSITION_Y
, 0, wd
->y_size
, 0, 0);
489 input_abs_set_res(input_dev
, ABS_MT_POSITION_Y
, wd
->resolution
);
491 /* Max pressure is not given by the devices, pick one */
492 input_set_abs_params(input_dev
, ABS_MT_PRESSURE
, 0, 50, 0, 0);
494 input_set_capability(input_dev
, EV_KEY
, BTN_LEFT
);
496 __set_bit(INPUT_PROP_BUTTONPAD
, input_dev
->propbit
);
498 input_mt_init_slots(input_dev
, wd
->maxcontacts
, INPUT_MT_POINTER
|
499 INPUT_MT_DROP_UNUSED
);
501 wd
->input
= input_dev
;
504 static void wtp_touch_event(struct wtp_data
*wd
,
505 struct hidpp_touchpad_raw_xy_finger
*touch_report
)
509 if (!touch_report
->finger_id
|| touch_report
->contact_type
)
513 slot
= input_mt_get_slot_by_key(wd
->input
, touch_report
->finger_id
);
515 input_mt_slot(wd
->input
, slot
);
516 input_mt_report_slot_state(wd
->input
, MT_TOOL_FINGER
,
517 touch_report
->contact_status
);
518 if (touch_report
->contact_status
) {
519 input_event(wd
->input
, EV_ABS
, ABS_MT_POSITION_X
,
521 input_event(wd
->input
, EV_ABS
, ABS_MT_POSITION_Y
,
522 wd
->flip_y
? wd
->y_size
- touch_report
->y
:
524 input_event(wd
->input
, EV_ABS
, ABS_MT_PRESSURE
,
529 static void wtp_send_raw_xy_event(struct hidpp_device
*hidpp
,
530 struct hidpp_touchpad_raw_xy
*raw
)
532 struct wtp_data
*wd
= hidpp
->private_data
;
535 for (i
= 0; i
< 2; i
++)
536 wtp_touch_event(wd
, &(raw
->fingers
[i
]));
538 if (raw
->end_of_frame
)
539 input_event(wd
->input
, EV_KEY
, BTN_LEFT
, raw
->button
);
541 if (raw
->end_of_frame
|| raw
->finger_count
<= 2) {
542 input_mt_sync_frame(wd
->input
);
543 input_sync(wd
->input
);
547 static int wtp_mouse_raw_xy_event(struct hidpp_device
*hidpp
, u8
*data
)
549 struct wtp_data
*wd
= hidpp
->private_data
;
550 u8 c1_area
= ((data
[7] & 0xf) * (data
[7] & 0xf) +
551 (data
[7] >> 4) * (data
[7] >> 4)) / 2;
552 u8 c2_area
= ((data
[13] & 0xf) * (data
[13] & 0xf) +
553 (data
[13] >> 4) * (data
[13] >> 4)) / 2;
554 struct hidpp_touchpad_raw_xy raw
= {
555 .timestamp
= data
[1],
559 .contact_status
= !!data
[7],
560 .x
= get_unaligned_le16(&data
[3]),
561 .y
= get_unaligned_le16(&data
[5]),
564 .finger_id
= data
[2],
567 .contact_status
= !!data
[13],
568 .x
= get_unaligned_le16(&data
[9]),
569 .y
= get_unaligned_le16(&data
[11]),
572 .finger_id
= data
[8],
575 .finger_count
= wd
->maxcontacts
,
577 .end_of_frame
= (data
[0] >> 7) == 0,
578 .button
= data
[0] & 0x01,
581 wtp_send_raw_xy_event(hidpp
, &raw
);
586 static int wtp_raw_event(struct hid_device
*hdev
, u8
*data
, int size
)
588 struct hidpp_device
*hidpp
= hid_get_drvdata(hdev
);
589 struct wtp_data
*wd
= hidpp
->private_data
;
591 if (!wd
|| !wd
->input
|| (data
[0] != 0x02) || size
< 21)
594 return wtp_mouse_raw_xy_event(hidpp
, &data
[7]);
597 static int wtp_get_config(struct hidpp_device
*hidpp
)
599 struct wtp_data
*wd
= hidpp
->private_data
;
600 struct hidpp_touchpad_raw_info raw_info
= {0};
604 ret
= hidpp_root_get_feature(hidpp
, HIDPP_PAGE_TOUCHPAD_RAW_XY
,
605 &wd
->mt_feature_index
, &feature_type
);
607 /* means that the device is not powered up */
610 ret
= hidpp_touchpad_get_raw_info(hidpp
, wd
->mt_feature_index
,
615 wd
->x_size
= raw_info
.x_size
;
616 wd
->y_size
= raw_info
.y_size
;
617 wd
->maxcontacts
= raw_info
.maxcontacts
;
618 wd
->flip_y
= raw_info
.origin
== TOUCHPAD_RAW_XY_ORIGIN_LOWER_LEFT
;
619 wd
->resolution
= raw_info
.res
;
624 static int wtp_allocate(struct hid_device
*hdev
, const struct hid_device_id
*id
)
626 struct hidpp_device
*hidpp
= hid_get_drvdata(hdev
);
629 wd
= devm_kzalloc(&hdev
->dev
, sizeof(struct wtp_data
),
634 hidpp
->private_data
= wd
;
639 /* -------------------------------------------------------------------------- */
640 /* Generic HID++ devices */
641 /* -------------------------------------------------------------------------- */
643 static int hidpp_input_mapping(struct hid_device
*hdev
, struct hid_input
*hi
,
644 struct hid_field
*field
, struct hid_usage
*usage
,
645 unsigned long **bit
, int *max
)
647 struct hidpp_device
*hidpp
= hid_get_drvdata(hdev
);
649 if (hidpp
->quirks
& HIDPP_QUIRK_CLASS_WTP
)
650 return wtp_input_mapping(hdev
, hi
, field
, usage
, bit
, max
);
655 static void hidpp_input_configured(struct hid_device
*hdev
,
656 struct hid_input
*hidinput
)
658 struct hidpp_device
*hidpp
= hid_get_drvdata(hdev
);
660 if (hidpp
->quirks
& HIDPP_QUIRK_CLASS_WTP
)
661 wtp_input_configured(hdev
, hidinput
);
664 static int hidpp_raw_hidpp_event(struct hidpp_device
*hidpp
, u8
*data
,
667 struct hidpp_report
*question
= hidpp
->send_receive_buf
;
668 struct hidpp_report
*answer
= hidpp
->send_receive_buf
;
669 struct hidpp_report
*report
= (struct hidpp_report
*)data
;
672 * If the mutex is locked then we have a pending answer from a
673 * previoulsly sent command
675 if (unlikely(mutex_is_locked(&hidpp
->send_mutex
))) {
677 * Check for a correct hidpp20 answer or the corresponding
680 if (hidpp_match_answer(question
, report
) ||
681 hidpp_match_error(question
, report
)) {
683 hidpp
->answer_available
= true;
684 wake_up(&hidpp
->wait
);
686 * This was an answer to a command that this driver sent
687 * We return 1 to hid-core to avoid forwarding the
688 * command upstream as it has been treated by the driver
695 if (hidpp
->quirks
& HIDPP_QUIRK_CLASS_WTP
)
696 return wtp_raw_event(hidpp
->hid_dev
, data
, size
);
701 static int hidpp_raw_event(struct hid_device
*hdev
, struct hid_report
*report
,
704 struct hidpp_device
*hidpp
= hid_get_drvdata(hdev
);
707 case REPORT_ID_HIDPP_LONG
:
708 if (size
!= HIDPP_REPORT_LONG_LENGTH
) {
709 hid_err(hdev
, "received hid++ report of bad size (%d)",
713 return hidpp_raw_hidpp_event(hidpp
, data
, size
);
714 case REPORT_ID_HIDPP_SHORT
:
715 if (size
!= HIDPP_REPORT_SHORT_LENGTH
) {
716 hid_err(hdev
, "received hid++ report of bad size (%d)",
720 return hidpp_raw_hidpp_event(hidpp
, data
, size
);
723 if (hidpp
->quirks
& HIDPP_QUIRK_CLASS_WTP
)
724 return wtp_raw_event(hdev
, data
, size
);
729 static void hidpp_overwrite_name(struct hid_device
*hdev
)
731 struct hidpp_device
*hidpp
= hid_get_drvdata(hdev
);
735 name
= hidpp_get_device_name(hidpp
, &name_length
);
738 hid_err(hdev
, "unable to retrieve the name of the device");
740 snprintf(hdev
->name
, sizeof(hdev
->name
), "%s", name
);
745 static int hidpp_probe(struct hid_device
*hdev
, const struct hid_device_id
*id
)
747 struct hidpp_device
*hidpp
;
751 hidpp
= devm_kzalloc(&hdev
->dev
, sizeof(struct hidpp_device
),
756 hidpp
->hid_dev
= hdev
;
757 hid_set_drvdata(hdev
, hidpp
);
759 hidpp
->quirks
= id
->driver_data
;
761 if (hidpp
->quirks
& HIDPP_QUIRK_CLASS_WTP
) {
762 ret
= wtp_allocate(hdev
, id
);
767 mutex_init(&hidpp
->send_mutex
);
768 init_waitqueue_head(&hidpp
->wait
);
770 ret
= hid_parse(hdev
);
772 hid_err(hdev
, "%s:parse failed\n", __func__
);
776 /* Allow incoming packets */
777 hid_device_io_start(hdev
);
779 connected
= hidpp_is_connected(hidpp
);
781 hid_err(hdev
, "Device not connected");
785 /* the device is connected, we can ask for its name */
786 hid_info(hdev
, "HID++ %u.%u device connected.\n",
787 hidpp
->protocol_major
, hidpp
->protocol_minor
);
788 hidpp_overwrite_name(hdev
);
790 if (hidpp
->quirks
& HIDPP_QUIRK_CLASS_WTP
) {
791 ret
= wtp_get_config(hidpp
);
796 /* Block incoming packets */
797 hid_device_io_stop(hdev
);
799 ret
= hid_hw_start(hdev
, HID_CONNECT_DEFAULT
);
801 hid_err(hdev
, "%s:hid_hw_start returned error\n", __func__
);
802 goto hid_hw_start_fail
;
809 mutex_destroy(&hidpp
->send_mutex
);
810 hid_set_drvdata(hdev
, NULL
);
814 static void hidpp_remove(struct hid_device
*hdev
)
816 struct hidpp_device
*hidpp
= hid_get_drvdata(hdev
);
818 mutex_destroy(&hidpp
->send_mutex
);
822 static const struct hid_device_id hidpp_devices
[] = {
823 { /* wireless touchpad T651 */
824 HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH
,
825 USB_DEVICE_ID_LOGITECH_T651
),
826 .driver_data
= HIDPP_QUIRK_CLASS_WTP
},
830 MODULE_DEVICE_TABLE(hid
, hidpp_devices
);
832 static struct hid_driver hidpp_driver
= {
833 .name
= "logitech-hidpp-device",
834 .id_table
= hidpp_devices
,
835 .probe
= hidpp_probe
,
836 .remove
= hidpp_remove
,
837 .raw_event
= hidpp_raw_event
,
838 .input_configured
= hidpp_input_configured
,
839 .input_mapping
= hidpp_input_mapping
,
842 module_hid_driver(hidpp_driver
);