From patchwork Sat Jul 31 14:59:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Levitsky X-Patchwork-Id: 116185 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6VFfh3m024126 for ; Sat, 31 Jul 2010 15:42:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756222Ab0GaO77 (ORCPT ); Sat, 31 Jul 2010 10:59:59 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:55010 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756196Ab0GaO74 (ORCPT ); Sat, 31 Jul 2010 10:59:56 -0400 Received: by mail-bw0-f46.google.com with SMTP id 1so870874bwz.19 for ; Sat, 31 Jul 2010 07:59:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=rkafwMCbp0IbEmJoNDwM6hHe41gHC79z2owhg8a2+es=; b=ldsoQdMTNYZvAKZu8iZUNFU+5npBO8Lq+4vMUMSWyv02vQ5oKI9exTEV/6W/0rKTJR IOPbG7uFMLhGIjDG180LQV0UMg2N3OoEtShoJag0FOQG87wr/YtLx1TnxyB+XnOV3M9e yEzCXCvAndZyvT2OLJECSTof0Hm/DHw38sORk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=isqEfXmakPzuSIqrQtaIHsONXdSmgLvROL9JgGIymrpFxS+AhxJFf1iLsR8NHH1iC5 pXtR2xM5OC7n1yjZCV/Khpy1jbfrfOgjwAHwX9mtEM7TPJwg+wxZx9TUSPd84d+nbgbT 2n2QYsmmcs6BKG/pdlzw/bW0cOjnQPyNjEi20= Received: by 10.204.175.1 with SMTP id v1mr2245475bkz.140.1280588395805; Sat, 31 Jul 2010 07:59:55 -0700 (PDT) Received: from localhost.localdomain (IGLD-84-228-252-15.inter.net.il [84.228.252.15]) by mx.google.com with ESMTPS id a9sm2445428bky.23.2010.07.31.07.59.54 (version=SSLv3 cipher=RC4-MD5); Sat, 31 Jul 2010 07:59:55 -0700 (PDT) From: Maxim Levitsky To: lirc-list@lists.sourceforge.net Cc: Jarod Wilson , linux-input@vger.kernel.org, linux-media@vger.kernel.org, Mauro Carvalho Chehab , Christoph Bartelmus , Maxim Levitsky Subject: [PATCH 11/13] IR: report unknown scancodes the in-kernel decoders found. Date: Sat, 31 Jul 2010 17:59:24 +0300 Message-Id: <1280588366-26101-12-git-send-email-maximlevitsky@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1280588366-26101-1-git-send-email-maximlevitsky@gmail.com> References: <1280588366-26101-1-git-send-email-maximlevitsky@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 31 Jul 2010 15:43:10 +0000 (UTC) diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c index 34b9c07..ba7678a 100644 --- a/drivers/media/IR/ir-keytable.c +++ b/drivers/media/IR/ir-keytable.c @@ -339,6 +339,8 @@ void ir_repeat(struct input_dev *dev) spin_lock_irqsave(&ir->keylock, flags); + input_event(dev, EV_MSC, MSC_SCAN, ir->last_scancode); + if (!ir->keypressed) goto out; @@ -370,6 +372,8 @@ void ir_keydown(struct input_dev *dev, int scancode, u8 toggle) spin_lock_irqsave(&ir->keylock, flags); + input_event(dev, EV_MSC, MSC_SCAN, scancode); + /* Repeat event? */ if (ir->keypressed && ir->last_scancode == scancode && @@ -383,9 +387,11 @@ void ir_keydown(struct input_dev *dev, int scancode, u8 toggle) ir->last_toggle = toggle; ir->last_keycode = keycode; + if (keycode == KEY_RESERVED) goto out; + /* Register a keypress */ ir->keypressed = true; IR_dprintk(1, "%s: key down event, key 0x%04x, scancode 0x%04x\n", @@ -480,6 +486,8 @@ int __ir_input_register(struct input_dev *input_dev, set_bit(EV_KEY, input_dev->evbit); set_bit(EV_REP, input_dev->evbit); + set_bit(EV_MSC, input_dev->evbit); + set_bit(MSC_SCAN, input_dev->mscbit); if (ir_setkeytable(input_dev, &ir_dev->rc_tab, rc_tab)) { rc = -ENOMEM;