Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1264873 > unrolled thread
| Started by | Simon Wood <simon@mungewell.org> |
|---|---|
| First post | 2015-11-07 17:20 +0100 |
| Last post | 2015-11-10 21:10 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 6/6] HID: hid-logitech-hidpp: G920 remove deadzones Simon Wood <simon@mungewell.org> - 2015-11-07 17:20 +0100
Re: [PATCH 6/6] HID: hid-logitech-hidpp: G920 remove deadzones Benjamin Tissoires <benjamin.tissoires@gmail.com> - 2015-11-09 09:30 +0100
Re: [PATCH 6/6] HID: hid-logitech-hidpp: G920 remove deadzones "Simon Wood" <simon@mungewell.org> - 2015-11-10 21:10 +0100
| From | Simon Wood <simon@mungewell.org> |
|---|---|
| Date | 2015-11-07 17:20 +0100 |
| Subject | [PATCH 6/6] HID: hid-logitech-hidpp: G920 remove deadzones |
| Message-ID | <qsenE-4zw-7@gated-at.bofh.it> |
Ensure that the G920 is not given the default deadzones.
Signed-off-by: Simon Wood <simon@mungewell.org>
---
drivers/hid/hid-logitech-hidpp.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index 03e01be..853b9c2 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -1441,6 +1441,27 @@ 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)
+{
+ /* Ensure that Logitech G920 is not given a default fuzz/flat value */
+ if (usage->type == EV_ABS && (usage->code == ABS_X ||
+ usage->code == ABS_Y || usage->code == ABS_Z ||
+ usage->code == ABS_RZ)) {
+ switch (hdev->product) {
+ case USB_DEVICE_ID_LOGITECH_G920_WHEEL:
+ field->application = HID_GD_MULTIAXIS;
+ break;
+ default:
+ break;
+ }
+ }
+
+ return 0;
+}
+
+
static void hidpp_populate_input(struct hidpp_device *hidpp,
struct input_dev *input, bool origin_is_hid_core)
{
@@ -1873,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/
[toc] | [next] | [standalone]
| From | Benjamin Tissoires <benjamin.tissoires@gmail.com> |
|---|---|
| Date | 2015-11-09 09:30 +0100 |
| Message-ID | <qsPZU-3W1-3@gated-at.bofh.it> |
| In reply to | #1264873 |
On Sat, Nov 7, 2015 at 5:10 PM, Simon Wood <simon@mungewell.org> wrote:
> Ensure that the G920 is not given the default deadzones.
>
> Signed-off-by: Simon Wood <simon@mungewell.org>
> ---
> drivers/hid/hid-logitech-hidpp.c | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
> index 03e01be..853b9c2 100644
> --- a/drivers/hid/hid-logitech-hidpp.c
> +++ b/drivers/hid/hid-logitech-hidpp.c
> @@ -1441,6 +1441,27 @@ 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)
> +{
> + /* Ensure that Logitech G920 is not given a default fuzz/flat value */
> + if (usage->type == EV_ABS && (usage->code == ABS_X ||
> + usage->code == ABS_Y || usage->code == ABS_Z ||
> + usage->code == ABS_RZ)) {
> + switch (hdev->product) {
> + case USB_DEVICE_ID_LOGITECH_G920_WHEEL:
> + field->application = HID_GD_MULTIAXIS;
> + break;
> + default:
> + break;
> + }
> + }
I'd rather see this as:
if (hidpp->quirks & HIDPP_QUIRK_CLASS_G920) {
if (usage->type == EV_ABS && (usage->code == ABS_X ....
field->application = HID_GD_MULTIAXIS;
}
}
Just to make sure we do not enter this code path for other devices.
With this change, and the nitpicks in the other patches, the series is:
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cheers,
Benjamin
> +
> + return 0;
> +}
> +
> +
> static void hidpp_populate_input(struct hidpp_device *hidpp,
> struct input_dev *input, bool origin_is_hid_core)
> {
> @@ -1873,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/
--
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/
[toc] | [prev] | [next] | [standalone]
| From | "Simon Wood" <simon@mungewell.org> |
|---|---|
| Date | 2015-11-10 21:10 +0100 |
| Message-ID | <qtnoS-1h5-9@gated-at.bofh.it> |
| In reply to | #1265448 |
> With this change, and the nitpicks in the other patches, the series is: > Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Have Patch-V2 in progress. Other build problems stopped in last night but trying again with new pull - hopefully they are fixed. Simon -- 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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web