Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1273959 > unrolled thread

[PATCH 1/1] HID: multitouch: enable palm rejection if device implements confidence usage

Started byAllen Hung <allen_hung@dell.com>
First post2015-11-20 11:40 +0100
Last post2015-11-26 15:30 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/1] HID: multitouch: enable palm rejection if device implements confidence usage Allen Hung <allen_hung@dell.com> - 2015-11-20 11:40 +0100
    Re: [PATCH 1/1] HID: multitouch: enable palm rejection if device  implements confidence usage Benjamin Tissoires <benjamin.tissoires@gmail.com> - 2015-11-23 14:50 +0100
    Re: [PATCH 1/1] HID: multitouch: enable palm rejection if device  implements confidence usage Jiri Kosina <jikos@kernel.org> - 2015-11-26 15:30 +0100

#1273959 — [PATCH 1/1] HID: multitouch: enable palm rejection if device implements confidence usage

FromAllen Hung <allen_hung@dell.com>
Date2015-11-20 11:40 +0100
Subject[PATCH 1/1] HID: multitouch: enable palm rejection if device implements confidence usage
Message-ID<qwRgK-60g-17@gated-at.bofh.it>
The usage Confidence is mandary to Windows Precision Touchpad devices. The
appearance of this usage is checked in hidinput_connect but the quirk
MT_QUIRK_VALID_IS_CONFIDENCE is not applied to device accordingly.
Apply this quirk and also remove quirk MT_QUIRK_ALWAYS_VALID to enable palm
rejection for the WIN 8 touchpad devices which have implemented usage
Confidence in its input reports.

Tested on Dell XPS 13 laptop.

Signed-off-by: Allen Hung <allen_hung@dell.com>
---
 drivers/hid/hid-multitouch.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 426b2f1..13aeff9 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -448,6 +448,11 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 			mt_store_field(usage, td, hi);
 			return 1;
 		case HID_DG_CONFIDENCE:
+			if (cls->name == MT_CLS_WIN_8 &&
+				field->application == HID_DG_TOUCHPAD) {
+				cls->quirks &= ~MT_QUIRK_ALWAYS_VALID;
+				cls->quirks |= MT_QUIRK_VALID_IS_CONFIDENCE;
+			}
 			mt_store_field(usage, td, hi);
 			return 1;
 		case HID_DG_TIPSWITCH:
-- 
1.9.1

--
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]


#1275402 — Re: [PATCH 1/1] HID: multitouch: enable palm rejection if device implements confidence usage

FromBenjamin Tissoires <benjamin.tissoires@gmail.com>
Date2015-11-23 14:50 +0100
SubjectRe: [PATCH 1/1] HID: multitouch: enable palm rejection if device implements confidence usage
Message-ID<qxZFg-2qN-15@gated-at.bofh.it>
In reply to#1273959
On Fri, Nov 20, 2015 at 11:21 AM, Allen Hung <allen_hung@dell.com> wrote:
> The usage Confidence is mandary to Windows Precision Touchpad devices. The
> appearance of this usage is checked in hidinput_connect but the quirk
> MT_QUIRK_VALID_IS_CONFIDENCE is not applied to device accordingly.
> Apply this quirk and also remove quirk MT_QUIRK_ALWAYS_VALID to enable palm
> rejection for the WIN 8 touchpad devices which have implemented usage
> Confidence in its input reports.
>
> Tested on Dell XPS 13 laptop.
>
> Signed-off-by: Allen Hung <allen_hung@dell.com>
> ---

No side effects on non touchpads as reported by my tests.
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Cheers,
Benjamin

>  drivers/hid/hid-multitouch.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
> index 426b2f1..13aeff9 100644
> --- a/drivers/hid/hid-multitouch.c
> +++ b/drivers/hid/hid-multitouch.c
> @@ -448,6 +448,11 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
>                         mt_store_field(usage, td, hi);
>                         return 1;
>                 case HID_DG_CONFIDENCE:
> +                       if (cls->name == MT_CLS_WIN_8 &&
> +                               field->application == HID_DG_TOUCHPAD) {
> +                               cls->quirks &= ~MT_QUIRK_ALWAYS_VALID;
> +                               cls->quirks |= MT_QUIRK_VALID_IS_CONFIDENCE;
> +                       }
>                         mt_store_field(usage, td, hi);
>                         return 1;
>                 case HID_DG_TIPSWITCH:
> --
> 1.9.1
>
--
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]


#1278260 — Re: [PATCH 1/1] HID: multitouch: enable palm rejection if device implements confidence usage

FromJiri Kosina <jikos@kernel.org>
Date2015-11-26 15:30 +0100
SubjectRe: [PATCH 1/1] HID: multitouch: enable palm rejection if device implements confidence usage
Message-ID<qz5IC-6m2-13@gated-at.bofh.it>
In reply to#1273959
On Fri, 20 Nov 2015, Allen Hung wrote:

> The usage Confidence is mandary to Windows Precision Touchpad devices. The
> appearance of this usage is checked in hidinput_connect but the quirk
> MT_QUIRK_VALID_IS_CONFIDENCE is not applied to device accordingly.
> Apply this quirk and also remove quirk MT_QUIRK_ALWAYS_VALID to enable palm
> rejection for the WIN 8 touchpad devices which have implemented usage
> Confidence in its input reports.
> 
> Tested on Dell XPS 13 laptop.
> 
> Signed-off-by: Allen Hung <allen_hung@dell.com>

Applied to for-4.5/multitouch. Thanks,

-- 
Jiri Kosina
SUSE Labs

--
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