lkml.org 
[lkml]   [2022]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: PROBLEM: Regression likely in hid_uclogic driver breaks Huion Inspiroy H640 drawing tablet
From
> FWIW, I found the issue: the hid-uclogic driver is emitting input data
> behind hid-input, and the state between the 2 is desynchronized.
>
> The following patch seems to be working (with the Huion v1 protocol I
> have here that I have tweaked to resemble a v2):
> ---
> From aeedd318e6cb4dbee551f67616302cc7c4308c58 Mon Sep 17 00:00:00 2001
> From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Date: Thu, 18 Aug 2022 15:09:25 +0200
> Subject: [PATCH] Fix uclogic
>
> ---
>  drivers/hid/hid-input.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
> index c6b27aab9041..a3e2397bb3a7 100644
> --- a/drivers/hid/hid-input.c
> +++ b/drivers/hid/hid-input.c
> @@ -1530,7 +1530,10 @@ void hidinput_hid_event(struct hid_device *hid,
> struct hid_field *field, struct
>               * assume ours
>               */
>              if (!report->tool)
> -                hid_report_set_tool(report, input, usage->code);
> +                report->tool = usage->code;
> +
> +            /* drivers may have changed the value behind our back,
> resend it */
> +            hid_report_set_tool(report, input, report->tool);
>          } else {
>              hid_report_release_tool(report, input, usage->code);
>          }

What branch should this be applied on top of?

\
 
 \ /
  Last update: 2022-08-21 01:47    [W:0.424 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site