From patchwork Wed Jul 28 23:40:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Levitsky X-Patchwork-Id: 114953 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 o6SNfMPq007053 for ; Wed, 28 Jul 2010 23:41:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755889Ab0G1XlW (ORCPT ); Wed, 28 Jul 2010 19:41:22 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:42214 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754252Ab0G1XlM (ORCPT ); Wed, 28 Jul 2010 19:41:12 -0400 Received: by mail-bw0-f46.google.com with SMTP id 1so18045bwz.19 for ; Wed, 28 Jul 2010 16:41:11 -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=r4DkOKqpxlz+4xRcvE2e4COVnEumR3DMFmH8ZQwBGkc=; b=PK9dsJQfGRjp7Dy/e6W9WAKS51UeB43ft4eQgHjNio/2Uen6LpehsRV8Ya0rz5tcHP e3JwyThKsDsMimPhcB/pcS3bMa7McFBE7iVuh/1MkmRsDnKPZVGpty8gMSseOXFl3Ptr i09+Y5JnIxK+Jgfn6YBysaoX7xviE2v2oIRcc= 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=W0SF3KRfWGzsRoCQQ+oh8/vmTTlJZ0mjGIjWVe8Gc8QI3IJxu+wxfFtVr5R+arMF1k uriO3/HfRYRbnagA0ExPaxiCShoOeJOiVSPPgMgpMFBbIPzNZDe7Yly6gkV35y9UlNAj 8WvYw/Ln6EMd78h4yiKsr508Knj59siDlIbNk= Received: by 10.204.15.148 with SMTP id k20mr8508985bka.74.1280360471296; Wed, 28 Jul 2010 16:41:11 -0700 (PDT) Received: from localhost.localdomain (IGLD-84-229-112-176.inter.net.il [84.229.112.176]) by mx.google.com with ESMTPS id bq20sm104935bkb.16.2010.07.28.16.41.09 (version=SSLv3 cipher=RC4-MD5); Wed, 28 Jul 2010 16:41:10 -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 7/9] IR: report unknown scancodes the in-kernel decoders found. Date: Thu, 29 Jul 2010 02:40:50 +0300 Message-Id: <1280360452-8852-8-git-send-email-maximlevitsky@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1280360452-8852-1-git-send-email-maximlevitsky@gmail.com> References: <1280360452-8852-1-git-send-email-maximlevitsky@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@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]); Wed, 28 Jul 2010 23:41:27 +0000 (UTC) diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c index 34b9c07..4498c64 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; @@ -383,9 +385,12 @@ void ir_keydown(struct input_dev *dev, int scancode, u8 toggle) ir->last_toggle = toggle; ir->last_keycode = keycode; + input_event(dev, EV_MSC, MSC_SCAN, scancode); + 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 +485,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;