From patchwork Thu Nov 21 11:04:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Henriques X-Patchwork-Id: 293079 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 52EEF2C010A for ; Thu, 21 Nov 2013 22:04:34 +1100 (EST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1VjS3f-0005QN-Ki; Thu, 21 Nov 2013 11:04:27 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1VjS3Y-0005Po-BE for kernel-team@lists.ubuntu.com; Thu, 21 Nov 2013 11:04:20 +0000 Received: from bl22-241-75.dsl.telepac.pt ([2.83.241.75] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1VjS3X-0004w9-Ut for kernel-team@lists.ubuntu.com; Thu, 21 Nov 2013 11:04:20 +0000 From: Luis Henriques To: kernel-team@lists.ubuntu.com Subject: [Saucy][SRU][PATCH 1/1] (upstream) HID: appleir: force input to be set Date: Thu, 21 Nov 2013 11:04:17 +0000 Message-Id: <1385031857-13351-2-git-send-email-luis.henriques@canonical.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1385031857-13351-1-git-send-email-luis.henriques@canonical.com> References: <1385031857-13351-1-git-send-email-luis.henriques@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com From: Benjamin Tissoires BugLink: http://launchpad.net/bugs/1244505 Some weird remotes are not correctly creating the input device. Their report descriptor starts with: 0x06, 0x00, 0xff, // Usage Page (Vendor Defined Page 1) 0 0xa1, 0x01, // Collection (Application) 3 whereas others (which are correctly handled) start with: 0x05, 0x0c, // Usage Page (Consumer Devices) 0 0x09, 0x01, // Usage (Consumer Control) 2 0xa1, 0x01, // Collection (Application) 4 The rest of the report descriptor is the same. Adding the quirk HID_QUIRK_HIDINPUT_FORCE forces hid-input to allocate the inputs, and everything should be ok. Signed-off-by: Benjamin Tissoires Tested-by: James Henstridge Signed-off-by: Jiri Kosina (cherry picked from 3d18bd41a82fac69c82e1725c7beea25b17a0190 in git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git) Signed-off-by: Luis Henriques Acked-by: Andy Whitcroft --- drivers/hid/hid-appleir.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hid/hid-appleir.c b/drivers/hid/hid-appleir.c index a42e6a3..0e6a42d 100644 --- a/drivers/hid/hid-appleir.c +++ b/drivers/hid/hid-appleir.c @@ -297,6 +297,9 @@ static int appleir_probe(struct hid_device *hid, const struct hid_device_id *id) appleir->hid = hid; + /* force input as some remotes bypass the input registration */ + hid->quirks |= HID_QUIRK_HIDINPUT_FORCE; + spin_lock_init(&appleir->lock); setup_timer(&appleir->key_up_timer, key_up_tick, (unsigned long) appleir);