Commit | Line | Data |
---|---|---|
980a3da6 JS |
1 | /* |
2 | * HID driver for some samsung "special" devices | |
3 | * | |
4 | * Copyright (c) 1999 Andreas Gal | |
5 | * Copyright (c) 2000-2005 Vojtech Pavlik <vojtech@suse.cz> | |
6 | * Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc | |
7 | * Copyright (c) 2006-2007 Jiri Kosina | |
980a3da6 | 8 | * Copyright (c) 2008 Jiri Slaby |
b355850b DP |
9 | * Copyright (c) 2010 Don Prince <dhprince.devel@yahoo.co.uk> |
10 | * | |
11 | * | |
12 | * This driver supports several HID devices: | |
13 | * | |
14 | * [0419:0001] Samsung IrDA remote controller (reports as Cypress USB Mouse). | |
15 | * various hid report fixups for different variants. | |
16 | * | |
17 | * [0419:0600] Creative Desktop Wireless 6000 keyboard/mouse combo | |
18 | * several key mappings used from the consumer usage page | |
19 | * deviate from the USB HUT 1.12 standard. | |
20 | * | |
980a3da6 JS |
21 | */ |
22 | ||
23 | /* | |
24 | * This program is free software; you can redistribute it and/or modify it | |
25 | * under the terms of the GNU General Public License as published by the Free | |
26 | * Software Foundation; either version 2 of the License, or (at your option) | |
27 | * any later version. | |
28 | */ | |
29 | ||
30 | #include <linux/device.h> | |
b355850b | 31 | #include <linux/usb.h> |
980a3da6 JS |
32 | #include <linux/hid.h> |
33 | #include <linux/module.h> | |
34 | ||
35 | #include "hid-ids.h" | |
36 | ||
37 | /* | |
0810b511 RS |
38 | * There are several variants for 0419:0001: |
39 | * | |
40 | * 1. 184 byte report descriptor | |
980a3da6 JS |
41 | * Vendor specific report #4 has a size of 48 bit, |
42 | * and therefore is not accepted when inspecting the descriptors. | |
43 | * As a workaround we reinterpret the report as: | |
44 | * Variable type, count 6, size 8 bit, log. maximum 255 | |
45 | * The burden to reconstruct the data is moved into user space. | |
0810b511 RS |
46 | * |
47 | * 2. 203 byte report descriptor | |
48 | * Report #4 has an array field with logical range 0..18 instead of 1..15. | |
49 | * | |
50 | * 3. 135 byte report descriptor | |
51 | * Report #4 has an array field with logical range 0..17 instead of 1..14. | |
3975bc56 RS |
52 | * |
53 | * 4. 171 byte report descriptor | |
54 | * Report #3 has an array field with logical range 0..1 instead of 1..3. | |
980a3da6 | 55 | */ |
b355850b | 56 | static inline void samsung_irda_dev_trace(struct hid_device *hdev, |
3975bc56 RS |
57 | unsigned int rsize) |
58 | { | |
4291ee30 JP |
59 | hid_info(hdev, "fixing up Samsung IrDA %d byte report descriptor\n", |
60 | rsize); | |
3975bc56 RS |
61 | } |
62 | ||
73e4008d NK |
63 | static __u8 *samsung_irda_report_fixup(struct hid_device *hdev, __u8 *rdesc, |
64 | unsigned int *rsize) | |
980a3da6 | 65 | { |
73e4008d | 66 | if (*rsize == 184 && rdesc[175] == 0x25 && rdesc[176] == 0x40 && |
980a3da6 JS |
67 | rdesc[177] == 0x75 && rdesc[178] == 0x30 && |
68 | rdesc[179] == 0x95 && rdesc[180] == 0x01 && | |
69 | rdesc[182] == 0x40) { | |
b355850b | 70 | samsung_irda_dev_trace(hdev, 184); |
980a3da6 JS |
71 | rdesc[176] = 0xff; |
72 | rdesc[178] = 0x08; | |
73 | rdesc[180] = 0x06; | |
74 | rdesc[182] = 0x42; | |
0810b511 | 75 | } else |
73e4008d | 76 | if (*rsize == 203 && rdesc[192] == 0x15 && rdesc[193] == 0x0 && |
0810b511 | 77 | rdesc[194] == 0x25 && rdesc[195] == 0x12) { |
b355850b | 78 | samsung_irda_dev_trace(hdev, 203); |
0810b511 RS |
79 | rdesc[193] = 0x1; |
80 | rdesc[195] = 0xf; | |
81 | } else | |
73e4008d | 82 | if (*rsize == 135 && rdesc[124] == 0x15 && rdesc[125] == 0x0 && |
0810b511 | 83 | rdesc[126] == 0x25 && rdesc[127] == 0x11) { |
b355850b | 84 | samsung_irda_dev_trace(hdev, 135); |
0810b511 RS |
85 | rdesc[125] = 0x1; |
86 | rdesc[127] = 0xe; | |
3975bc56 | 87 | } else |
73e4008d | 88 | if (*rsize == 171 && rdesc[160] == 0x15 && rdesc[161] == 0x0 && |
3975bc56 | 89 | rdesc[162] == 0x25 && rdesc[163] == 0x01) { |
b355850b | 90 | samsung_irda_dev_trace(hdev, 171); |
3975bc56 RS |
91 | rdesc[161] = 0x1; |
92 | rdesc[163] = 0x3; | |
980a3da6 | 93 | } |
73e4008d | 94 | return rdesc; |
980a3da6 JS |
95 | } |
96 | ||
b355850b DP |
97 | #define samsung_kbd_mouse_map_key_clear(c) \ |
98 | hid_map_usage_clear(hi, usage, bit, max, EV_KEY, (c)) | |
99 | ||
100 | static int samsung_kbd_mouse_input_mapping(struct hid_device *hdev, | |
101 | struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, | |
102 | unsigned long **bit, int *max) | |
103 | { | |
104 | struct usb_interface *intf = to_usb_interface(hdev->dev.parent); | |
105 | unsigned short ifnum = intf->cur_altsetting->desc.bInterfaceNumber; | |
106 | ||
107 | if (1 != ifnum || HID_UP_CONSUMER != (usage->hid & HID_USAGE_PAGE)) | |
108 | return 0; | |
109 | ||
110 | dbg_hid("samsung wireless keyboard/mouse input mapping event [0x%x]\n", | |
111 | usage->hid & HID_USAGE); | |
112 | ||
113 | switch (usage->hid & HID_USAGE) { | |
114 | /* report 2 */ | |
b355850b DP |
115 | case 0x183: samsung_kbd_mouse_map_key_clear(KEY_MEDIA); break; |
116 | case 0x195: samsung_kbd_mouse_map_key_clear(KEY_EMAIL); break; | |
117 | case 0x196: samsung_kbd_mouse_map_key_clear(KEY_CALC); break; | |
118 | case 0x197: samsung_kbd_mouse_map_key_clear(KEY_COMPUTER); break; | |
119 | case 0x22b: samsung_kbd_mouse_map_key_clear(KEY_SEARCH); break; | |
120 | case 0x22c: samsung_kbd_mouse_map_key_clear(KEY_WWW); break; | |
121 | case 0x22d: samsung_kbd_mouse_map_key_clear(KEY_BACK); break; | |
122 | case 0x22e: samsung_kbd_mouse_map_key_clear(KEY_FORWARD); break; | |
123 | case 0x22f: samsung_kbd_mouse_map_key_clear(KEY_FAVORITES); break; | |
124 | case 0x230: samsung_kbd_mouse_map_key_clear(KEY_REFRESH); break; | |
125 | case 0x231: samsung_kbd_mouse_map_key_clear(KEY_STOP); break; | |
126 | default: | |
127 | return 0; | |
128 | } | |
129 | ||
130 | return 1; | |
131 | } | |
132 | ||
1cac41cb MB |
133 | static int samsung_kbd_input_mapping(struct hid_device *hdev, |
134 | struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, | |
135 | unsigned long **bit, int *max) | |
136 | { | |
137 | if (!(HID_UP_CONSUMER == (usage->hid & HID_USAGE_PAGE) || | |
138 | HID_UP_KEYBOARD == (usage->hid & HID_USAGE_PAGE))) | |
139 | return 0; | |
140 | ||
141 | dbg_hid("samsung wireless keyboard input mapping event [0x%x]\n", | |
142 | usage->hid & HID_USAGE); | |
143 | ||
144 | if (HID_UP_KEYBOARD == (usage->hid & HID_USAGE_PAGE)) { | |
145 | switch (usage->hid & HID_USAGE) { | |
146 | set_bit(EV_REP, hi->input->evbit); | |
147 | /* Only for UK keyboard */ | |
148 | /* key found */ | |
149 | #ifdef CONFIG_HID_KK_UPGRADE | |
150 | case 0x32: samsung_kbd_mouse_map_key_clear(KEY_KBDILLUMTOGGLE); break; | |
151 | case 0x64: samsung_kbd_mouse_map_key_clear(KEY_BACKSLASH); break; | |
152 | #else | |
153 | case 0x32: samsung_kbd_mouse_map_key_clear(KEY_BACKSLASH); break; | |
154 | case 0x64: samsung_kbd_mouse_map_key_clear(KEY_102ND); break; | |
155 | #endif | |
156 | /* Only for BR keyboard */ | |
157 | case 0x87: samsung_kbd_mouse_map_key_clear(KEY_RO); break; | |
158 | default: | |
159 | return 0; | |
160 | } | |
161 | } | |
162 | ||
163 | if (HID_UP_CONSUMER == (usage->hid & HID_USAGE_PAGE)) { | |
164 | switch (usage->hid & HID_USAGE) { | |
165 | /* report 2 */ | |
166 | /* MENU */ | |
167 | case 0x040: samsung_kbd_mouse_map_key_clear(KEY_MENU); break; | |
168 | case 0x18a: samsung_kbd_mouse_map_key_clear(KEY_MAIL); break; | |
169 | case 0x196: samsung_kbd_mouse_map_key_clear(KEY_WWW); break; | |
170 | case 0x19e: samsung_kbd_mouse_map_key_clear(KEY_SCREENLOCK); break; | |
171 | case 0x221: samsung_kbd_mouse_map_key_clear(KEY_SEARCH); break; | |
172 | case 0x223: samsung_kbd_mouse_map_key_clear(KEY_HOMEPAGE); break; | |
173 | /* RECENTAPPS */ | |
174 | case 0x301: samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY1); break; | |
175 | /* APPLICATION */ | |
176 | case 0x302: samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY2); break; | |
177 | /* Voice search */ | |
178 | case 0x305: samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY4); break; | |
179 | /* QPANEL on/off */ | |
180 | case 0x306: samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY5); break; | |
181 | /* SIP on/off */ | |
182 | case 0x307: samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY3); break; | |
183 | /* LANG */ | |
184 | case 0x308: samsung_kbd_mouse_map_key_clear(KEY_LANGUAGE); break; | |
185 | case 0x30a: samsung_kbd_mouse_map_key_clear(KEY_BRIGHTNESSDOWN); break; | |
186 | case 0x30b: samsung_kbd_mouse_map_key_clear(KEY_BRIGHTNESSUP); break; | |
187 | default: | |
188 | return 0; | |
189 | } | |
190 | } | |
191 | ||
192 | return 1; | |
193 | } | |
194 | ||
195 | static int samsung_gamepad_input_mapping(struct hid_device *hdev, | |
196 | struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, | |
197 | unsigned long **bit, int *max) | |
198 | { | |
199 | if (!(HID_UP_BUTTON == (usage->hid & HID_USAGE_PAGE) || | |
200 | HID_UP_CONSUMER == (usage->hid & HID_USAGE_PAGE))) | |
201 | return 0; | |
202 | ||
203 | dbg_hid("samsung wireless gamepad input mapping event [0x%x], %ld, %ld, [0x%x]\n", | |
204 | usage->hid & HID_USAGE, hi->input->evbit[0], hi->input->absbit[0], usage->hid & HID_USAGE_PAGE); | |
205 | ||
206 | if (HID_UP_BUTTON == (usage->hid & HID_USAGE_PAGE)) { | |
207 | switch(usage->hid & HID_USAGE) { | |
208 | case 0x01: samsung_kbd_mouse_map_key_clear(BTN_A); break; | |
209 | case 0x02: samsung_kbd_mouse_map_key_clear(BTN_B); break; | |
210 | case 0x03: samsung_kbd_mouse_map_key_clear(BTN_C); break; | |
211 | case 0x04: samsung_kbd_mouse_map_key_clear(BTN_X); break; | |
212 | case 0x05: samsung_kbd_mouse_map_key_clear(BTN_Y); break; | |
213 | case 0x06: samsung_kbd_mouse_map_key_clear(BTN_Z); break; | |
214 | case 0x07: samsung_kbd_mouse_map_key_clear(BTN_TL); break; | |
215 | case 0x08: samsung_kbd_mouse_map_key_clear(BTN_TR); break; | |
216 | case 0x09: samsung_kbd_mouse_map_key_clear(BTN_TL2); break; | |
217 | case 0x0a: samsung_kbd_mouse_map_key_clear(BTN_TR2); break; | |
218 | case 0x0b: samsung_kbd_mouse_map_key_clear(BTN_SELECT); break; | |
219 | case 0x0c: samsung_kbd_mouse_map_key_clear(BTN_START); break; | |
220 | case 0x0d: samsung_kbd_mouse_map_key_clear(BTN_MODE); break; | |
221 | case 0x0e: samsung_kbd_mouse_map_key_clear(BTN_THUMBL); break; | |
222 | case 0x0f: samsung_kbd_mouse_map_key_clear(BTN_THUMBR); break; | |
223 | case 0x10: samsung_kbd_mouse_map_key_clear(BTN_GAME); break; | |
224 | default: | |
225 | return 0; | |
226 | } | |
227 | } | |
228 | ||
229 | if (HID_UP_CONSUMER == (usage->hid & HID_USAGE_PAGE)) { | |
230 | switch (usage->hid & HID_USAGE) { | |
231 | case 0x040: samsung_kbd_mouse_map_key_clear(KEY_MENU); break; | |
232 | case 0x223: samsung_kbd_mouse_map_key_clear(KEY_HOMEPAGE); break; | |
233 | case 0x224: samsung_kbd_mouse_map_key_clear(KEY_BACK); break; | |
234 | ||
235 | /* Screen Capture */ | |
236 | case 0x303: samsung_kbd_mouse_map_key_clear(KEY_SYSRQ); break; | |
237 | ||
238 | default: | |
239 | return 0; | |
240 | } | |
241 | } | |
242 | ||
243 | return 1; | |
244 | } | |
245 | ||
246 | static int samsung_actionmouse_input_mapping(struct hid_device *hdev, | |
247 | struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, | |
248 | unsigned long **bit, int *max) | |
249 | { | |
250 | ||
251 | dbg_hid("samsung wireless actionmouse input mapping event [0x%x], [0x%x], %ld, %ld, [0x%x]\n", | |
252 | usage->hid, usage->hid & HID_USAGE, hi->input->evbit[0], hi->input->absbit[0], usage->hid & HID_USAGE_PAGE); | |
253 | ||
254 | if(((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER) && ((usage->hid & HID_USAGE_PAGE) != HID_UP_BUTTON)) | |
255 | return 0; | |
256 | ||
257 | switch (usage->hid & HID_USAGE) { | |
258 | case 0x301: samsung_kbd_mouse_map_key_clear(KEY_RECENT); break; | |
259 | default: | |
260 | return 0; | |
261 | } | |
262 | ||
263 | return 1; | |
264 | } | |
265 | ||
266 | static int samsung_universal_kbd_input_mapping(struct hid_device *hdev, | |
267 | struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, | |
268 | unsigned long **bit, int *max) | |
269 | { | |
270 | if (!(HID_UP_CONSUMER == (usage->hid & HID_USAGE_PAGE) || | |
271 | HID_UP_KEYBOARD == (usage->hid & HID_USAGE_PAGE))) | |
272 | return 0; | |
273 | ||
274 | dbg_hid("samsung wireless keyboard input mapping event [0x%x]\n", | |
275 | usage->hid & HID_USAGE); | |
276 | ||
277 | if (HID_UP_KEYBOARD == (usage->hid & HID_USAGE_PAGE)) { | |
278 | switch (usage->hid & HID_USAGE) { | |
279 | set_bit(EV_REP, hi->input->evbit); | |
280 | /* Only for UK keyboard */ | |
281 | /* key found */ | |
282 | #ifdef CONFIG_HID_KK_UPGRADE | |
283 | case 0x32: samsung_kbd_mouse_map_key_clear(KEY_KBDILLUMTOGGLE); break; | |
284 | case 0x64: samsung_kbd_mouse_map_key_clear(KEY_BACKSLASH); break; | |
285 | #else | |
286 | case 0x32: samsung_kbd_mouse_map_key_clear(KEY_BACKSLASH); break; | |
287 | case 0x64: samsung_kbd_mouse_map_key_clear(KEY_102ND); break; | |
288 | #endif | |
289 | /* Only for BR keyboard */ | |
290 | case 0x87: samsung_kbd_mouse_map_key_clear(KEY_RO); break; | |
291 | default: | |
292 | return 0; | |
293 | } | |
294 | } | |
295 | ||
296 | if (HID_UP_CONSUMER == (usage->hid & HID_USAGE_PAGE)) { | |
297 | switch (usage->hid & HID_USAGE) { | |
298 | /* report 2 */ | |
299 | /* MENU */ | |
300 | case 0x040: samsung_kbd_mouse_map_key_clear(KEY_MENU); break; | |
301 | case 0x18a: samsung_kbd_mouse_map_key_clear(KEY_MAIL); break; | |
302 | case 0x196: samsung_kbd_mouse_map_key_clear(KEY_WWW); break; | |
303 | case 0x19e: samsung_kbd_mouse_map_key_clear(KEY_SCREENLOCK); break; | |
304 | case 0x221: samsung_kbd_mouse_map_key_clear(KEY_SEARCH); break; | |
305 | case 0x223: samsung_kbd_mouse_map_key_clear(KEY_HOMEPAGE); break; | |
306 | /* RECENTAPPS */ | |
307 | case 0x301: samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY1); break; | |
308 | /* APPLICATION */ | |
309 | case 0x302: samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY2); break; | |
310 | /* Voice search */ | |
311 | case 0x305: samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY4); break; | |
312 | /* QPANEL on/off */ | |
313 | case 0x306: samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY5); break; | |
314 | /* SIP on/off */ | |
315 | case 0x307: samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY3); break; | |
316 | /* LANG */ | |
317 | case 0x308: samsung_kbd_mouse_map_key_clear(KEY_LANGUAGE); break; | |
318 | case 0x30a: samsung_kbd_mouse_map_key_clear(KEY_BRIGHTNESSDOWN); break; | |
319 | case 0x070: samsung_kbd_mouse_map_key_clear(KEY_BRIGHTNESSDOWN); break; | |
320 | case 0x30b: samsung_kbd_mouse_map_key_clear(KEY_BRIGHTNESSUP); break; | |
321 | case 0x06f: samsung_kbd_mouse_map_key_clear(KEY_BRIGHTNESSUP); break; | |
322 | /* S-Finder */ | |
323 | case 0x304: samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY7); break; | |
324 | /* Screen Capture */ | |
325 | case 0x303: samsung_kbd_mouse_map_key_clear(KEY_SYSRQ); break; | |
326 | /* Multi Window */ | |
327 | case 0x309: samsung_kbd_mouse_map_key_clear(BTN_TRIGGER_HAPPY9); break; | |
328 | default: | |
329 | return 0; | |
330 | } | |
331 | } | |
332 | ||
333 | return 1; | |
334 | } | |
335 | ||
73e4008d NK |
336 | static __u8 *samsung_report_fixup(struct hid_device *hdev, __u8 *rdesc, |
337 | unsigned int *rsize) | |
b355850b DP |
338 | { |
339 | if (USB_DEVICE_ID_SAMSUNG_IR_REMOTE == hdev->product) | |
73e4008d NK |
340 | rdesc = samsung_irda_report_fixup(hdev, rdesc, rsize); |
341 | return rdesc; | |
b355850b DP |
342 | } |
343 | ||
344 | static int samsung_input_mapping(struct hid_device *hdev, struct hid_input *hi, | |
345 | struct hid_field *field, struct hid_usage *usage, | |
346 | unsigned long **bit, int *max) | |
347 | { | |
348 | int ret = 0; | |
349 | ||
350 | if (USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE == hdev->product) | |
351 | ret = samsung_kbd_mouse_input_mapping(hdev, | |
352 | hi, field, usage, bit, max); | |
1cac41cb MB |
353 | else if (USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD == hdev->product) |
354 | ret = samsung_kbd_input_mapping(hdev, | |
355 | hi, field, usage, bit, max); | |
356 | else if(USB_DEVICE_ID_SAMSUNG_WIRELESS_GAMEPAD == hdev->product) | |
357 | ret = samsung_gamepad_input_mapping(hdev, | |
358 | hi, field, usage, bit, max); | |
359 | else if(USB_DEVICE_ID_SAMSUNG_WIRELESS_ACTIONMOUSE == hdev->product) | |
360 | ret = samsung_actionmouse_input_mapping(hdev, | |
361 | hi, field, usage, bit, max); | |
362 | else if(USB_DEVICE_ID_SAMSUNG_WIRELESS_UNIVERSAL_KBD == hdev->product) | |
363 | ret = samsung_universal_kbd_input_mapping(hdev, | |
364 | hi, field, usage, bit, max); | |
b355850b DP |
365 | |
366 | return ret; | |
367 | } | |
368 | ||
980a3da6 JS |
369 | static int samsung_probe(struct hid_device *hdev, |
370 | const struct hid_device_id *id) | |
371 | { | |
372 | int ret; | |
0810b511 | 373 | unsigned int cmask = HID_CONNECT_DEFAULT; |
980a3da6 | 374 | |
980a3da6 JS |
375 | ret = hid_parse(hdev); |
376 | if (ret) { | |
4291ee30 | 377 | hid_err(hdev, "parse failed\n"); |
980a3da6 JS |
378 | goto err_free; |
379 | } | |
380 | ||
b355850b DP |
381 | if (USB_DEVICE_ID_SAMSUNG_IR_REMOTE == hdev->product) { |
382 | if (hdev->rsize == 184) { | |
383 | /* disable hidinput, force hiddev */ | |
384 | cmask = (cmask & ~HID_CONNECT_HIDINPUT) | | |
385 | HID_CONNECT_HIDDEV_FORCE; | |
386 | } | |
0810b511 RS |
387 | } |
388 | ||
389 | ret = hid_hw_start(hdev, cmask); | |
980a3da6 | 390 | if (ret) { |
4291ee30 | 391 | hid_err(hdev, "hw start failed\n"); |
980a3da6 JS |
392 | goto err_free; |
393 | } | |
394 | ||
395 | return 0; | |
396 | err_free: | |
397 | return ret; | |
398 | } | |
399 | ||
400 | static const struct hid_device_id samsung_devices[] = { | |
401 | { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) }, | |
b355850b | 402 | { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) }, |
1cac41cb MB |
403 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SAMSUNG_ELECTRONICS, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD) }, |
404 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SAMSUNG_ELECTRONICS, USB_DEVICE_ID_SAMSUNG_WIRELESS_GAMEPAD) }, | |
405 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SAMSUNG_ELECTRONICS, USB_DEVICE_ID_SAMSUNG_WIRELESS_ACTIONMOUSE) }, | |
406 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SAMSUNG_ELECTRONICS, USB_DEVICE_ID_SAMSUNG_WIRELESS_UNIVERSAL_KBD) }, | |
980a3da6 JS |
407 | { } |
408 | }; | |
409 | MODULE_DEVICE_TABLE(hid, samsung_devices); | |
410 | ||
411 | static struct hid_driver samsung_driver = { | |
412 | .name = "samsung", | |
413 | .id_table = samsung_devices, | |
414 | .report_fixup = samsung_report_fixup, | |
b355850b | 415 | .input_mapping = samsung_input_mapping, |
980a3da6 JS |
416 | .probe = samsung_probe, |
417 | }; | |
f425458e | 418 | module_hid_driver(samsung_driver); |
980a3da6 | 419 | |
980a3da6 | 420 | MODULE_LICENSE("GPL"); |