Lines Matching +full:0 +full:xff100000
43 #define TP_X12_RAW_HOTKEY_FN_F4 0x00020003
44 #define TP_X12_RAW_HOTKEY_FN_F8 0x38001003
45 #define TP_X12_RAW_HOTKEY_FN_F10 0x00000803
46 #define TP_X12_RAW_HOTKEY_FN_F12 0x00000403
47 #define TP_X12_RAW_HOTKEY_FN_SPACE 0x18001003
63 /* 0: Up
76 #define TP10UBKBD_FN_LOCK_LED 0x54
77 #define TP10UBKBD_MUTE_LED 0x64
78 #define TP10UBKBD_MICMUTE_LED 0x74
87 input_report_key(input, keycode, 0); in report_key_event()
99 data->led_report[0] = TP10UBKBD_LED_OUTPUT_REPORT; in lenovo_led_set_tp10ubkbd()
102 ret = hid_hw_raw_request(hdev, data->led_report[0], data->led_report, 3, in lenovo_led_set_tp10ubkbd()
108 ret = ret < 0 ? ret : -EIO; in lenovo_led_set_tp10ubkbd()
110 ret = 0; in lenovo_led_set_tp10ubkbd()
128 0x05, 0x88, /* Usage Page (Vendor Usage Page 0x88) */
129 0x09, 0x01, /* Usage (Vendor Usage 0x01) */
130 0xa1, 0x01, /* Collection (Application) */
131 0x85, 0x04, /* Report ID (4) */
132 0x19, 0x00, /* Usage Minimum (0) */
133 0x2a, 0xff, 0xff, /* Usage Maximum (65535) */
138 0x06, 0x00, 0xFF, /* Usage Page (Vendor Defined 0xFF00) */
139 0x09, 0x01, /* Usage (0x01) */
140 0xA1, 0x01, /* Collection (Application) */
141 0x85, 0x05, /* Report ID (5) */
142 0x1A, 0xF1, 0x00, /* Usage Minimum (0xF1) */
143 0x2A, 0xFC, 0x00, /* Usage Maximum (0xFC) */
144 0x15, 0x00, /* Logical Minimum (0) */
145 0x25, 0x01, /* Logical Maximum (1) */
146 0x75, 0x01, /* Report Size (1) */
147 0x95, 0x0D, /* Report Count (13) */
148 0x81, 0x02, /* Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) */
149 0x95, 0x03, /* Report Count (3) */
150 0x81, 0x01, /* Input (Const,Array,Abs,No Wrap,Linear,Preferred State,No Null Position) */
160 * 0x8801 from the report ID 4 in lenovo_report_fixup()
164 sizeof(lenovo_pro_dock_need_fixup_collection)) == 0) { in lenovo_report_fixup()
165 rdesc[151] = 0x01; in lenovo_report_fixup()
166 rdesc[152] = 0x00; in lenovo_report_fixup()
172 sizeof(lenovo_tpIIbtkbd_need_fixup_collection)) == 0) { in lenovo_report_fixup()
173 rdesc[244] = 0x00; /* usage minimum = 0x00 */ in lenovo_report_fixup()
174 rdesc[247] = 0xff; /* usage maximum = 0xff */ in lenovo_report_fixup()
175 rdesc[252] = 0xff; /* logical maximum = 0xff */ in lenovo_report_fixup()
176 rdesc[254] = 0x08; /* report size = 0x08 */ in lenovo_report_fixup()
177 rdesc[256] = 0x01; /* report count = 0x01 */ in lenovo_report_fixup()
178 rdesc[258] = 0x00; /* input = 0x00 */ in lenovo_report_fixup()
179 rdesc[260] = 0x01; /* report count (2) = 0x01 */ in lenovo_report_fixup()
190 if (usage->hid == (HID_UP_BUTTON | 0x0010)) { in lenovo_input_mapping_tpkbd()
196 return 0; in lenovo_input_mapping_tpkbd()
207 case 0x00f1: /* Fn-F4: Mic mute */ in lenovo_input_mapping_cptkbd()
210 case 0x00f2: /* Fn-F5: Brightness down */ in lenovo_input_mapping_cptkbd()
213 case 0x00f3: /* Fn-F6: Brightness up */ in lenovo_input_mapping_cptkbd()
216 case 0x00f4: /* Fn-F7: External display (projector) */ in lenovo_input_mapping_cptkbd()
219 case 0x00f5: /* Fn-F8: Wireless */ in lenovo_input_mapping_cptkbd()
222 case 0x00f6: /* Fn-F9: Control panel */ in lenovo_input_mapping_cptkbd()
225 case 0x00f8: /* Fn-F11: View open applications (3 boxes) */ in lenovo_input_mapping_cptkbd()
228 case 0x00f9: /* Fn-F12: Open My computer (6 boxes) USB-only */ in lenovo_input_mapping_cptkbd()
232 case 0x00fa: /* Fn-Esc: Fn-lock toggle */ in lenovo_input_mapping_cptkbd()
235 case 0x00fb: /* Middle mouse button (in native mode) */ in lenovo_input_mapping_cptkbd()
245 (usage->hid & HID_USAGE) == 0x003) in lenovo_input_mapping_cptkbd()
248 (usage->hid & HID_USAGE) == 0x238) in lenovo_input_mapping_cptkbd()
251 /* Map wheel emulation reports: 0xffa1 = USB, 0xff10 = BT */ in lenovo_input_mapping_cptkbd()
252 if ((usage->hid & HID_USAGE_PAGE) == 0xff100000 || in lenovo_input_mapping_cptkbd()
253 (usage->hid & HID_USAGE_PAGE) == 0xffa10000) { in lenovo_input_mapping_cptkbd()
259 case 0x0000: in lenovo_input_mapping_cptkbd()
262 case 0x0001: in lenovo_input_mapping_cptkbd()
270 return 0; in lenovo_input_mapping_cptkbd()
278 * 0xff0a0000 = USB, HID_UP_MSVENDOR = BT. in lenovo_input_mapping_tpIIkbd()
283 if (((usage->hid & HID_USAGE_PAGE) == 0xff0a0000 || in lenovo_input_mapping_tpIIkbd()
287 case 0x00bb: /* Fn-F4: Mic mute */ in lenovo_input_mapping_tpIIkbd()
290 case 0x00c3: /* Fn-F5: Brightness down */ in lenovo_input_mapping_tpIIkbd()
293 case 0x00c4: /* Fn-F6: Brightness up */ in lenovo_input_mapping_tpIIkbd()
296 case 0x00c1: /* Fn-F8: Notification center */ in lenovo_input_mapping_tpIIkbd()
299 case 0x00bc: /* Fn-F9: Control panel */ in lenovo_input_mapping_tpIIkbd()
302 case 0x00b6: /* Fn-F10: Bluetooth */ in lenovo_input_mapping_tpIIkbd()
305 case 0x00b7: /* Fn-F11: Keyboard config */ in lenovo_input_mapping_tpIIkbd()
308 case 0x00b8: /* Fn-F12: User function */ in lenovo_input_mapping_tpIIkbd()
311 case 0x00b9: /* Fn-PrtSc: Snipping tool */ in lenovo_input_mapping_tpIIkbd()
314 case 0x00b5: /* Fn-Esc: Fn-lock toggle */ in lenovo_input_mapping_tpIIkbd()
320 if ((usage->hid & HID_USAGE_PAGE) == 0xffa00000) { in lenovo_input_mapping_tpIIkbd()
322 case 0x00fb: /* Middle mouse (in native USB mode) */ in lenovo_input_mapping_tpIIkbd()
331 case 0x0004: /* Middle mouse (in native Bluetooth mode) */ in lenovo_input_mapping_tpIIkbd()
341 (usage->hid & HID_USAGE) == 0x003) in lenovo_input_mapping_tpIIkbd()
344 (usage->hid & HID_USAGE) == 0x238) in lenovo_input_mapping_tpIIkbd()
347 /* Map wheel emulation reports: 0xff10 */ in lenovo_input_mapping_tpIIkbd()
348 if ((usage->hid & HID_USAGE_PAGE) == 0xff100000) { in lenovo_input_mapping_tpIIkbd()
354 case 0x0000: in lenovo_input_mapping_tpIIkbd()
357 case 0x0001: in lenovo_input_mapping_tpIIkbd()
365 return 0; in lenovo_input_mapping_tpIIkbd()
376 return 0; in lenovo_input_mapping_scrollpoint()
384 * The ThinkPad 10 Ultrabook Keyboard uses 0x000c0001 usage for in lenovo_input_mapping_tp10_ultrabook_kbd()
387 if (usage->hid == 0x000c0001) { in lenovo_input_mapping_tp10_ultrabook_kbd()
411 if (usage->hid == 0x00070072) in lenovo_input_mapping_tp10_ultrabook_kbd()
414 return 0; in lenovo_input_mapping_tp10_ultrabook_kbd()
422 * The ThinkPad X1 Tablet Thin Keyboard uses 0x000c0001 usage for in lenovo_input_mapping_x1_tab_kbd()
425 if (usage->hid == 0x000c0001) { in lenovo_input_mapping_x1_tab_kbd()
427 case 0: /* Fn-F10: Enable/disable bluetooth */ in lenovo_input_mapping_x1_tab_kbd()
457 if (usage->hid == (HID_UP_KEYBOARD | 0x009a)) { in lenovo_input_mapping_x1_tab_kbd()
462 return 0; in lenovo_input_mapping_x1_tab_kbd()
498 return 0; in lenovo_input_mapping()
516 * Feature report 0x13 is used for USB, in lenovo_send_cmd_cptkbd()
517 * output report 0x18 is used for Bluetooth. in lenovo_send_cmd_cptkbd()
518 * buf[0] is ignored by hid_hw_raw_request. in lenovo_send_cmd_cptkbd()
520 buf[0] = 0x18; in lenovo_send_cmd_cptkbd()
527 ret = hid_hw_raw_request(hdev, 0x13, buf, 3, in lenovo_send_cmd_cptkbd()
541 return ret < 0 ? ret : 0; /* BT returns 0, USB returns sizeof(buf) */ in lenovo_send_cmd_cptkbd()
553 ret = lenovo_send_cmd_cptkbd(hdev, 0x01, 0x03); in lenovo_features_set_cptkbd()
558 ret = lenovo_send_cmd_cptkbd(hdev, 0x09, 0x01); in lenovo_features_set_cptkbd()
562 ret = lenovo_send_cmd_cptkbd(hdev, 0x05, cptkbd_data->fn_lock); in lenovo_features_set_cptkbd()
566 ret = lenovo_send_cmd_cptkbd(hdev, 0x02, cptkbd_data->sensitivity); in lenovo_features_set_cptkbd()
592 if (value < 0 || value > 1) in attr_fn_lock_store()
668 if (value < 0 || value > 1) in attr_middleclick_workaround_store_cptkbd()
735 return 0; in lenovo_raw_event_TP_X12_tab()
754 return 0; in lenovo_raw_event_TP_X12_tab()
767 && data[0] == 0x15 in lenovo_raw_event()
768 && data[1] == 0x94 in lenovo_raw_event()
769 && data[2] == 0x01)) { in lenovo_raw_event()
770 data[1] = 0x00; in lenovo_raw_event()
771 data[2] = 0x01; in lenovo_raw_event()
775 * Lenovo TP X12 Tab KBD's Fn+XX is HID raw data defined. Report ID is 0x03 in lenovo_raw_event()
776 * e.g.: Raw data received for MIC mute is 0x00020003. in lenovo_raw_event()
780 && size >= 3 && report->id == 0x03)) in lenovo_raw_event()
783 return 0; in lenovo_raw_event()
801 return 0; in lenovo_event_tp10ubkbd()
815 return 0; in lenovo_event_cptkbd()
822 } else if (value == 0) { in lenovo_event_cptkbd()
829 EV_KEY, BTN_MIDDLE, 0); in lenovo_event_cptkbd()
832 cptkbd_data->middlebutton_state = 0; in lenovo_event_cptkbd()
847 return 0; in lenovo_event_cptkbd()
854 return 0; in lenovo_event()
869 return 0; in lenovo_event()
880 report->field[0]->value[0] = data_pointer->press_to_select ? 0x01 : 0x02; in lenovo_features_set_tpkbd()
881 report->field[0]->value[0] |= data_pointer->dragging ? 0x04 : 0x08; in lenovo_features_set_tpkbd()
882 report->field[0]->value[0] |= data_pointer->release_to_select ? 0x10 : 0x20; in lenovo_features_set_tpkbd()
883 report->field[0]->value[0] |= data_pointer->select_right ? 0x80 : 0x40; in lenovo_features_set_tpkbd()
884 report->field[1]->value[0] = 0x03; // unknown setting, imitate windows driver in lenovo_features_set_tpkbd()
885 report->field[2]->value[0] = data_pointer->sensitivity; in lenovo_features_set_tpkbd()
886 report->field[3]->value[0] = data_pointer->press_speed; in lenovo_features_set_tpkbd()
889 return 0; in lenovo_features_set_tpkbd()
913 if (value < 0 || value > 1) in attr_press_to_select_store_tpkbd()
943 if (value < 0 || value > 1) in attr_dragging_store_tpkbd()
973 if (value < 0 || value > 1) in attr_release_to_select_store_tpkbd()
1003 if (value < 0 || value > 1) in attr_select_right_store_tpkbd()
1118 report->field[0]->value[0] = (data_pointer->led_state >> 0) & 1; in lenovo_led_set_tpkbd()
1119 report->field[0]->value[1] = (data_pointer->led_state >> 1) & 1; in lenovo_led_set_tpkbd()
1130 int led_nr = 0; in lenovo_led_brightness_set()
1131 int ret = 0; in lenovo_led_brightness_set()
1180 if (ret < 0) in lenovo_register_leds()
1190 if (ret < 0) { in lenovo_register_leds()
1195 return 0; in lenovo_register_leds()
1208 return 0; in lenovo_probe_tpkbd()
1213 for (i = 0; i < 4; i++) { in lenovo_probe_tpkbd()
1217 if (!hid_validate_values(hdev, HID_OUTPUT_REPORT, 3, 0, 2)) in lenovo_probe_tpkbd()
1234 data_pointer->sensitivity = 0xa0; in lenovo_probe_tpkbd()
1235 data_pointer->press_speed = 0x38; in lenovo_probe_tpkbd()
1245 return 0; in lenovo_probe_tpkbd()
1261 return 0; in lenovo_probe_cptkbd()
1274 cptkbd_data->middlebutton_state = 0; in lenovo_probe_cptkbd()
1276 cptkbd_data->sensitivity = 0x05; in lenovo_probe_cptkbd()
1284 return 0; in lenovo_probe_cptkbd()
1306 * with an application of 0xffa0001, add the LEDs on the interface in lenovo_probe_tp10ubkbd()
1312 if (rep->application == 0xffa00001) in lenovo_probe_tp10ubkbd()
1316 return 0; in lenovo_probe_tp10ubkbd()
1352 return 0; in lenovo_probe_tp10ubkbd()
1393 ret = 0; in lenovo_probe()
1399 return 0; in lenovo_probe()
1420 return 0; in lenovo_reset_resume()
1504 return 0; in lenovo_input_configured()