Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1268087
| From | Simon Wood <simon@mungewell.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [Patch-V2 6/6] HID: hid-logitech-hidpp: G920 remove deadzones |
| Date | 2015-11-12 17:30 +0100 |
| Message-ID | <qu2V5-2MB-39@gated-at.bofh.it> (permalink) |
| References | <qu2V3-2MB-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Ensure that the G920 is not given the default deadzones.
Signed-off-by: Simon Wood <simon@mungewell.org>
---
drivers/hid/hid-logitech-hidpp.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index 80ebd1c..e235f3d 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -1441,6 +1441,25 @@ static int hidpp_input_mapping(struct hid_device *hdev, struct hid_input *hi,
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,
struct input_dev *input, bool origin_is_hid_core)
{
@@ -1875,6 +1894,7 @@ static struct hid_driver hidpp_driver = {
.raw_event = hidpp_raw_event,
.input_configured = hidpp_input_configured,
.input_mapping = hidpp_input_mapping,
+ .input_mapped = hidpp_input_mapped,
};
module_hid_driver(hidpp_driver);
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[Patch-V2 0/6] HID: Support for the Logitech G920 Wheel Simon Wood <simon@mungewell.org> - 2015-11-12 17:30 +0100 [Patch-V2 1/6] INPUT: xpad: Add minimal support for Logitech G920 Wheel Simon Wood <simon@mungewell.org> - 2015-11-12 17:30 +0100 [Patch-V2 4/6] HID: hid-logitech-hidpp: Add range sysfs for Logitech G920 Simon Wood <simon@mungewell.org> - 2015-11-12 17:30 +0100 [Patch-V2 6/6] HID: hid-logitech-hidpp: G920 remove deadzones Simon Wood <simon@mungewell.org> - 2015-11-12 17:30 +0100 [Patch-V2 3/6] HID: hid-logitech-hidpp: Add basic support for Logitech G920 Simon Wood <simon@mungewell.org> - 2015-11-12 17:30 +0100 Re: [Patch-V2 0/6] HID: Support for the Logitech G920 Wheel "Simon Wood" <simon@mungewell.org> - 2015-11-12 17:40 +0100
csiph-web