Commit 0b1804e3 authored by Simon Wood's avatar Simon Wood Committed by Jiri Kosina

HID: hid-logitech-hidpp: G920 remove deadzones

Ensure that the G920 is not given the default deadzones.
Signed-off-by: default avatarSimon Wood <simon@mungewell.org>
Reviewed-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent b466c1dd
...@@ -1441,6 +1441,25 @@ static int hidpp_input_mapping(struct hid_device *hdev, struct hid_input *hi, ...@@ -1441,6 +1441,25 @@ static int hidpp_input_mapping(struct hid_device *hdev, struct hid_input *hi,
return 0; return 0;
} }
static int hidpp_input_mapped(struct hid_device *hdev, struct hid_input *hi,
struct hid_field *field, struct hid_usage *usage,
unsigned long **bit, int *max)
{
struct hidpp_device *hidpp = hid_get_drvdata(hdev);
/* Ensure that Logitech G920 is not given a default fuzz/flat value */
if (hidpp->quirks & HIDPP_QUIRK_CLASS_G920) {
if (usage->type == EV_ABS && (usage->code == ABS_X ||
usage->code == ABS_Y || usage->code == ABS_Z ||
usage->code == ABS_RZ)) {
field->application = HID_GD_MULTIAXIS;
}
}
return 0;
}
static void hidpp_populate_input(struct hidpp_device *hidpp, static void hidpp_populate_input(struct hidpp_device *hidpp,
struct input_dev *input, bool origin_is_hid_core) struct input_dev *input, bool origin_is_hid_core)
{ {
...@@ -1875,6 +1894,7 @@ static struct hid_driver hidpp_driver = { ...@@ -1875,6 +1894,7 @@ static struct hid_driver hidpp_driver = {
.raw_event = hidpp_raw_event, .raw_event = hidpp_raw_event,
.input_configured = hidpp_input_configured, .input_configured = hidpp_input_configured,
.input_mapping = hidpp_input_mapping, .input_mapping = hidpp_input_mapping,
.input_mapped = hidpp_input_mapped,
}; };
module_hid_driver(hidpp_driver); module_hid_driver(hidpp_driver);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment