linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David Härdeman" <david@hardeman.nu>
To: mchehab@redhat.com
Cc: linux-input@vger.kernel.org, linux-media@vger.kernel.org
Subject: [PATCH 3/4] Add NECx support to ir-core
Date: Fri, 09 Apr 2010 01:04:35 +0200	[thread overview]
Message-ID: <20100408230435.14453.56505.stgit@localhost.localdomain> (raw)
In-Reply-To: <20100408230246.14453.97377.stgit@localhost.localdomain>

This patch adds NECx support to drivers/media/IR/ir-nec-decoder.c

Signed-off-by: David Härdeman <david@hardeman.nu>
---
 drivers/media/IR/ir-nec-decoder.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/media/IR/ir-nec-decoder.c b/drivers/media/IR/ir-nec-decoder.c
index f22d1af..d128c19 100644
--- a/drivers/media/IR/ir-nec-decoder.c
+++ b/drivers/media/IR/ir-nec-decoder.c
@@ -18,6 +18,7 @@
 #define NEC_NBITS		32
 #define NEC_UNIT		562500  /* ns */
 #define NEC_HEADER_PULSE	PULSE(16)
+#define NECX_HEADER_PULSE	PULSE(8) /* Less common NEC variant */
 #define NEC_HEADER_SPACE	SPACE(8)
 #define NEC_REPEAT_SPACE	SPACE(4)
 #define NEC_BIT_PULSE		PULSE(1)
@@ -152,7 +153,7 @@ static int ir_nec_decode(struct input_dev *input_dev, s64 duration)
 	switch (data->state) {
 
 	case STATE_INACTIVE:
-		if (u == NEC_HEADER_PULSE) {
+		if (u == NEC_HEADER_PULSE || u == NECX_HEADER_PULSE) {
 			data->count = 0;
 			data->state = STATE_HEADER_SPACE;
 		}

  parent reply	other threads:[~2010-04-08 23:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-08 23:04 [PATCH 0/4] ir-core: one-line bugfix, add RC5x, NECx, RC6 David Härdeman
2010-04-08 23:04 ` [PATCH 1/4] Fix the drivers/media/dvb/ttpci/budget-ci.c conversion to ir-core David Härdeman
2010-04-08 23:11   ` Mauro Carvalho Chehab
2010-04-08 23:04 ` [PATCH 2/4] Add RC5x support " David Härdeman
2010-04-08 23:04 ` David Härdeman [this message]
2010-04-08 23:04 ` [PATCH 4/4] Add RC6 " David Härdeman
2010-04-09  8:17   ` Andreas Oberritter
2010-04-09  8:31     ` David Härdeman
2010-04-09 12:43       ` Mauro Carvalho Chehab
2010-04-10  1:12   ` Andy Walls
2010-04-10 19:52     ` David Härdeman
2010-04-10 21:19       ` Andy Walls
2010-04-10 22:23     ` David Härdeman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100408230435.14453.56505.stgit@localhost.localdomain \
    --to=david@hardeman.nu \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).