Lines Matching +full:ibm +full:- +full:op +full:- +full:panel

1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * - ThinkPad USB Keyboard with TrackPoint (tpkbd)
5 * - ThinkPad Compact Bluetooth Keyboard with TrackPoint (cptkbd)
6 * - ThinkPad Compact USB Keyboard with TrackPoint (cptkbd)
7 * - ThinkPad TrackPoint Keyboard II USB/Bluetooth (cptkbd/tpIIkbd)
12 * Linux IBM/Lenovo Scrollpoint mouse driver:
13 * - IBM Scrollpoint III
14 * - IBM Scrollpoint Pro
15 * - IBM Scrollpoint Optical
16 * - IBM Scrollpoint Optical 800dpi
17 * - IBM Scrollpoint Optical 800dpi Pro
18 * - Lenovo Scrollpoint Optical
35 #include "hid-ids.h"
37 /* Userspace expects F20 for mic-mute KEY_MICMUTE does not work */
80 mutex_lock(&data->led_report_mutex); in lenovo_led_set_tp10ubkbd()
82 data->led_report[0] = TP10UBKBD_LED_OUTPUT_REPORT; in lenovo_led_set_tp10ubkbd()
83 data->led_report[1] = led_code; in lenovo_led_set_tp10ubkbd()
84 data->led_report[2] = value ? TP10UBKBD_LED_ON : TP10UBKBD_LED_OFF; 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()
88 if (ret != -ENODEV) in lenovo_led_set_tp10ubkbd()
91 ret = ret < 0 ? ret : -EIO; in lenovo_led_set_tp10ubkbd()
96 mutex_unlock(&data->led_report_mutex); in lenovo_led_set_tp10ubkbd()
106 lenovo_led_set_tp10ubkbd(data->hdev, TP10UBKBD_FN_LOCK_LED, in lenovo_tp10ubkbd_sync_fn_lock()
107 data->fn_lock); in lenovo_tp10ubkbd_sync_fn_lock()
139 switch (hdev->product) { in lenovo_report_fixup()
142 * - get a reasonable usage max for the vendor collection in lenovo_report_fixup()
173 if (usage->hid == (HID_UP_BUTTON | 0x0010)) { in lenovo_input_mapping_tpkbd()
174 /* This sub-device contains trackpoint, mark it */ in lenovo_input_mapping_tpkbd()
187 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_MSVENDOR || in lenovo_input_mapping_cptkbd()
188 (usage->hid & HID_USAGE_PAGE) == HID_UP_LNVENDOR) { in lenovo_input_mapping_cptkbd()
189 switch (usage->hid & HID_USAGE) { in lenovo_input_mapping_cptkbd()
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()
225 if (usage->hid == HID_GD_WHEEL) in lenovo_input_mapping_cptkbd()
226 return -1; in lenovo_input_mapping_cptkbd()
227 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON && in lenovo_input_mapping_cptkbd()
228 (usage->hid & HID_USAGE) == 0x003) in lenovo_input_mapping_cptkbd()
229 return -1; in lenovo_input_mapping_cptkbd()
230 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER && in lenovo_input_mapping_cptkbd()
231 (usage->hid & HID_USAGE) == 0x238) in lenovo_input_mapping_cptkbd()
232 return -1; 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()
237 field->flags |= HID_MAIN_ITEM_RELATIVE | HID_MAIN_ITEM_VARIABLE; in lenovo_input_mapping_cptkbd()
238 field->logical_minimum = -127; in lenovo_input_mapping_cptkbd()
239 field->logical_maximum = 127; in lenovo_input_mapping_cptkbd()
241 switch (usage->hid & HID_USAGE) { in lenovo_input_mapping_cptkbd()
249 return -1; in lenovo_input_mapping_cptkbd()
266 if (((usage->hid & HID_USAGE_PAGE) == 0xff0a0000 || in lenovo_input_mapping_tpIIkbd()
267 (usage->hid & HID_USAGE_PAGE) == HID_UP_MSVENDOR) && in lenovo_input_mapping_tpIIkbd()
268 field->report->id == 5) { in lenovo_input_mapping_tpIIkbd()
269 switch (usage->hid & HID_USAGE) { 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()
304 switch (usage->hid & HID_USAGE) { in lenovo_input_mapping_tpIIkbd()
311 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_MSVENDOR && in lenovo_input_mapping_tpIIkbd()
312 field->report->id == 21) { in lenovo_input_mapping_tpIIkbd()
313 switch (usage->hid & HID_USAGE) { in lenovo_input_mapping_tpIIkbd()
321 if (usage->hid == HID_GD_WHEEL) in lenovo_input_mapping_tpIIkbd()
322 return -1; in lenovo_input_mapping_tpIIkbd()
323 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_BUTTON && in lenovo_input_mapping_tpIIkbd()
324 (usage->hid & HID_USAGE) == 0x003) in lenovo_input_mapping_tpIIkbd()
325 return -1; in lenovo_input_mapping_tpIIkbd()
326 if ((usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER && in lenovo_input_mapping_tpIIkbd()
327 (usage->hid & HID_USAGE) == 0x238) in lenovo_input_mapping_tpIIkbd()
328 return -1; in lenovo_input_mapping_tpIIkbd()
331 if ((usage->hid & HID_USAGE_PAGE) == 0xff100000) { in lenovo_input_mapping_tpIIkbd()
332 field->flags |= HID_MAIN_ITEM_RELATIVE | HID_MAIN_ITEM_VARIABLE; in lenovo_input_mapping_tpIIkbd()
333 field->logical_minimum = -127; in lenovo_input_mapping_tpIIkbd()
334 field->logical_maximum = 127; in lenovo_input_mapping_tpIIkbd()
336 switch (usage->hid & HID_USAGE) { in lenovo_input_mapping_tpIIkbd()
344 return -1; in lenovo_input_mapping_tpIIkbd()
355 if (usage->hid == HID_GD_Z) { in lenovo_input_mapping_scrollpoint()
370 if (usage->hid == 0x000c0001) { in lenovo_input_mapping_tp10_ultrabook_kbd()
371 switch (usage->usage_index) { in lenovo_input_mapping_tp10_ultrabook_kbd()
372 case 8: /* Fn-Esc: Fn-lock toggle */ in lenovo_input_mapping_tp10_ultrabook_kbd()
375 case 9: /* Fn-F4: Mic mute */ in lenovo_input_mapping_tp10_ultrabook_kbd()
378 case 10: /* Fn-F7: Control panel */ in lenovo_input_mapping_tp10_ultrabook_kbd()
381 case 11: /* Fn-F8: Search (magnifier glass) */ in lenovo_input_mapping_tp10_ultrabook_kbd()
384 case 12: /* Fn-F10: Open My computer (6 boxes) */ in lenovo_input_mapping_tp10_ultrabook_kbd()
391 * The Ultrabook Keyboard sends a spurious F23 key-press when resuming in lenovo_input_mapping_tp10_ultrabook_kbd()
394 if (usage->hid == 0x00070072) in lenovo_input_mapping_tp10_ultrabook_kbd()
395 return -1; in lenovo_input_mapping_tp10_ultrabook_kbd()
408 if (usage->hid == 0x000c0001) { in lenovo_input_mapping_x1_tab_kbd()
409 switch (usage->usage_index) { in lenovo_input_mapping_x1_tab_kbd()
410 case 0: /* Fn-F10: Enable/disable bluetooth */ in lenovo_input_mapping_x1_tab_kbd()
413 case 1: /* Fn-F11: Keyboard settings */ in lenovo_input_mapping_x1_tab_kbd()
416 case 2: /* Fn-F12: User function / Cortana */ in lenovo_input_mapping_x1_tab_kbd()
419 case 3: /* Fn-PrtSc: Snipping tool */ in lenovo_input_mapping_x1_tab_kbd()
422 case 8: /* Fn-Esc: Fn-lock toggle */ in lenovo_input_mapping_x1_tab_kbd()
425 case 9: /* Fn-F4: Mute/unmute microphone */ in lenovo_input_mapping_x1_tab_kbd()
428 case 10: /* Fn-F9: Settings */ in lenovo_input_mapping_x1_tab_kbd()
431 case 13: /* Fn-F7: Manage external displays */ in lenovo_input_mapping_x1_tab_kbd()
434 case 14: /* Fn-F8: Enable/disable wifi */ in lenovo_input_mapping_x1_tab_kbd()
440 if (usage->hid == (HID_UP_KEYBOARD | 0x009a)) { in lenovo_input_mapping_x1_tab_kbd()
452 switch (hdev->product) { in lenovo_input_mapping()
493 return -ENOMEM; in lenovo_send_cmd_cptkbd()
504 switch (hdev->product) { in lenovo_send_cmd_cptkbd()
515 ret = -EINVAL; in lenovo_send_cmd_cptkbd()
542 ret = lenovo_send_cmd_cptkbd(hdev, 0x05, cptkbd_data->fn_lock); in lenovo_features_set_cptkbd()
544 hid_err(hdev, "Fn-lock setting failed: %d\n", ret); in lenovo_features_set_cptkbd()
546 ret = lenovo_send_cmd_cptkbd(hdev, 0x02, cptkbd_data->sensitivity); in lenovo_features_set_cptkbd()
558 return snprintf(buf, PAGE_SIZE, "%u\n", data->fn_lock); in attr_fn_lock_show()
571 return -EINVAL; in attr_fn_lock_store()
573 return -EINVAL; in attr_fn_lock_store()
575 data->fn_lock = !!value; in attr_fn_lock_store()
577 switch (hdev->product) { in attr_fn_lock_store()
603 cptkbd_data->sensitivity); in attr_sensitivity_show_cptkbd()
616 return -EINVAL; in attr_sensitivity_store_cptkbd()
618 cptkbd_data->sensitivity = value; in attr_sensitivity_store_cptkbd()
650 * Compact USB keyboard's Fn-F12 report holds down many other keys, and in lenovo_raw_event()
654 if (unlikely(hdev->product == USB_DEVICE_ID_LENOVO_CUSBKBD in lenovo_raw_event()
671 if (usage->type == EV_KEY && usage->code == KEY_FN_ESC && value == 1) { in lenovo_event_tp10ubkbd()
673 * The user has toggled the Fn-lock state. Toggle our own in lenovo_event_tp10ubkbd()
675 * ensure things are in sync (the sycning should be a no-op). in lenovo_event_tp10ubkbd()
677 data->fn_lock = !data->fn_lock; in lenovo_event_tp10ubkbd()
678 schedule_work(&data->fn_lock_sync_work); in lenovo_event_tp10ubkbd()
689 if (cptkbd_data->middlebutton_state != 3) { in lenovo_event_cptkbd()
691 * are only possible on patched, bug-free firmware in lenovo_event_cptkbd()
695 if (hdev->product == USB_DEVICE_ID_LENOVO_CUSBKBD && in lenovo_event_cptkbd()
696 cptkbd_data->middlebutton_state == 1 && in lenovo_event_cptkbd()
697 usage->type == EV_REL && in lenovo_event_cptkbd()
698 (usage->code == REL_X || usage->code == REL_Y)) { in lenovo_event_cptkbd()
699 cptkbd_data->middlebutton_state = 3; in lenovo_event_cptkbd()
701 input_event(field->hidinput->input, in lenovo_event_cptkbd()
703 input_sync(field->hidinput->input); in lenovo_event_cptkbd()
707 if (usage->type == EV_REL && (usage->code == REL_WHEEL || in lenovo_event_cptkbd()
708 usage->code == REL_HWHEEL)) { in lenovo_event_cptkbd()
709 /* Scroll events disable middle-click event */ in lenovo_event_cptkbd()
710 cptkbd_data->middlebutton_state = 2; in lenovo_event_cptkbd()
715 if (usage->type == EV_KEY && usage->code == BTN_MIDDLE) { in lenovo_event_cptkbd()
717 cptkbd_data->middlebutton_state = 1; in lenovo_event_cptkbd()
719 if (cptkbd_data->middlebutton_state == 1) { in lenovo_event_cptkbd()
720 /* No scrolling inbetween, send middle-click */ in lenovo_event_cptkbd()
721 input_event(field->hidinput->input, in lenovo_event_cptkbd()
723 input_sync(field->hidinput->input); in lenovo_event_cptkbd()
724 input_event(field->hidinput->input, in lenovo_event_cptkbd()
726 input_sync(field->hidinput->input); in lenovo_event_cptkbd()
728 cptkbd_data->middlebutton_state = 0; in lenovo_event_cptkbd()
734 if (usage->type == EV_KEY && usage->code == KEY_FN_ESC && value == 1) { in lenovo_event_cptkbd()
736 * The user has toggled the Fn-lock state. Toggle our own in lenovo_event_cptkbd()
738 * ensure things are in sync (the syncing should be a no-op). in lenovo_event_cptkbd()
740 cptkbd_data->fn_lock = !cptkbd_data->fn_lock; in lenovo_event_cptkbd()
752 switch (hdev->product) { in lenovo_event()
771 report = hdev->report_enum[HID_FEATURE_REPORT].report_id_hash[4]; in lenovo_features_set_tpkbd()
773 report->field[0]->value[0] = data_pointer->press_to_select ? 0x01 : 0x02; in lenovo_features_set_tpkbd()
774 report->field[0]->value[0] |= data_pointer->dragging ? 0x04 : 0x08; in lenovo_features_set_tpkbd()
775 report->field[0]->value[0] |= data_pointer->release_to_select ? 0x10 : 0x20; in lenovo_features_set_tpkbd()
776 report->field[0]->value[0] |= data_pointer->select_right ? 0x80 : 0x40; in lenovo_features_set_tpkbd()
777 report->field[1]->value[0] = 0x03; // unknown setting, imitate windows driver in lenovo_features_set_tpkbd()
778 report->field[2]->value[0] = data_pointer->sensitivity; in lenovo_features_set_tpkbd()
779 report->field[3]->value[0] = data_pointer->press_speed; in lenovo_features_set_tpkbd()
792 return snprintf(buf, PAGE_SIZE, "%u\n", data_pointer->press_to_select); in attr_press_to_select_show_tpkbd()
805 return -EINVAL; in attr_press_to_select_store_tpkbd()
807 return -EINVAL; in attr_press_to_select_store_tpkbd()
809 data_pointer->press_to_select = value; in attr_press_to_select_store_tpkbd()
822 return snprintf(buf, PAGE_SIZE, "%u\n", data_pointer->dragging); in attr_dragging_show_tpkbd()
835 return -EINVAL; in attr_dragging_store_tpkbd()
837 return -EINVAL; in attr_dragging_store_tpkbd()
839 data_pointer->dragging = value; in attr_dragging_store_tpkbd()
852 return snprintf(buf, PAGE_SIZE, "%u\n", data_pointer->release_to_select); in attr_release_to_select_show_tpkbd()
865 return -EINVAL; in attr_release_to_select_store_tpkbd()
867 return -EINVAL; in attr_release_to_select_store_tpkbd()
869 data_pointer->release_to_select = value; in attr_release_to_select_store_tpkbd()
882 return snprintf(buf, PAGE_SIZE, "%u\n", data_pointer->select_right); in attr_select_right_show_tpkbd()
895 return -EINVAL; in attr_select_right_store_tpkbd()
897 return -EINVAL; in attr_select_right_store_tpkbd()
899 data_pointer->select_right = value; in attr_select_right_store_tpkbd()
913 data_pointer->sensitivity); in attr_sensitivity_show_tpkbd()
926 return -EINVAL; in attr_sensitivity_store_tpkbd()
928 data_pointer->sensitivity = value; in attr_sensitivity_store_tpkbd()
942 data_pointer->press_speed); in attr_press_speed_show_tpkbd()
955 return -EINVAL; in attr_press_speed_store_tpkbd()
957 data_pointer->press_speed = value; in attr_press_speed_store_tpkbd()
1012 report = hdev->report_enum[HID_OUTPUT_REPORT].report_id_hash[3]; in lenovo_led_set_tpkbd()
1013 report->field[0]->value[0] = (data_pointer->led_state >> 0) & 1; in lenovo_led_set_tpkbd()
1014 report->field[0]->value[1] = (data_pointer->led_state >> 1) & 1; in lenovo_led_set_tpkbd()
1021 struct device *dev = led_cdev->dev->parent; in lenovo_led_brightness_set()
1028 if (led_cdev == &data_pointer->led_micmute) in lenovo_led_brightness_set()
1032 data_pointer->led_state &= ~(1 << led_nr); in lenovo_led_brightness_set()
1034 data_pointer->led_state |= 1 << led_nr; in lenovo_led_brightness_set()
1036 switch (hdev->product) { in lenovo_led_brightness_set()
1052 size_t name_sz = strlen(dev_name(&hdev->dev)) + 16; in lenovo_register_leds()
1056 name_mute = devm_kzalloc(&hdev->dev, name_sz, GFP_KERNEL); in lenovo_register_leds()
1057 name_micm = devm_kzalloc(&hdev->dev, name_sz, GFP_KERNEL); in lenovo_register_leds()
1060 return -ENOMEM; in lenovo_register_leds()
1062 snprintf(name_mute, name_sz, "%s:amber:mute", dev_name(&hdev->dev)); in lenovo_register_leds()
1063 snprintf(name_micm, name_sz, "%s:amber:micmute", dev_name(&hdev->dev)); in lenovo_register_leds()
1065 data->led_mute.name = name_mute; in lenovo_register_leds()
1066 data->led_mute.default_trigger = "audio-mute"; in lenovo_register_leds()
1067 data->led_mute.brightness_set_blocking = lenovo_led_brightness_set; in lenovo_register_leds()
1068 data->led_mute.max_brightness = 1; in lenovo_register_leds()
1069 data->led_mute.flags = LED_HW_PLUGGABLE; in lenovo_register_leds()
1070 data->led_mute.dev = &hdev->dev; in lenovo_register_leds()
1071 ret = led_classdev_register(&hdev->dev, &data->led_mute); in lenovo_register_leds()
1075 data->led_micmute.name = name_micm; in lenovo_register_leds()
1076 data->led_micmute.default_trigger = "audio-micmute"; in lenovo_register_leds()
1077 data->led_micmute.brightness_set_blocking = lenovo_led_brightness_set; in lenovo_register_leds()
1078 data->led_micmute.max_brightness = 1; in lenovo_register_leds()
1079 data->led_micmute.flags = LED_HW_PLUGGABLE; in lenovo_register_leds()
1080 data->led_micmute.dev = &hdev->dev; in lenovo_register_leds()
1081 ret = led_classdev_register(&hdev->dev, &data->led_micmute); in lenovo_register_leds()
1083 led_classdev_unregister(&data->led_mute); in lenovo_register_leds()
1107 return -ENODEV; in lenovo_probe_tpkbd()
1110 return -ENODEV; in lenovo_probe_tpkbd()
1112 ret = sysfs_create_group(&hdev->dev.kobj, &lenovo_attr_group_tpkbd); in lenovo_probe_tpkbd()
1116 data_pointer = devm_kzalloc(&hdev->dev, in lenovo_probe_tpkbd()
1121 ret = -ENOMEM; in lenovo_probe_tpkbd()
1126 data_pointer->sensitivity = 0xa0; in lenovo_probe_tpkbd()
1127 data_pointer->press_speed = 0x38; in lenovo_probe_tpkbd()
1139 sysfs_remove_group(&hdev->dev.kobj, &lenovo_attr_group_tpkbd); in lenovo_probe_tpkbd()
1149 if (((hdev->product == USB_DEVICE_ID_LENOVO_CUSBKBD) || in lenovo_probe_cptkbd()
1150 (hdev->product == USB_DEVICE_ID_LENOVO_TPIIUSBKBD)) && in lenovo_probe_cptkbd()
1151 hdev->type != HID_TYPE_USBMOUSE) { in lenovo_probe_cptkbd()
1156 cptkbd_data = devm_kzalloc(&hdev->dev, in lenovo_probe_cptkbd()
1161 return -ENOMEM; in lenovo_probe_cptkbd()
1166 cptkbd_data->middlebutton_state = 0; in lenovo_probe_cptkbd()
1167 cptkbd_data->fn_lock = true; in lenovo_probe_cptkbd()
1168 cptkbd_data->sensitivity = 0x05; in lenovo_probe_cptkbd()
1171 ret = sysfs_create_group(&hdev->dev.kobj, &lenovo_attr_group_cptkbd); in lenovo_probe_cptkbd()
1196 * The LEDs and the Fn-lock functionality use output report 9, in lenovo_probe_tp10ubkbd()
1201 rep_enum = &hdev->report_enum[HID_OUTPUT_REPORT]; in lenovo_probe_tp10ubkbd()
1202 list_for_each_entry(rep, &rep_enum->report_list, list) { in lenovo_probe_tp10ubkbd()
1203 if (rep->application == 0xffa00001) in lenovo_probe_tp10ubkbd()
1209 data = devm_kzalloc(&hdev->dev, sizeof(*data), GFP_KERNEL); in lenovo_probe_tp10ubkbd()
1211 return -ENOMEM; in lenovo_probe_tp10ubkbd()
1213 mutex_init(&data->led_report_mutex); in lenovo_probe_tp10ubkbd()
1214 INIT_WORK(&data->fn_lock_sync_work, lenovo_tp10ubkbd_sync_fn_lock); in lenovo_probe_tp10ubkbd()
1215 data->hdev = hdev; in lenovo_probe_tp10ubkbd()
1220 * The Thinkpad 10 ultrabook USB kbd dock's Fn-lock defaults to on. in lenovo_probe_tp10ubkbd()
1222 * (which should be a no-op) to make sure that our state matches the in lenovo_probe_tp10ubkbd()
1223 * keyboard's FN-lock state. This is the same as what Windows does. in lenovo_probe_tp10ubkbd()
1225 data->fn_lock = true; in lenovo_probe_tp10ubkbd()
1226 lenovo_led_set_tp10ubkbd(hdev, TP10UBKBD_FN_LOCK_LED, data->fn_lock); in lenovo_probe_tp10ubkbd()
1228 ret = sysfs_create_group(&hdev->dev.kobj, &lenovo_attr_group_tp10ubkbd); in lenovo_probe_tp10ubkbd()
1238 sysfs_remove_group(&hdev->dev.kobj, &lenovo_attr_group_tp10ubkbd); in lenovo_probe_tp10ubkbd()
1259 switch (hdev->product) { in lenovo_probe()
1290 switch (hdev->product) { in lenovo_reset_resume()
1293 if (hdev->type == HID_TYPE_USBMOUSE) in lenovo_reset_resume()
1316 sysfs_remove_group(&hdev->dev.kobj, in lenovo_remove_tpkbd()
1319 led_classdev_unregister(&data_pointer->led_micmute); in lenovo_remove_tpkbd()
1320 led_classdev_unregister(&data_pointer->led_mute); in lenovo_remove_tpkbd()
1325 sysfs_remove_group(&hdev->dev.kobj, in lenovo_remove_cptkbd()
1336 led_classdev_unregister(&data->led_micmute); in lenovo_remove_tp10ubkbd()
1337 led_classdev_unregister(&data->led_mute); in lenovo_remove_tp10ubkbd()
1339 sysfs_remove_group(&hdev->dev.kobj, &lenovo_attr_group_tp10ubkbd); in lenovo_remove_tp10ubkbd()
1340 cancel_work_sync(&data->fn_lock_sync_work); in lenovo_remove_tp10ubkbd()
1345 switch (hdev->product) { in lenovo_remove()
1367 switch (hdev->product) { in lenovo_input_configured()
1373 if (test_bit(EV_REL, hi->input->evbit)) { in lenovo_input_configured()
1375 __set_bit(INPUT_PROP_POINTER, hi->input->propbit); in lenovo_input_configured()
1377 hi->input->propbit); in lenovo_input_configured()
1402 * part, while letting hid-multitouch.c handle the touchpad and trackpoint.