aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-input-quirks.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/hid-input-quirks.c')
-rw-r--r--drivers/hid/hid-input-quirks.c76
1 files changed, 0 insertions, 76 deletions
diff --git a/drivers/hid/hid-input-quirks.c b/drivers/hid/hid-input-quirks.c
index 878e193c6d75..d1b4f093dcb3 100644
--- a/drivers/hid/hid-input-quirks.c
+++ b/drivers/hid/hid-input-quirks.c
@@ -102,50 +102,6 @@ static int quirk_chicony_tactical_pad(struct hid_usage *usage,
102 return 1; 102 return 1;
103} 103}
104 104
105static int quirk_microsoft_ergonomy_kb(struct hid_usage *usage,
106 struct hid_input *hidinput, unsigned long **bit, int *max)
107{
108 struct input_dev *input = hidinput->input;
109
110 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_MSVENDOR)
111 return 0;
112
113 switch(usage->hid & HID_USAGE) {
114 case 0xfd06: map_key_clear(KEY_CHAT); break;
115 case 0xfd07: map_key_clear(KEY_PHONE); break;
116 case 0xff05:
117 set_bit(EV_REP, input->evbit);
118 map_key_clear(KEY_F13);
119 set_bit(KEY_F14, input->keybit);
120 set_bit(KEY_F15, input->keybit);
121 set_bit(KEY_F16, input->keybit);
122 set_bit(KEY_F17, input->keybit);
123 set_bit(KEY_F18, input->keybit);
124 default:
125 return 0;
126 }
127 return 1;
128}
129
130static int quirk_microsoft_presenter_8k(struct hid_usage *usage,
131 struct hid_input *hidinput, unsigned long **bit, int *max)
132{
133 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_MSVENDOR)
134 return 0;
135
136 set_bit(EV_REP, hidinput->input->evbit);
137 switch(usage->hid & HID_USAGE) {
138 case 0xfd08: map_key_clear(KEY_FORWARD); break;
139 case 0xfd09: map_key_clear(KEY_BACK); break;
140 case 0xfd0b: map_key_clear(KEY_PLAYPAUSE); break;
141 case 0xfd0e: map_key_clear(KEY_CLOSE); break;
142 case 0xfd0f: map_key_clear(KEY_PLAY); break;
143 default:
144 return 0;
145 }
146 return 1;
147}
148
149static int quirk_petalynx_remote(struct hid_usage *usage, 105static int quirk_petalynx_remote(struct hid_usage *usage,
150 struct hid_input *hidinput, unsigned long **bit, int *max) 106 struct hid_input *hidinput, unsigned long **bit, int *max)
151{ 107{
@@ -244,12 +200,6 @@ static int quirk_sunplus_wdesktop(struct hid_usage *usage,
244#define VENDOR_ID_GYRATION 0x0c16 200#define VENDOR_ID_GYRATION 0x0c16
245#define DEVICE_ID_GYRATION_REMOTE 0x0002 201#define DEVICE_ID_GYRATION_REMOTE 0x0002
246 202
247#define VENDOR_ID_MICROSOFT 0x045e
248#define DEVICE_ID_MS4K 0x00db
249#define DEVICE_ID_MS6K 0x00f9
250#define DEVICE_IS_MS_PRESENTER_8K_BT 0x0701
251#define DEVICE_ID_MS_PRESENTER_8K_USB 0x0713
252
253#define VENDOR_ID_MONTEREY 0x0566 203#define VENDOR_ID_MONTEREY 0x0566
254#define DEVICE_ID_GENIUS_KB29E 0x3004 204#define DEVICE_ID_GENIUS_KB29E 0x3004
255 205
@@ -275,11 +225,6 @@ static const struct hid_input_blacklist {
275 225
276 { VENDOR_ID_GYRATION, DEVICE_ID_GYRATION_REMOTE, quirk_gyration_remote }, 226 { VENDOR_ID_GYRATION, DEVICE_ID_GYRATION_REMOTE, quirk_gyration_remote },
277 227
278 { VENDOR_ID_MICROSOFT, DEVICE_ID_MS4K, quirk_microsoft_ergonomy_kb },
279 { VENDOR_ID_MICROSOFT, DEVICE_ID_MS6K, quirk_microsoft_ergonomy_kb },
280 { VENDOR_ID_MICROSOFT, DEVICE_IS_MS_PRESENTER_8K_BT, quirk_microsoft_presenter_8k },
281 { VENDOR_ID_MICROSOFT, DEVICE_ID_MS_PRESENTER_8K_USB, quirk_microsoft_presenter_8k },
282
283 { VENDOR_ID_MONTEREY, DEVICE_ID_GENIUS_KB29E, quirk_cherry_genius_29e }, 228 { VENDOR_ID_MONTEREY, DEVICE_ID_GENIUS_KB29E, quirk_cherry_genius_29e },
284 229
285 { VENDOR_ID_PETALYNX, DEVICE_ID_PETALYNX_MAXTER_REMOTE, quirk_petalynx_remote }, 230 { VENDOR_ID_PETALYNX, DEVICE_ID_PETALYNX_MAXTER_REMOTE, quirk_petalynx_remote },
@@ -336,27 +281,6 @@ int hidinput_event_quirks(struct hid_device *hid, struct hid_field *field, struc
336 return 1; 281 return 1;
337 } 282 }
338 283
339 /* Handling MS keyboards special buttons */
340 if (hid->quirks & HID_QUIRK_MICROSOFT_KEYS &&
341 usage->hid == (HID_UP_MSVENDOR | 0xff05)) {
342 int key = 0;
343 static int last_key = 0;
344 switch (value) {
345 case 0x01: key = KEY_F14; break;
346 case 0x02: key = KEY_F15; break;
347 case 0x04: key = KEY_F16; break;
348 case 0x08: key = KEY_F17; break;
349 case 0x10: key = KEY_F18; break;
350 default: break;
351 }
352 if (key) {
353 input_event(input, usage->type, key, 1);
354 last_key = key;
355 } else {
356 input_event(input, usage->type, last_key, 0);
357 }
358 }
359
360 /* handle the temporary quirky mapping to HWHEEL */ 284 /* handle the temporary quirky mapping to HWHEEL */
361 if (hid->quirks & HID_QUIRK_HWHEEL_WHEEL_INVERT && 285 if (hid->quirks & HID_QUIRK_HWHEEL_WHEEL_INVERT &&
362 usage->type == EV_REL && usage->code == REL_HWHEEL) { 286 usage->type == EV_REL && usage->code == REL_HWHEEL) {