-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Touchscreen spurious event fix #2207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
pelwell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine apart from the formatting issue, and the lack of "Signed-off-by:".
| input_mt_slot(ts->input_dev, touchid); | ||
| input_mt_report_slot_state(ts->input_dev, MT_TOOL_FINGER, 1); | ||
| if (event_id == FTS_TOUCH_CONTACT || event_id == FTS_TOUCH_DOWN) | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This brace belongs on the previous line. If it doesn't fit, split the predicate after the ||.
| { | ||
| int x = (((int) regs.point[i].xh & 0xf) << 8) + regs.point[i].xl; | ||
| int y = (((int) regs.point[i].yh & 0xf) << 8) + regs.point[i].yl; | ||
| int touchid = (regs.point[i].yh >> 4) & 0xf; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this value going to be correct? Looks like you've got 2 bits for touchid and 2 bits for touch number... But this is supposed to be a five touch device, in fact I believe the old one was 10 point...
|
I've not changed that bit of code - just added the conditional. Touch ID is
4 bits, event ID is 2 bit according to datasheet.
Forgot this was linux, I'll update the PR to coding standard.
…On 22 September 2017 at 10:43, Gordon Hollingworth ***@***.*** > wrote:
***@***.**** commented on this pull request.
------------------------------
In drivers/input/touchscreen/rpi-ft5406.c
<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_raspberrypi_linux_pull_2207-23discussion-5Fr140452534&d=DwMCaQ&c=DpyQ_ftY536pf7wCBQXXU58xADDRY77THQzJu1OmzOo&r=w09_2ePv8G3zRjoV19Wm1Q6rI7CDlOns4PuRv2hHkek&m=rxV7dDGaZ0PYOHzygMO_n0RcBh9n9cOHRtHCTeO1o0Q&s=_SIXFUzuPniD30yl755GtomTgq4nXA90VNb0bsiMqVw&e=>
:
> @@ -81,18 +84,21 @@ static int ft5406_thread(void *arg)
int x = (((int) regs.point[i].xh & 0xf) << 8) + regs.point[i].xl;
int y = (((int) regs.point[i].yh & 0xf) << 8) + regs.point[i].yl;
int touchid = (regs.point[i].yh >> 4) & 0xf;
Is this value going to be correct? Looks like you've got 2 bits for
touchid and 2 bits for touch number... But this is supposed to be a five
touch device, in fact I believe the old one was 10 point...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_raspberrypi_linux_pull_2207-23pullrequestreview-2D64529328&d=DwMCaQ&c=DpyQ_ftY536pf7wCBQXXU58xADDRY77THQzJu1OmzOo&r=w09_2ePv8G3zRjoV19Wm1Q6rI7CDlOns4PuRv2hHkek&m=rxV7dDGaZ0PYOHzygMO_n0RcBh9n9cOHRtHCTeO1o0Q&s=rIHysR7rpUw99diffbp53KezY5DJyFs4i1HYM8O4f4s&e=>,
or mute the thread
<https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_ADqrHQIyHDNyZ-5F-2DevvAp9X8SBE-5FsOoZIks5sk4FCgaJpZM4PgdEJ&d=DwMCaQ&c=DpyQ_ftY536pf7wCBQXXU58xADDRY77THQzJu1OmzOo&r=w09_2ePv8G3zRjoV19Wm1Q6rI7CDlOns4PuRv2hHkek&m=rxV7dDGaZ0PYOHzygMO_n0RcBh9n9cOHRtHCTeO1o0Q&s=xrxeEH0FEQWDVG439ByJLg8-b6yG9KAoIOmgIiB_PwA&e=>
.
--
James Hughes
Principal Software Engineer,
Raspberry Pi (Trading) Ltd
|
308d925 to
6700982
Compare
Touchscreen driver was not checking event type, which meant bad coords that arrived with the finger up event were being used, causing this spurious coordinate event. Fix is to ignore all finger up events. Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
6700982 to
78c5c39
Compare
kernel: Touchscreen spurious event fix See: raspberrypi/linux#2207 firmware: tvservice: Avoid unmatched reference counting on attach/unplugged events See: #875
kernel: Touchscreen spurious event fix See: raspberrypi/linux#2207 firmware: tvservice: Avoid unmatched reference counting on attach/unplugged events See: raspberrypi/firmware#875
|
Thanks Dom.
…On 22 September 2017 at 17:34, popcornmix ***@***.***> wrote:
Merged #2207 <#2207>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2207 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADqrHVJnJhIJmQ2BewDt-xKKwpxLnI-Zks5sk-GcgaJpZM4PgdEJ>
.
--
James Hughes
Principal Software Engineer,
Raspberry Pi (Trading) Ltd
|
kernel: Touchscreen spurious event fix See: raspberrypi/linux#2207 firmware: tvservice: Avoid unmatched reference counting on attach/unplugged events See: #875
kernel: Touchscreen spurious event fix See: raspberrypi/linux#2207 firmware: tvservice: Avoid unmatched reference counting on attach/unplugged events See: raspberrypi/firmware#875
Touchscreen driver was not checking event type,
which meant bad coords that arrived with the
finger up event were being used, causing this
spurious coordinate event.
Fix is to ignore all finger up events.