From patchwork Thu Apr 8 23:04:35 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?RGF2aWQgSMODwqRyZGVtYW4=?= X-Patchwork-Id: 91553 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o38N4kJf011453 for ; Thu, 8 Apr 2010 23:04:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933780Ab0DHXEl (ORCPT ); Thu, 8 Apr 2010 19:04:41 -0400 Received: from 1-1-12-13a.han.sth.bostream.se ([82.182.30.168]:45506 "EHLO palpatine.hardeman.nu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933787Ab0DHXEk (ORCPT ); Thu, 8 Apr 2010 19:04:40 -0400 Received: from basil.haag.hardeman.nu (host-88-217-225-61.customer.m-online.net [88.217.225.61]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "basil.haag.hardeman.nu", Issuer "hardeman.nu CA" (verified OK)) by palpatine.hardeman.nu (Postfix) with ESMTPSA id 50035151A; Fri, 9 Apr 2010 01:04:38 +0200 (CEST) Received: by basil.haag.hardeman.nu (Postfix, from userid 1000) id BEA631A00A5; Fri, 9 Apr 2010 01:04:35 +0200 (CEST) Subject: [PATCH 3/4] Add NECx support to ir-core To: mchehab@redhat.com From: David =?utf-8?b?SMOkcmRlbWFu?= Cc: linux-input@vger.kernel.org, linux-media@vger.kernel.org Date: Fri, 09 Apr 2010 01:04:35 +0200 Message-ID: <20100408230435.14453.56505.stgit@localhost.localdomain> In-Reply-To: <20100408230246.14453.97377.stgit@localhost.localdomain> References: <20100408230246.14453.97377.stgit@localhost.localdomain> User-Agent: StGit/0.15 MIME-Version: 1.0 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]); Thu, 08 Apr 2010 23:04:50 +0000 (UTC) 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; }