mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Felipe F. Tonello" <eu@felipetonello.com>
To: linux-input@vger.kernel.org
Cc: "Felipe F. Tonello" <eu@felipetonello.com>,
	linux-kernel@vger.kernel.org,
	Henrik Rydberg <rydberg@euromail.se>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: [PATCH 2/2] input: egalax: report end state in suspend callback
Date: Mon, 30 Dec 2013 18:06:41 -0800	[thread overview]
Message-ID: <1388455601-17033-3-git-send-email-eu@felipetonello.com> (raw)
In-Reply-To: <1388455601-17033-1-git-send-email-eu@felipetonello.com>

From: "Felipe F. Tonello" <eu@felipetonello.com>

Make sure user-space will receive the touch end event even if the device
driver suspends while touchscreen is still active (with fingers touching it).

Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
---
 drivers/input/touchscreen/egalax_ts.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/input/touchscreen/egalax_ts.c b/drivers/input/touchscreen/egalax_ts.c
index 054d225..9cf4cdb 100644
--- a/drivers/input/touchscreen/egalax_ts.c
+++ b/drivers/input/touchscreen/egalax_ts.c
@@ -247,8 +247,13 @@ static int egalax_ts_suspend(struct device *dev)
 		0x3, 0x6, 0xa, 0x3, 0x36, 0x3f, 0x2, 0, 0, 0
 	};
 	struct i2c_client *client = to_i2c_client(dev);
+	struct egalax_ts *ts = i2c_get_clientdata(client);
 	int ret;
 
+	input_mt_report_end_state(ts->input_dev);
+	input_mt_report_pointer_emulation(ts->input_dev, true);
+	input_sync(ts->input_dev);
+
 	ret = i2c_master_send(client, suspend_cmd, MAX_I2C_DATA_LEN);
 	return ret > 0 ? 0 : ret;
 }
-- 
1.8.3.1


  parent reply	other threads:[~2013-12-31  2:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-31  2:06 [PATCH 0/2] input: mt: Add helper function to send end events Felipe F. Tonello
2013-12-31  2:06 ` [PATCH 1/2] " Felipe F. Tonello
2013-12-31  2:06 ` Felipe F. Tonello [this message]
2013-12-31  9:26 ` [PATCH 0/2] " Henrik Rydberg
2013-12-31 18:50   ` Dmitry Torokhov
2014-01-01 16:19     ` Henrik Rydberg
2014-01-01 19:18       ` Dmitry Torokhov
2014-01-02 23:20         ` Felipe Ferreri Tonello

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=1388455601-17033-3-git-send-email-eu@felipetonello.com \
    --to=eu@felipetonello.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rydberg@euromail.se \
    /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

all inboxes | Powered by JetHome®