linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Input: synaptics-rmi4 - clear irqs before set irqs
@ 2019-02-20 16:41 Aaron Ma
  2019-02-20 16:42 ` [PATCH 2/2] Input: synaptics-rmi4 - export nosleep of f01 via sysfs Aaron Ma
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Aaron Ma @ 2019-02-20 16:41 UTC (permalink / raw)
  To: dmitry.torokhov, linux-input, linux-kernel, Cheiny, aduggan,
	benjamin.tissoires, aaron.ma

rmi4 got spam data after S3 resume on some ThinkPads.
Then TrackPoint lost when be detected by psmouse.
Clear irqs status before set irqs will make TrackPoint back.

BugLink: https://bugs.launchpad.net/bugs/1791427
Cc: <stable@vger.kernel.org>
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
---
 drivers/input/rmi4/rmi_driver.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c
index fc3ab93b7aea..20631b272f43 100644
--- a/drivers/input/rmi4/rmi_driver.c
+++ b/drivers/input/rmi4/rmi_driver.c
@@ -374,6 +374,17 @@ static int rmi_driver_set_irq_bits(struct rmi_device *rmi_dev,
 	struct device *dev = &rmi_dev->dev;
 
 	mutex_lock(&data->irq_mutex);
+
+	/* Dummy read in order to clear irqs */
+	error = rmi_read_block(rmi_dev,
+			data->f01_container->fd.data_base_addr + 1,
+			data->irq_status, data->num_of_irq_regs);
+	if (error < 0) {
+		dev_err(dev, "%s: Failed to read interrupt status!",
+							__func__);
+		goto error_unlock;
+	}
+
 	bitmap_or(data->new_irq_mask,
 		  data->current_irq_mask, mask, data->irq_count);
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-11-19  6:06 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-20 16:41 [PATCH 1/2] Input: synaptics-rmi4 - clear irqs before set irqs Aaron Ma
2019-02-20 16:42 ` [PATCH 2/2] Input: synaptics-rmi4 - export nosleep of f01 via sysfs Aaron Ma
2019-06-09 16:53   ` Dmitry Torokhov
2019-03-08 23:13 ` [PATCH 1/2] Input: synaptics-rmi4 - clear irqs before set irqs Christopher Heiny
2019-03-09  8:37   ` Aaron Ma
2019-03-28  6:02     ` Aaron Ma
2019-04-02 16:16       ` Christopher Heiny
2019-04-03 13:58         ` Aaron Ma
2019-06-04  2:45           ` Aaron Ma
2019-06-04  5:19             ` Christopher Heiny
2019-06-07  7:48               ` Aaron Ma
2019-06-09 16:55 ` Dmitry Torokhov
2019-06-10 16:55   ` Aaron Ma
2019-06-11 17:35     ` Dmitry Torokhov
2019-06-14  4:26       ` Aaron Ma
2019-11-19  5:34         ` Kai-Heng Feng

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).