From patchwork Fri Jul 30 11:38:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Levitsky X-Patchwork-Id: 115475 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 o6UBdWxT029805 for ; Fri, 30 Jul 2010 11:39:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932125Ab0G3Ljb (ORCPT ); Fri, 30 Jul 2010 07:39:31 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:41194 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758505Ab0G3Lj0 (ORCPT ); Fri, 30 Jul 2010 07:39:26 -0400 Received: by mail-fx0-f46.google.com with SMTP id 14so798201fxm.19 for ; Fri, 30 Jul 2010 04:39:26 -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=uCmssmEU1vgo4i7NzHmBUbnC3MQchGX3+XB6JB3G+xGShS3nplJtUTFCQciWYVcm+U i1JHvhCVVIT83coU7gzSFmSSkt+HlHlLkTFiY1ZIN4zqtoxb9rVX15p5rCfa9/QW3rLx Q3zP85zjt7WOmCs0GJQonNgAkaJA06nh5iFUw= 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=Fbvl06K1OpxAg9hUjmUkUT7sjFBzBJL6TfStuZ2czt7jdjwneIB/0AB4Q2fuLZIOMn VWRCZBFfCi3vKFTfmaCVP8UlVVKD6kwy14fPinFdGKykRbnUI7BP7B1N9LTzSPAq4dlw yY9gWxLvOB6NQIHL18kwGO2HZ/EBKSBPP+X9s= Received: by 10.223.118.11 with SMTP id t11mr1869773faq.51.1280489966046; Fri, 30 Jul 2010 04:39:26 -0700 (PDT) Received: from localhost.localdomain (IGLD-84-228-19-51.inter.net.il [84.228.19.51]) by mx.google.com with ESMTPS id q17sm767482faa.21.2010.07.30.04.39.24 (version=SSLv3 cipher=RC4-MD5); Fri, 30 Jul 2010 04:39:25 -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: Fri, 30 Jul 2010 14:38:51 +0300 Message-Id: <1280489933-20865-12-git-send-email-maximlevitsky@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1280489933-20865-1-git-send-email-maximlevitsky@gmail.com> References: <1280489933-20865-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]); Fri, 30 Jul 2010 11:39:34 +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;