Thread (8 messages) 8 messages, 3 authors, 2020-03-24

Re: [PATCH v3 1/2] Input: goodix - Add support for more then one touch-key

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2020-03-24 21:45:07

On Tue, Mar 24, 2020 at 10:38:10PM +0300, Dmitry Mastykin wrote:
Hi Dmitry,
we had discussed earlier this point with Hans:

Hans:
quoted
quoted
quoted
3) In goodix_ts_report_key you do:

                  for (i = 0; i < GOODIX_MAX_KEYS; ++i)
                          if (key_value & (1 << i))
                                  input_report_key(ts->input_dev,
ts->keymap[i], 1
quoted
quoted
quoted
But if the user then jumps his finger from say touch_key 0 to touch_key
1
quoted
quoted
quoted
without us receiving a "packet" in between with GOODIX_HAVE_KEY set,
then we never release touch_key 0. So instead this really should be:

                  for (i = 0; i < GOODIX_MAX_KEYS; ++i)
                          input_report_key(ts->input_dev, ts->keymap[i],
                                           key_value & (1 << i));
Me:
quoted
quoted
It seems, that this problem never happens. When user moves finger from
button to button, we stably receive 2-3 packets without
GOODIX_HAVE_KEY in between, that release all previous touches. From
other hand, your change will not work when the same keycode is
assigned to several buttons - it will be immediately released.
Hans:
quoted
Hmm, interesting point I did not think of that. That would be a bit
weird thing to do, but it is not impossible...

I'm afraid Dmitry (the input maintainer) will likely make the same
remark as I do though (when you submit this upstream). But we'll see.

Keeping this as is is fine with me.
So I'm impressed about your mutual understanding) And waiting for your
decision.
OK, I'll apply as is then. Thank you.

-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help