Lines Matching +full:abs +full:- +full:fuzz

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
25 #include "hid-ids.h"
26 #include "hid-lg.h"
27 #include "hid-lg4ff.h"
435 if ((drv_data->quirks & LG_RDESC) && *rsize >= 91 && rdesc[83] == 0x26 && in lg_report_fixup()
442 if ((drv_data->quirks & LG_RDESC_REL_ABS) && *rsize >= 51 && in lg_report_fixup()
446 "fixing up rel/abs in Logitech report descriptor\n"); in lg_report_fixup()
450 switch (hdev->product) { in lg_report_fixup()
541 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR) in lg_ultrax_remote_mapping()
544 set_bit(EV_REP, hi->input->evbit); in lg_ultrax_remote_mapping()
545 switch (usage->hid & HID_USAGE) { in lg_ultrax_remote_mapping()
574 if ((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER) in lg_wireless_mapping()
577 switch (usage->hid & HID_USAGE) { in lg_wireless_mapping()
649 unsigned int hid = usage->hid; in lg_input_mapping()
651 if (hdev->product == USB_DEVICE_ID_LOGITECH_RECEIVER && in lg_input_mapping()
655 if ((drv_data->quirks & LG_WIRELESS) && lg_wireless_mapping(hi, usage, bit, max)) in lg_input_mapping()
664 if (field->application == HID_GD_MOUSE) { in lg_input_mapping()
665 if ((drv_data->quirks & LG_IGNORE_DOUBLED_WHEEL) && in lg_input_mapping()
667 return -1; in lg_input_mapping()
669 if ((drv_data->quirks & LG_EXPANDED_KEYMAP) && in lg_input_mapping()
687 if ((drv_data->quirks & LG_BAD_RELATIVE_KEYS) && usage->type == EV_KEY && in lg_input_mapped()
688 (field->flags & HID_MAIN_ITEM_RELATIVE)) in lg_input_mapped()
689 field->flags &= ~HID_MAIN_ITEM_RELATIVE; in lg_input_mapped()
691 if ((drv_data->quirks & LG_DUPLICATE_USAGES) && (usage->type == EV_KEY || in lg_input_mapped()
692 usage->type == EV_REL || usage->type == EV_ABS)) in lg_input_mapped()
693 clear_bit(usage->code, *bit); in lg_input_mapped()
695 /* Ensure that Logitech wheels are not given a default fuzz/flat value */ in lg_input_mapped()
696 if (usage->type == EV_ABS && (usage->code == ABS_X || in lg_input_mapped()
697 usage->code == ABS_Y || usage->code == ABS_Z || in lg_input_mapped()
698 usage->code == ABS_RZ)) { in lg_input_mapped()
699 switch (hdev->product) { in lg_input_mapped()
712 field->application = HID_GD_MULTIAXIS; in lg_input_mapped()
727 if ((drv_data->quirks & LG_INVERT_HWHEEL) && usage->code == REL_HWHEEL) { in lg_event()
728 input_event(field->hidinput->input, usage->type, usage->code, in lg_event()
729 -value); in lg_event()
732 if (drv_data->quirks & LG_FF4) { in lg_event()
744 if (drv_data->quirks & LG_FF4) in lg_raw_event()
759 return -EINVAL; in lg_probe()
761 iface = to_usb_interface(hdev->dev.parent); in lg_probe()
762 iface_num = iface->cur_altsetting->desc.bInterfaceNumber; in lg_probe()
765 if ((hdev->product == USB_DEVICE_ID_LOGITECH_G29_WHEEL) && in lg_probe()
768 return -ENODEV; in lg_probe()
774 return -ENOMEM; in lg_probe()
776 drv_data->quirks = id->driver_data; in lg_probe()
780 if (drv_data->quirks & LG_NOGET) in lg_probe()
781 hdev->quirks |= HID_QUIRK_NOGET; in lg_probe()
789 if (drv_data->quirks & (LG_FF | LG_FF2 | LG_FF3 | LG_FF4)) in lg_probe()
799 if (hdev->product == USB_DEVICE_ID_LOGITECH_WII_WHEEL) { in lg_probe()
806 ret = -ENOMEM; in lg_probe()
829 if (drv_data->quirks & LG_FF) in lg_probe()
831 else if (drv_data->quirks & LG_FF2) in lg_probe()
833 else if (drv_data->quirks & LG_FF3) in lg_probe()
835 else if (drv_data->quirks & LG_FF4) in lg_probe()
853 if (drv_data->quirks & LG_FF4) in lg_remove()