From: Thomas Poussevin <thomas.poussevin@parrot.com>
To: linux-input@vger.kernel.org
Subject: Input sync flag when registering.
Date: Mon, 25 Aug 2014 10:52:51 +0200 [thread overview]
Message-ID: <53FAF963.9020403@parrot.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 606 bytes --]
Hi,
I noticed that with touchscreen drivers that don't explicitly call a
input_sync after input_register_device, suspend to ram is blocked if no
event is sent, because the input_dev created is considered as not
synchronized. The problem was seen with Atmel mxt driver. When any event
is sent, the driver explicitly ask a sync, so the problem is solved.
The problem occurs only when the screen has never send any event before
suspend to ram.
I solved it setting the sync element to true (when input dev is created,
no element is pending).
Is there a better way to solve the problem ?
Thanks.
Thomas.
[-- Attachment #2: 0001-DEV-input-Set-input-sync-param-default-status-to-tru.patch --]
[-- Type: text/x-patch, Size: 967 bytes --]
>From d0edf89b99de37e366d5ad1ab08e3c936ac553ae Mon Sep 17 00:00:00 2001
From: Thomas Poussevin <thomas.poussevin@parrot.com>
Date: Fri, 22 Aug 2014 17:56:17 +0200
Subject: [PATCH] [input] Set input sync param default status to true, to
prevent touchscreen suspend fails. Problems used to happen only when
touchsreen had not been touched since boot. When the first event is sent,
input status is actualized.
Signed-off-by: Thomas Poussevin <thomas.poussevin@parrot.com>
---
drivers/input/input.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 8921c61..c214b39 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -1652,6 +1652,7 @@ struct input_dev *input_allocate_device(void)
if (dev) {
dev->dev.type = &input_dev_type;
dev->dev.class = &input_class;
+ dev->sync = true;
device_initialize(&dev->dev);
mutex_init(&dev->mutex);
spin_lock_init(&dev->event_lock);
--
1.9.2
next reply other threads:[~2014-08-25 8:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-25 8:52 Thomas Poussevin [this message]
2014-08-25 18:19 ` Input sync flag when registering Dmitry Torokhov
2014-08-27 9:12 ` Thomas Poussevin
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=53FAF963.9020403@parrot.com \
--to=thomas.poussevin@parrot.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).