From patchwork Tue Aug 24 14:19:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henrik Rydberg X-Patchwork-Id: 62596 X-Patchwork-Delegate: leann.ogasawara@canonical.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 65978B70CE for ; Wed, 25 Aug 2010 00:20:00 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1OnuLw-0002PR-Px; Tue, 24 Aug 2010 15:19:52 +0100 Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]) by chlorine.canonical.com with esmtp (Exim 4.69) (envelope-from ) id 1OnuLu-0002P9-AE for kernel-team@lists.ubuntu.com; Tue, 24 Aug 2010 15:19:50 +0100 Received: from c83-248-196-134.bredband.comhem.se ([83.248.196.134]:54927 helo=alnilam) by ch-smtp01.sth.basefarm.net with smtp (Exim 4.71) (envelope-from ) id 1OnuLd-0001cv-61; Tue, 24 Aug 2010 16:19:37 +0200 Received: by alnilam (sSMTP sendmail emulation); Tue, 24 Aug 2010 16:19:33 +0200 From: "Henrik Rydberg" To: kernel-team@lists.ubuntu.com Subject: [PATCH] hid: Add a hid quirk for input sync override Date: Tue, 24 Aug 2010 16:19:29 +0200 Message-Id: <1282659569-10373-1-git-send-email-rydberg@euromail.se> X-Mailer: git-send-email 1.7.1 X-Originating-IP: 83.248.196.134 X-Scan-Result: No virus found in message 1OnuLd-0001cv-61. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1OnuLd-0001cv-61 3300981b0c8bf824aa68d4f2b2308009 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com 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 --- Ten days ago, there were reports on linux-input about broken Multitouch HID drivers (egalax, 3m-pct) for new devices, including the Joojoo. It turns out these are due to a new HID extension, pushed by a large software company, which sends per-frame data in sequence. I propose carrying the above patch for Maverick, to enable the process of analyzing and fixing those drivers using dkms during the beta cycle. I do not yet know what will happen upstream. 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