Lines Matching +full:0 +full:xff100000
54 /* 0: Up
67 #define TP10UBKBD_FN_LOCK_LED 0x54
68 #define TP10UBKBD_MUTE_LED 0x64
69 #define TP10UBKBD_MICMUTE_LED 0x74
82 data->led_report[0] = TP10UBKBD_LED_OUTPUT_REPORT; in lenovo_led_set_tp10ubkbd()
85 ret = hid_hw_raw_request(hdev, data->led_report[0], data->led_report, 3, in lenovo_led_set_tp10ubkbd()
91 ret = ret < 0 ? ret : -EIO; in lenovo_led_set_tp10ubkbd()
93 ret = 0; in lenovo_led_set_tp10ubkbd()
111 0x05, 0x88, /* Usage Page (Vendor Usage Page 0x88) */
112 0x09, 0x01, /* Usage (Vendor Usage 0x01) */
113 0xa1, 0x01, /* Collection (Application) */
114 0x85, 0x04, /* Report ID (4) */
115 0x19, 0x00, /* Usage Minimum (0) */
116 0x2a, 0xff, 0xff, /* Usage Maximum (65535) */
121 0x06, 0x00, 0xFF, /* Usage Page (Vendor Defined 0xFF00) */
122 0x09, 0x01, /* Usage (0x01) */
123 0xA1, 0x01, /* Collection (Application) */
124 0x85, 0x05, /* Report ID (5) */
125 0x1A, 0xF1, 0x00, /* Usage Minimum (0xF1) */
126 0x2A, 0xFC, 0x00, /* Usage Maximum (0xFC) */
127 0x15, 0x00, /* Logical Minimum (0) */
128 0x25, 0x01, /* Logical Maximum (1) */
129 0x75, 0x01, /* Report Size (1) */
130 0x95, 0x0D, /* Report Count (13) */
131 0x81, 0x02, /* Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) */
132 0x95, 0x03, /* Report Count (3) */
133 0x81, 0x01, /* Input (Const,Array,Abs,No Wrap,Linear,Preferred State,No Null Position) */
143 * 0x8801 from the report ID 4 in lenovo_report_fixup()
147 sizeof(lenovo_pro_dock_need_fixup_collection)) == 0) { in lenovo_report_fixup()
148 rdesc[151] = 0x01; in lenovo_report_fixup()
149 rdesc[152] = 0x00; in lenovo_report_fixup()
155 sizeof(lenovo_tpIIbtkbd_need_fixup_collection)) == 0) { in lenovo_report_fixup()
156 rdesc[244] = 0x00; /* usage minimum = 0x00 */ in lenovo_report_fixup()
157 rdesc[247] = 0xff; /* usage maximum = 0xff */ in lenovo_report_fixup()
158 rdesc[252] = 0xff; /* logical maximum = 0xff */ in lenovo_report_fixup()
159 rdesc[254] = 0x08; /* report size = 0x08 */ in lenovo_report_fixup()
160 rdesc[256] = 0x01; /* report count = 0x01 */ in lenovo_report_fixup()
161 rdesc[258] = 0x00; /* input = 0x00 */ in lenovo_report_fixup()
162 rdesc[260] = 0x01; /* report count (2) = 0x01 */ in lenovo_report_fixup()
173 if (usage->hid == (HID_UP_BUTTON | 0x0010)) { in lenovo_input_mapping_tpkbd()
179 return 0; in lenovo_input_mapping_tpkbd()
190 case 0x00f1: /* Fn-F4: Mic mute */ in lenovo_input_mapping_cptkbd()
193 case 0x00f2: /* Fn-F5: Brightness down */ in lenovo_input_mapping_cptkbd()
196 case 0x00f3: /* Fn-F6: Brightness up */ in lenovo_input_mapping_cptkbd()
199 case 0x00f4: /* Fn-F7: External display (projector) */ in lenovo_input_mapping_cptkbd()
202 case 0x00f5: /* Fn-F8: Wireless */ in lenovo_input_mapping_cptkbd()
205 case 0x00f6: /* Fn-F9: Control panel */ in lenovo_input_mapping_cptkbd()
208 case 0x00f8: /* Fn-F11: View open applications (3 boxes) */ in lenovo_input_mapping_cptkbd()
211 case 0x00f9: /* Fn-F12: Open My computer (6 boxes) USB-only */ in lenovo_input_mapping_cptkbd()
215 case 0x00fa: /* Fn-Esc: Fn-lock toggle */ in lenovo_input_mapping_cptkbd()
218 case 0x00fb: /* Middle mouse button (in native mode) */ in lenovo_input_mapping_cptkbd()
228 (usage->hid & HID_USAGE) == 0x003) in lenovo_input_mapping_cptkbd()
231 (usage->hid & HID_USAGE) == 0x238) in lenovo_input_mapping_cptkbd()
234 /* Map wheel emulation reports: 0xffa1 = USB, 0xff10 = BT */ in lenovo_input_mapping_cptkbd()
235 if ((usage->hid & HID_USAGE_PAGE) == 0xff100000 || in lenovo_input_mapping_cptkbd()
236 (usage->hid & HID_USAGE_PAGE) == 0xffa10000) { in lenovo_input_mapping_cptkbd()
242 case 0x0000: in lenovo_input_mapping_cptkbd()
245 case 0x0001: in lenovo_input_mapping_cptkbd()
253 return 0; in lenovo_input_mapping_cptkbd()
261 * 0xff0a0000 = USB, HID_UP_MSVENDOR = BT. in lenovo_input_mapping_tpIIkbd()
266 if (((usage->hid & HID_USAGE_PAGE) == 0xff0a0000 || in lenovo_input_mapping_tpIIkbd()
270 case 0x00bb: /* Fn-F4: Mic mute */ in lenovo_input_mapping_tpIIkbd()
273 case 0x00c3: /* Fn-F5: Brightness down */ in lenovo_input_mapping_tpIIkbd()
276 case 0x00c4: /* Fn-F6: Brightness up */ in lenovo_input_mapping_tpIIkbd()
279 case 0x00c1: /* Fn-F8: Notification center */ in lenovo_input_mapping_tpIIkbd()
282 case 0x00bc: /* Fn-F9: Control panel */ in lenovo_input_mapping_tpIIkbd()
285 case 0x00b6: /* Fn-F10: Bluetooth */ in lenovo_input_mapping_tpIIkbd()
288 case 0x00b7: /* Fn-F11: Keyboard config */ in lenovo_input_mapping_tpIIkbd()
291 case 0x00b8: /* Fn-F12: User function */ in lenovo_input_mapping_tpIIkbd()
294 case 0x00b9: /* Fn-PrtSc: Snipping tool */ in lenovo_input_mapping_tpIIkbd()
297 case 0x00b5: /* Fn-Esc: Fn-lock toggle */ in lenovo_input_mapping_tpIIkbd()
303 if ((usage->hid & HID_USAGE_PAGE) == 0xffa00000) { in lenovo_input_mapping_tpIIkbd()
305 case 0x00fb: /* Middle mouse (in native USB mode) */ in lenovo_input_mapping_tpIIkbd()
314 case 0x0004: /* Middle mouse (in native Bluetooth mode) */ in lenovo_input_mapping_tpIIkbd()
324 (usage->hid & HID_USAGE) == 0x003) in lenovo_input_mapping_tpIIkbd()
327 (usage->hid & HID_USAGE) == 0x238) in lenovo_input_mapping_tpIIkbd()
330 /* Map wheel emulation reports: 0xff10 */ in lenovo_input_mapping_tpIIkbd()
331 if ((usage->hid & HID_USAGE_PAGE) == 0xff100000) { in lenovo_input_mapping_tpIIkbd()
337 case 0x0000: in lenovo_input_mapping_tpIIkbd()
340 case 0x0001: in lenovo_input_mapping_tpIIkbd()
348 return 0; in lenovo_input_mapping_tpIIkbd()
359 return 0; in lenovo_input_mapping_scrollpoint()
367 * The ThinkPad 10 Ultrabook Keyboard uses 0x000c0001 usage for in lenovo_input_mapping_tp10_ultrabook_kbd()
370 if (usage->hid == 0x000c0001) { in lenovo_input_mapping_tp10_ultrabook_kbd()
394 if (usage->hid == 0x00070072) in lenovo_input_mapping_tp10_ultrabook_kbd()
397 return 0; in lenovo_input_mapping_tp10_ultrabook_kbd()
405 * The ThinkPad X1 Tablet Thin Keyboard uses 0x000c0001 usage for in lenovo_input_mapping_x1_tab_kbd()
408 if (usage->hid == 0x000c0001) { in lenovo_input_mapping_x1_tab_kbd()
410 case 0: /* Fn-F10: Enable/disable bluetooth */ in lenovo_input_mapping_x1_tab_kbd()
440 if (usage->hid == (HID_UP_KEYBOARD | 0x009a)) { in lenovo_input_mapping_x1_tab_kbd()
445 return 0; in lenovo_input_mapping_x1_tab_kbd()
479 return 0; in lenovo_input_mapping()
497 * Feature report 0x13 is used for USB, in lenovo_send_cmd_cptkbd()
498 * output report 0x18 is used for Bluetooth. in lenovo_send_cmd_cptkbd()
499 * buf[0] is ignored by hid_hw_raw_request. in lenovo_send_cmd_cptkbd()
501 buf[0] = 0x18; in lenovo_send_cmd_cptkbd()
508 ret = hid_hw_raw_request(hdev, 0x13, buf, 3, in lenovo_send_cmd_cptkbd()
522 return ret < 0 ? ret : 0; /* BT returns 0, USB returns sizeof(buf) */ in lenovo_send_cmd_cptkbd()
534 ret = lenovo_send_cmd_cptkbd(hdev, 0x01, 0x03); in lenovo_features_set_cptkbd()
539 ret = lenovo_send_cmd_cptkbd(hdev, 0x09, 0x01); in lenovo_features_set_cptkbd()
543 ret = lenovo_send_cmd_cptkbd(hdev, 0x05, cptkbd_data->fn_lock); in lenovo_features_set_cptkbd()
547 ret = lenovo_send_cmd_cptkbd(hdev, 0x02, cptkbd_data->sensitivity); in lenovo_features_set_cptkbd()
573 if (value < 0 || value > 1) in attr_fn_lock_store()
648 if (value < 0 || value > 1) in attr_middleclick_workaround_store_cptkbd()
694 && data[0] == 0x15 in lenovo_raw_event()
695 && data[1] == 0x94 in lenovo_raw_event()
696 && data[2] == 0x01)) { in lenovo_raw_event()
697 data[1] = 0x00; in lenovo_raw_event()
698 data[2] = 0x01; in lenovo_raw_event()
701 return 0; in lenovo_raw_event()
719 return 0; in lenovo_event_tp10ubkbd()
733 return 0; in lenovo_event_cptkbd()
740 } else if (value == 0) { in lenovo_event_cptkbd()
747 EV_KEY, BTN_MIDDLE, 0); in lenovo_event_cptkbd()
750 cptkbd_data->middlebutton_state = 0; in lenovo_event_cptkbd()
765 return 0; in lenovo_event_cptkbd()
772 return 0; in lenovo_event()
785 return 0; in lenovo_event()
796 report->field[0]->value[0] = data_pointer->press_to_select ? 0x01 : 0x02; in lenovo_features_set_tpkbd()
797 report->field[0]->value[0] |= data_pointer->dragging ? 0x04 : 0x08; in lenovo_features_set_tpkbd()
798 report->field[0]->value[0] |= data_pointer->release_to_select ? 0x10 : 0x20; in lenovo_features_set_tpkbd()
799 report->field[0]->value[0] |= data_pointer->select_right ? 0x80 : 0x40; in lenovo_features_set_tpkbd()
800 report->field[1]->value[0] = 0x03; // unknown setting, imitate windows driver in lenovo_features_set_tpkbd()
801 report->field[2]->value[0] = data_pointer->sensitivity; in lenovo_features_set_tpkbd()
802 report->field[3]->value[0] = data_pointer->press_speed; in lenovo_features_set_tpkbd()
805 return 0; in lenovo_features_set_tpkbd()
829 if (value < 0 || value > 1) in attr_press_to_select_store_tpkbd()
859 if (value < 0 || value > 1) in attr_dragging_store_tpkbd()
889 if (value < 0 || value > 1) in attr_release_to_select_store_tpkbd()
919 if (value < 0 || value > 1) in attr_select_right_store_tpkbd()
1036 report->field[0]->value[0] = (data_pointer->led_state >> 0) & 1; in lenovo_led_set_tpkbd()
1037 report->field[0]->value[1] = (data_pointer->led_state >> 1) & 1; in lenovo_led_set_tpkbd()
1048 int led_nr = 0; in lenovo_led_brightness_set()
1049 int ret = 0; in lenovo_led_brightness_set()
1096 if (ret < 0) in lenovo_register_leds()
1106 if (ret < 0) { in lenovo_register_leds()
1111 return 0; in lenovo_register_leds()
1124 return 0; in lenovo_probe_tpkbd()
1129 for (i = 0; i < 4; i++) { in lenovo_probe_tpkbd()
1133 if (!hid_validate_values(hdev, HID_OUTPUT_REPORT, 3, 0, 2)) in lenovo_probe_tpkbd()
1150 data_pointer->sensitivity = 0xa0; in lenovo_probe_tpkbd()
1151 data_pointer->press_speed = 0x38; in lenovo_probe_tpkbd()
1161 return 0; in lenovo_probe_tpkbd()
1177 return 0; in lenovo_probe_cptkbd()
1190 cptkbd_data->middlebutton_state = 0; in lenovo_probe_cptkbd()
1192 cptkbd_data->sensitivity = 0x05; in lenovo_probe_cptkbd()
1200 return 0; in lenovo_probe_cptkbd()
1222 * with an application of 0xffa0001, add the LEDs on the interface in lenovo_probe_tp10ubkbd()
1228 if (rep->application == 0xffa00001) in lenovo_probe_tp10ubkbd()
1232 return 0; in lenovo_probe_tp10ubkbd()
1261 return 0; in lenovo_probe_tp10ubkbd()
1300 ret = 0; in lenovo_probe()
1306 return 0; in lenovo_probe()
1327 return 0; in lenovo_reset_resume()
1409 return 0; in lenovo_input_configured()