]> git.itanic.dy.fi Git - linux-stable/commit
Input: synaptics-rmi4 - unmask F03 interrupts when port is opened
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 17 Jan 2018 23:46:18 +0000 (15:46 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Feb 2018 16:58:43 +0000 (17:58 +0100)
commite66aa9b5cedf9026ba07ec6e410417a782281f88
tree7a4dc0585bb62d95c86ec3a335bd04da80fcb01f
parentd7e9ad33f4a9a29515dd10daddd61be621473655
Input: synaptics-rmi4 - unmask F03 interrupts when port is opened

commit 6abe534f0776d2437c8302f58d8eb5abd483e926 upstream.

Currently we register the pass-through serio port when we probe the F03 RMI
function, and then, in sensor configure phase, we unmask interrupts.
Unfortunately this is too late, as other drivers are free probe devices
attached to the serio port as soon as it is probed. Because interrupts are
masked, the IO times out, which may result in not being able to detect
trackpoints on the pass-through port.

To fix the issue we implement open() and close() methods for the
pass-through serio port and unmask interrupts from there. We also move
creation of the pass-through port form probe to configure stage, as RMI
driver does not enable transport interrupt until all functions are probed
(we should change this, but this is a separate topic).

We also try to clear the pending data before unmasking interrupts, because
some devices like to spam the system with multiple 0xaa 0x00 announcements,
which may interfere with us trying to query ID of the device.

Fixes: c5e8848fc98e ("Input: synaptics-rmi4 - add support for F03")
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/rmi4/rmi_f03.c