All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Henrik Rydberg" <rydberg@euromail.se>
To: Jiri Kosina <jkosina@suse.cz>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Stephane Chatty <chatty@enac.fr>,
	Henrik Rydberg <rydberg@euromail.se>
Subject: [PATCH] hid: Add a hid quirk for input sync override
Date: Tue, 24 Aug 2010 10:54:44 +0200	[thread overview]
Message-ID: <1282640084-19217-1-git-send-email-rydberg@euromail.se> (raw)

From: Henrik Rydberg <rydberg@thabit.(none)>

As of lately, HID devices which send per-frame data split over several
HID reports have started to emerge. This patch adds a quirk which
allows the HID driver to take over the input layer synchronization,
and hence the control of the frame boundary.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
---
Jiri, Dmitry, Stephane,

No doubt, this is not a final solution, but it serves the purpose of
being able to make existing drivers functional while a satisfactory
solution is being worked out.

Cheers,
Henrik

 drivers/hid/hid-input.c |    3 +++
 include/linux/hid.h     |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 69d152e..9d97934 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -656,6 +656,9 @@ void hidinput_report_event(struct hid_device *hid, struct hid_report *report)
 {
 	struct hid_input *hidinput;
 
+	if (hid->quirks & HID_QUIRK_NO_INPUT_SYNC)
+		return;
+
 	list_for_each_entry(hidinput, &hid->inputs, list)
 		input_sync(hidinput->input);
 }
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 895001f..8029883 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -315,6 +315,7 @@ struct hid_item {
 #define HID_QUIRK_FULLSPEED_INTERVAL		0x10000000
 #define HID_QUIRK_NO_INIT_REPORTS		0x20000000
 #define HID_QUIRK_NO_IGNORE			0x40000000
+#define HID_QUIRK_NO_INPUT_SYNC			0x80000000
 
 /*
  * This is the global environment of the parser. This information is
-- 
1.7.1


             reply	other threads:[~2010-08-24  8:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-24  8:54 Henrik Rydberg [this message]
2010-09-01 10:54 ` [PATCH] hid: Add a hid quirk for input sync override Jiri Kosina
2010-09-01 11:32   ` Henrik Rydberg
2010-09-02 10:42     ` Stéphane Chatty
2010-09-02 10:42       ` Stéphane Chatty
2010-09-02 14:30     ` Jiri Kosina
2010-09-17 16:20       ` Stéphane Chatty
2010-09-17 16:49         ` Henrik Rydberg
2010-09-17 16:49           ` Henrik Rydberg
2010-09-21 14:12 ` Jiri Kosina

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=1282640084-19217-1-git-send-email-rydberg@euromail.se \
    --to=rydberg@euromail.se \
    --cc=chatty@enac.fr \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.