From: Dmitry Mastykin <dmastykin@astralinux.ru>
To: Bastien Nocera <hadess@hadess.net>,
Hans de Goede <hdegoede@redhat.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH v2 2/2] Input: goodix - Ignore spurious interrupts
Date: Fri, 13 Mar 2020 17:20:04 +0300 [thread overview]
Message-ID: <ca4b48c0-bff4-99ba-1870-7484a30825b1@astralinux.ru> (raw)
In-Reply-To: <f7519cf8de6bd6982ae1064d0352370f2d725444.camel@hadess.net>
Hi,
Agree, it's better like this, especially the header.
Kind regards
Dmitry Mastykin
On 3/13/20 4:28 PM, Bastien Nocera wrote:
> On Thu, 2020-03-12 at 17:50 +0300, Dmitry Mastykin wrote:
>> The goodix panel sends spurious interrupts after a 'finger up' event,
>> which always cause a timeout.
>> The timeout was reported as touch_num == 0 and caused reading of
>> not ready buffer and false key release event.
>> In this patch the timeout is reported as ENOMSG and not processed.
>
> I think a better commit message would be:
> "
> Input: goodix - Fix spurious key release events
>
> The goodix panel sends spurious interrupts after a 'finger up' event,
> which always cause a timeout.
> We were exiting the interrupt handler by reporting touch_num == 0, but
> this was still processed as valid and caused the code to use the
> uninitialised point_data, creating spurious key release events.
>
> Report an error from the interrupt handler so as to avoid processing
> invalid point_data further.
> "
>
> Looks good otherwise.
>
>>
>> Signed-off-by: Dmitry Mastykin <dmastykin@astralinux.ru>
>> ---
>> Changes in v2:
>> - Improve commit message
>> ---
>> drivers/input/touchscreen/goodix.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/input/touchscreen/goodix.c
>> b/drivers/input/touchscreen/goodix.c
>> index daf1781..0e14719 100644
>> --- a/drivers/input/touchscreen/goodix.c
>> +++ b/drivers/input/touchscreen/goodix.c
>> @@ -329,7 +329,7 @@ static int goodix_ts_read_input_report(struct
>> goodix_ts_data *ts, u8 *data)
>> * The Goodix panel will send spurious interrupts after a
>> * 'finger up' event, which will always cause a timeout.
>> */
>> - return 0;
>> + return -ENOMSG;
>> }
>>
>> static void goodix_ts_report_touch_8b(struct goodix_ts_data *ts, u8
>> *coor_data)
>
next prev parent reply other threads:[~2020-03-13 14:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-12 14:50 [PATCH v2 1/2] Input: goodix - Add support for more then one touch-key Dmitry Mastykin
2020-03-12 14:50 ` [PATCH v2 2/2] Input: goodix - Ignore spurious interrupts Dmitry Mastykin
2020-03-13 11:10 ` Hans de Goede
2020-03-13 13:28 ` Bastien Nocera
2020-03-13 14:20 ` Dmitry Mastykin [this message]
2020-03-13 11:10 ` [PATCH v2 1/2] Input: goodix - Add support for more then one touch-key Hans de Goede
2020-03-13 13:19 ` Bastien Nocera
2020-03-13 14:18 ` Dmitry Mastykin
2020-03-13 15:20 ` Bastien Nocera
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ca4b48c0-bff4-99ba-1870-7484a30825b1@astralinux.ru \
--to=dmastykin@astralinux.ru \
--cc=dmitry.torokhov@gmail.com \
--cc=hadess@hadess.net \
--cc=hdegoede@redhat.com \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).