Lines Matching +full:0 +full:xff100000

41 #define TP_X12_RAW_HOTKEY_FN_F4		0x00020003
42 #define TP_X12_RAW_HOTKEY_FN_F8 0x38001003
43 #define TP_X12_RAW_HOTKEY_FN_F10 0x00000803
44 #define TP_X12_RAW_HOTKEY_FN_F12 0x00000403
45 #define TP_X12_RAW_HOTKEY_FN_SPACE 0x18001003
61 /* 0: Up
74 #define TP10UBKBD_FN_LOCK_LED 0x54
75 #define TP10UBKBD_MUTE_LED 0x64
76 #define TP10UBKBD_MICMUTE_LED 0x74
85 input_report_key(input, keycode, 0); in report_key_event()
97 data->led_report[0] = TP10UBKBD_LED_OUTPUT_REPORT; in lenovo_led_set_tp10ubkbd()
100 ret = hid_hw_raw_request(hdev, data->led_report[0], data->led_report, 3, in lenovo_led_set_tp10ubkbd()
106 ret = ret < 0 ? ret : -EIO; in lenovo_led_set_tp10ubkbd()
108 ret = 0; in lenovo_led_set_tp10ubkbd()
126 0x05, 0x88, /* Usage Page (Vendor Usage Page 0x88) */
127 0x09, 0x01, /* Usage (Vendor Usage 0x01) */
128 0xa1, 0x01, /* Collection (Application) */
129 0x85, 0x04, /* Report ID (4) */
130 0x19, 0x00, /* Usage Minimum (0) */
131 0x2a, 0xff, 0xff, /* Usage Maximum (65535) */
136 0x06, 0x00, 0xFF, /* Usage Page (Vendor Defined 0xFF00) */
137 0x09, 0x01, /* Usage (0x01) */
138 0xA1, 0x01, /* Collection (Application) */
139 0x85, 0x05, /* Report ID (5) */
140 0x1A, 0xF1, 0x00, /* Usage Minimum (0xF1) */
141 0x2A, 0xFC, 0x00, /* Usage Maximum (0xFC) */
142 0x15, 0x00, /* Logical Minimum (0) */
143 0x25, 0x01, /* Logical Maximum (1) */
144 0x75, 0x01, /* Report Size (1) */
145 0x95, 0x0D, /* Report Count (13) */
146 0x81, 0x02, /* Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) */
147 0x95, 0x03, /* Report Count (3) */
148 0x81, 0x01, /* Input (Const,Array,Abs,No Wrap,Linear,Preferred State,No Null Position) */
158 * 0x8801 from the report ID 4 in lenovo_report_fixup()
162 sizeof(lenovo_pro_dock_need_fixup_collection)) == 0) { in lenovo_report_fixup()
163 rdesc[151] = 0x01; in lenovo_report_fixup()
164 rdesc[152] = 0x00; in lenovo_report_fixup()
170 sizeof(lenovo_tpIIbtkbd_need_fixup_collection)) == 0) { in lenovo_report_fixup()
171 rdesc[244] = 0x00; /* usage minimum = 0x00 */ in lenovo_report_fixup()
172 rdesc[247] = 0xff; /* usage maximum = 0xff */ in lenovo_report_fixup()
173 rdesc[252] = 0xff; /* logical maximum = 0xff */ in lenovo_report_fixup()
174 rdesc[254] = 0x08; /* report size = 0x08 */ in lenovo_report_fixup()
175 rdesc[256] = 0x01; /* report count = 0x01 */ in lenovo_report_fixup()
176 rdesc[258] = 0x00; /* input = 0x00 */ in lenovo_report_fixup()
177 rdesc[260] = 0x01; /* report count (2) = 0x01 */ in lenovo_report_fixup()
188 if (usage->hid == (HID_UP_BUTTON | 0x0010)) { in lenovo_input_mapping_tpkbd()
194 return 0; in lenovo_input_mapping_tpkbd()
205 case 0x00f1: /* Fn-F4: Mic mute */ in lenovo_input_mapping_cptkbd()
208 case 0x00f2: /* Fn-F5: Brightness down */ in lenovo_input_mapping_cptkbd()
211 case 0x00f3: /* Fn-F6: Brightness up */ in lenovo_input_mapping_cptkbd()
214 case 0x00f4: /* Fn-F7: External display (projector) */ in lenovo_input_mapping_cptkbd()
217 case 0x00f5: /* Fn-F8: Wireless */ in lenovo_input_mapping_cptkbd()
220 case 0x00f6: /* Fn-F9: Control panel */ in lenovo_input_mapping_cptkbd()
223 case 0x00f8: /* Fn-F11: View open applications (3 boxes) */ in lenovo_input_mapping_cptkbd()
226 case 0x00f9: /* Fn-F12: Open My computer (6 boxes) USB-only */ in lenovo_input_mapping_cptkbd()
230 case 0x00fa: /* Fn-Esc: Fn-lock toggle */ in lenovo_input_mapping_cptkbd()
233 case 0x00fb: /* Middle mouse button (in native mode) */ in lenovo_input_mapping_cptkbd()
243 (usage->hid & HID_USAGE) == 0x003) in lenovo_input_mapping_cptkbd()
246 (usage->hid & HID_USAGE) == 0x238) in lenovo_input_mapping_cptkbd()
249 /* Map wheel emulation reports: 0xffa1 = USB, 0xff10 = BT */ in lenovo_input_mapping_cptkbd()
250 if ((usage->hid & HID_USAGE_PAGE) == 0xff100000 || in lenovo_input_mapping_cptkbd()
251 (usage->hid & HID_USAGE_PAGE) == 0xffa10000) { in lenovo_input_mapping_cptkbd()
257 case 0x0000: in lenovo_input_mapping_cptkbd()
260 case 0x0001: in lenovo_input_mapping_cptkbd()
268 return 0; in lenovo_input_mapping_cptkbd()
276 * 0xff0a0000 = USB, HID_UP_MSVENDOR = BT. in lenovo_input_mapping_tpIIkbd()
281 if (((usage->hid & HID_USAGE_PAGE) == 0xff0a0000 || in lenovo_input_mapping_tpIIkbd()
285 case 0x00bb: /* Fn-F4: Mic mute */ in lenovo_input_mapping_tpIIkbd()
288 case 0x00c3: /* Fn-F5: Brightness down */ in lenovo_input_mapping_tpIIkbd()
291 case 0x00c4: /* Fn-F6: Brightness up */ in lenovo_input_mapping_tpIIkbd()
294 case 0x00c1: /* Fn-F8: Notification center */ in lenovo_input_mapping_tpIIkbd()
297 case 0x00bc: /* Fn-F9: Control panel */ in lenovo_input_mapping_tpIIkbd()
300 case 0x00b6: /* Fn-F10: Bluetooth */ in lenovo_input_mapping_tpIIkbd()
303 case 0x00b7: /* Fn-F11: Keyboard config */ in lenovo_input_mapping_tpIIkbd()
306 case 0x00b8: /* Fn-F12: User function */ in lenovo_input_mapping_tpIIkbd()
309 case 0x00b9: /* Fn-PrtSc: Snipping tool */ in lenovo_input_mapping_tpIIkbd()
312 case 0x00b5: /* Fn-Esc: Fn-lock toggle */ in lenovo_input_mapping_tpIIkbd()
318 if ((usage->hid & HID_USAGE_PAGE) == 0xffa00000) { in lenovo_input_mapping_tpIIkbd()
320 case 0x00fb: /* Middle mouse (in native USB mode) */ in lenovo_input_mapping_tpIIkbd()
329 case 0x0004: /* Middle mouse (in native Bluetooth mode) */ in lenovo_input_mapping_tpIIkbd()
339 (usage->hid & HID_USAGE) == 0x003) in lenovo_input_mapping_tpIIkbd()
342 (usage->hid & HID_USAGE) == 0x238) in lenovo_input_mapping_tpIIkbd()
345 /* Map wheel emulation reports: 0xff10 */ in lenovo_input_mapping_tpIIkbd()
346 if ((usage->hid & HID_USAGE_PAGE) == 0xff100000) { in lenovo_input_mapping_tpIIkbd()
352 case 0x0000: in lenovo_input_mapping_tpIIkbd()
355 case 0x0001: in lenovo_input_mapping_tpIIkbd()
363 return 0; in lenovo_input_mapping_tpIIkbd()
374 return 0; in lenovo_input_mapping_scrollpoint()
382 * The ThinkPad 10 Ultrabook Keyboard uses 0x000c0001 usage for in lenovo_input_mapping_tp10_ultrabook_kbd()
385 if (usage->hid == 0x000c0001) { in lenovo_input_mapping_tp10_ultrabook_kbd()
409 if (usage->hid == 0x00070072) in lenovo_input_mapping_tp10_ultrabook_kbd()
412 return 0; in lenovo_input_mapping_tp10_ultrabook_kbd()
420 * The ThinkPad X1 Tablet Thin Keyboard uses 0x000c0001 usage for in lenovo_input_mapping_x1_tab_kbd()
423 if (usage->hid == 0x000c0001) { in lenovo_input_mapping_x1_tab_kbd()
425 case 0: /* Fn-F10: Enable/disable bluetooth */ in lenovo_input_mapping_x1_tab_kbd()
455 if (usage->hid == (HID_UP_KEYBOARD | 0x009a)) { in lenovo_input_mapping_x1_tab_kbd()
460 return 0; in lenovo_input_mapping_x1_tab_kbd()
497 return 0; in lenovo_input_mapping()
515 * Feature report 0x13 is used for USB, in lenovo_send_cmd_cptkbd()
516 * output report 0x18 is used for Bluetooth. in lenovo_send_cmd_cptkbd()
517 * buf[0] is ignored by hid_hw_raw_request. in lenovo_send_cmd_cptkbd()
519 buf[0] = 0x18; in lenovo_send_cmd_cptkbd()
526 ret = hid_hw_raw_request(hdev, 0x13, buf, 3, in lenovo_send_cmd_cptkbd()
540 return ret < 0 ? ret : 0; /* BT returns 0, USB returns sizeof(buf) */ in lenovo_send_cmd_cptkbd()
554 ret = lenovo_send_cmd_cptkbd(hdev, 0x01, 0x03); in lenovo_features_set_cptkbd()
560 ret = lenovo_send_cmd_cptkbd(hdev, 0x09, 0x01); in lenovo_features_set_cptkbd()
564 ret = lenovo_send_cmd_cptkbd(hdev, 0x05, cptkbd_data->fn_lock); in lenovo_features_set_cptkbd()
568 ret = lenovo_send_cmd_cptkbd(hdev, 0x02, cptkbd_data->sensitivity); in lenovo_features_set_cptkbd()
594 if (value < 0 || value > 1) in attr_fn_lock_store()
671 if (value < 0 || value > 1) in attr_middleclick_workaround_store_cptkbd()
755 return 0; in lenovo_raw_event_TP_X12_tab()
768 && data[0] == 0x15 in lenovo_raw_event()
769 && data[1] == 0x94 in lenovo_raw_event()
770 && data[2] == 0x01)) { in lenovo_raw_event()
771 data[1] = 0x00; in lenovo_raw_event()
772 data[2] = 0x01; in lenovo_raw_event()
776 * Lenovo TP X12 Tab KBD's Fn+XX is HID raw data defined. Report ID is 0x03 in lenovo_raw_event()
777 * e.g.: Raw data received for MIC mute is 0x00020003. in lenovo_raw_event()
781 && size >= 3 && report->id == 0x03)) in lenovo_raw_event()
784 return 0; in lenovo_raw_event()
802 return 0; in lenovo_event_tp10ubkbd()
816 return 0; in lenovo_event_cptkbd()
823 } else if (value == 0) { in lenovo_event_cptkbd()
830 EV_KEY, BTN_MIDDLE, 0); in lenovo_event_cptkbd()
833 cptkbd_data->middlebutton_state = 0; in lenovo_event_cptkbd()
848 return 0; in lenovo_event_cptkbd()
855 return 0; in lenovo_event()
871 return 0; in lenovo_event()
882 report->field[0]->value[0] = data_pointer->press_to_select ? 0x01 : 0x02; in lenovo_features_set_tpkbd()
883 report->field[0]->value[0] |= data_pointer->dragging ? 0x04 : 0x08; in lenovo_features_set_tpkbd()
884 report->field[0]->value[0] |= data_pointer->release_to_select ? 0x10 : 0x20; in lenovo_features_set_tpkbd()
885 report->field[0]->value[0] |= data_pointer->select_right ? 0x80 : 0x40; in lenovo_features_set_tpkbd()
886 report->field[1]->value[0] = 0x03; // unknown setting, imitate windows driver in lenovo_features_set_tpkbd()
887 report->field[2]->value[0] = data_pointer->sensitivity; in lenovo_features_set_tpkbd()
888 report->field[3]->value[0] = data_pointer->press_speed; in lenovo_features_set_tpkbd()
891 return 0; in lenovo_features_set_tpkbd()
915 if (value < 0 || value > 1) in attr_press_to_select_store_tpkbd()
945 if (value < 0 || value > 1) in attr_dragging_store_tpkbd()
975 if (value < 0 || value > 1) in attr_release_to_select_store_tpkbd()
1005 if (value < 0 || value > 1) in attr_select_right_store_tpkbd()
1120 report->field[0]->value[0] = (data_pointer->led_state >> 0) & 1; in lenovo_led_set_tpkbd()
1121 report->field[0]->value[1] = (data_pointer->led_state >> 1) & 1; in lenovo_led_set_tpkbd()
1132 int led_nr = 0; in lenovo_led_brightness_set()
1133 int ret = 0; in lenovo_led_brightness_set()
1183 if (ret < 0) in lenovo_register_leds()
1193 if (ret < 0) { in lenovo_register_leds()
1198 return 0; in lenovo_register_leds()
1211 return 0; in lenovo_probe_tpkbd()
1216 for (i = 0; i < 4; i++) { in lenovo_probe_tpkbd()
1220 if (!hid_validate_values(hdev, HID_OUTPUT_REPORT, 3, 0, 2)) in lenovo_probe_tpkbd()
1237 data_pointer->sensitivity = 0xa0; in lenovo_probe_tpkbd()
1238 data_pointer->press_speed = 0x38; in lenovo_probe_tpkbd()
1248 return 0; in lenovo_probe_tpkbd()
1264 return 0; in lenovo_probe_cptkbd()
1277 cptkbd_data->middlebutton_state = 0; in lenovo_probe_cptkbd()
1279 cptkbd_data->sensitivity = 0x05; in lenovo_probe_cptkbd()
1287 return 0; in lenovo_probe_cptkbd()
1309 * with an application of 0xffa0001, add the LEDs on the interface in lenovo_probe_tp10ubkbd()
1315 if (rep->application == 0xffa00001) in lenovo_probe_tp10ubkbd()
1319 return 0; in lenovo_probe_tp10ubkbd()
1355 return 0; in lenovo_probe_tp10ubkbd()
1397 ret = 0; in lenovo_probe()
1403 return 0; in lenovo_probe()
1424 return 0; in lenovo_reset_resume()
1509 return 0; in lenovo_input_configured()