Lines Matching +full:x +full:- +full:max
1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * Copyright (c) 2000-2005 Vojtech Pavlik <vojtech@suse.cz>
7 * Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc
8 * Copyright (c) 2006-2007 Jiri Kosina
30 #include "hid-ids.h"
85 hid_map_usage_clear(hi, usage, bit, max, EV_KEY, (c))
89 unsigned long **bit, int *max) in samsung_kbd_mouse_input_mapping() argument
91 struct usb_interface *intf = to_usb_interface(hdev->dev.parent); in samsung_kbd_mouse_input_mapping()
92 unsigned short ifnum = intf->cur_altsetting->desc.bInterfaceNumber; in samsung_kbd_mouse_input_mapping()
94 if (ifnum != 1 || HID_UP_CONSUMER != (usage->hid & HID_USAGE_PAGE)) in samsung_kbd_mouse_input_mapping()
97 dbg_hid("samsung wireless keyboard/mouse input mapping event [0x%x]\n", in samsung_kbd_mouse_input_mapping()
98 usage->hid & HID_USAGE); in samsung_kbd_mouse_input_mapping()
100 switch (usage->hid & HID_USAGE) { in samsung_kbd_mouse_input_mapping()
144 unsigned long **bit, int *max) in samsung_kbd_input_mapping() argument
146 if (!(HID_UP_CONSUMER == (usage->hid & HID_USAGE_PAGE) || in samsung_kbd_input_mapping()
147 HID_UP_KEYBOARD == (usage->hid & HID_USAGE_PAGE))) in samsung_kbd_input_mapping()
150 dbg_hid("samsung wireless keyboard input mapping event [0x%x]\n", in samsung_kbd_input_mapping()
151 usage->hid & HID_USAGE); in samsung_kbd_input_mapping()
153 if (HID_UP_KEYBOARD == (usage->hid & HID_USAGE_PAGE)) { in samsung_kbd_input_mapping()
154 set_bit(EV_REP, hi->input->evbit); in samsung_kbd_input_mapping()
155 switch (usage->hid & HID_USAGE) { in samsung_kbd_input_mapping()
171 if (HID_UP_CONSUMER == (usage->hid & HID_USAGE_PAGE)) { in samsung_kbd_input_mapping()
172 switch (usage->hid & HID_USAGE) { in samsung_kbd_input_mapping()
237 unsigned long **bit, int *max) in samsung_gamepad_input_mapping() argument
239 if (!(HID_UP_BUTTON == (usage->hid & HID_USAGE_PAGE) || in samsung_gamepad_input_mapping()
240 HID_UP_CONSUMER == (usage->hid & HID_USAGE_PAGE))) in samsung_gamepad_input_mapping()
243 dbg_hid("samsung wireless gamepad input mapping event [0x%x], %ld, %ld, [0x%x]\n", in samsung_gamepad_input_mapping()
244 usage->hid & HID_USAGE, hi->input->evbit[0], hi->input->absbit[0], usage->hid & HID_USAGE_PAGE); in samsung_gamepad_input_mapping()
246 if (HID_UP_BUTTON == (usage->hid & HID_USAGE_PAGE)) { in samsung_gamepad_input_mapping()
247 switch (usage->hid & HID_USAGE) { in samsung_gamepad_input_mapping()
301 if (HID_UP_CONSUMER == (usage->hid & HID_USAGE_PAGE)) { in samsung_gamepad_input_mapping()
302 switch (usage->hid & HID_USAGE) { in samsung_gamepad_input_mapping()
328 unsigned long **bit, int *max) in samsung_actionmouse_input_mapping() argument
331 dbg_hid("samsung wireless actionmouse input mapping event [0x%x], [0x%x], %ld, %ld, [0x%x]\n", in samsung_actionmouse_input_mapping()
332 usage->hid, usage->hid & HID_USAGE, hi->input->evbit[0], hi->input->absbit[0], in samsung_actionmouse_input_mapping()
333 usage->hid & HID_USAGE_PAGE); in samsung_actionmouse_input_mapping()
335 …if (((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER) && ((usage->hid & HID_USAGE_PAGE) != HID_UP… in samsung_actionmouse_input_mapping()
338 switch (usage->hid & HID_USAGE) { in samsung_actionmouse_input_mapping()
351 unsigned long **bit, int *max) in samsung_universal_kbd_input_mapping() argument
353 if (!(HID_UP_CONSUMER == (usage->hid & HID_USAGE_PAGE) || in samsung_universal_kbd_input_mapping()
354 HID_UP_KEYBOARD == (usage->hid & HID_USAGE_PAGE))) in samsung_universal_kbd_input_mapping()
357 dbg_hid("samsung wireless keyboard input mapping event [0x%x]\n", in samsung_universal_kbd_input_mapping()
358 usage->hid & HID_USAGE); in samsung_universal_kbd_input_mapping()
360 if (HID_UP_KEYBOARD == (usage->hid & HID_USAGE_PAGE)) { in samsung_universal_kbd_input_mapping()
361 set_bit(EV_REP, hi->input->evbit); in samsung_universal_kbd_input_mapping()
362 switch (usage->hid & HID_USAGE) { in samsung_universal_kbd_input_mapping()
378 if (HID_UP_CONSUMER == (usage->hid & HID_USAGE_PAGE)) { in samsung_universal_kbd_input_mapping()
379 switch (usage->hid & HID_USAGE) { in samsung_universal_kbd_input_mapping()
436 /* S-Finder */ in samsung_universal_kbd_input_mapping()
475 if (hdev->product == USB_DEVICE_ID_SAMSUNG_IR_REMOTE && hid_is_usb(hdev)) in samsung_report_fixup()
482 unsigned long **bit, int *max) in samsung_input_mapping() argument
486 if (hdev->product == USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE && hid_is_usb(hdev)) in samsung_input_mapping()
488 hi, field, usage, bit, max); in samsung_input_mapping()
489 else if (hdev->product == USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD) in samsung_input_mapping()
491 hi, field, usage, bit, max); in samsung_input_mapping()
492 else if (hdev->product == USB_DEVICE_ID_SAMSUNG_WIRELESS_GAMEPAD) in samsung_input_mapping()
494 hi, field, usage, bit, max); in samsung_input_mapping()
495 else if (hdev->product == USB_DEVICE_ID_SAMSUNG_WIRELESS_ACTIONMOUSE) in samsung_input_mapping()
497 hi, field, usage, bit, max); in samsung_input_mapping()
498 else if (hdev->product == USB_DEVICE_ID_SAMSUNG_WIRELESS_UNIVERSAL_KBD) in samsung_input_mapping()
500 hi, field, usage, bit, max); in samsung_input_mapping()
501 else if (hdev->product == USB_DEVICE_ID_SAMSUNG_WIRELESS_MULTI_HOGP_KBD) in samsung_input_mapping()
503 hi, field, usage, bit, max); in samsung_input_mapping()
520 if (hdev->product == USB_DEVICE_ID_SAMSUNG_IR_REMOTE) { in samsung_probe()
522 ret = -EINVAL; in samsung_probe()
525 if (hdev->rsize == 184) { in samsung_probe()