From patchwork Tue Apr 6 18:18:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 90823 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 o36IIGYs007992 for ; Tue, 6 Apr 2010 18:18:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755395Ab0DFSSP (ORCPT ); Tue, 6 Apr 2010 14:18:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49929 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753146Ab0DFSSO (ORCPT ); Tue, 6 Apr 2010 14:18:14 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o36IIEvd022073 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 6 Apr 2010 14:18:14 -0400 Received: from pedra (vpn-8-182.rdu.redhat.com [10.11.8.182]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o36IIAEa021397 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 6 Apr 2010 14:18:12 -0400 Date: Tue, 6 Apr 2010 15:18:01 -0300 From: Mauro Carvalho Chehab To: linux-media@vger.kernel.org, Linux Media Mailing List Subject: [PATCH 13/26] V4L/DVB: saa7134: Add support for both positive and negative edge IRQ Message-ID: <20100406151801.642ec970@pedra> In-Reply-To: References: Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 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]); Tue, 06 Apr 2010 18:18:17 +0000 (UTC) diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index 0612fff..90f2318 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c @@ -701,10 +701,12 @@ static int saa7134_hw_enable2(struct saa7134_dev *dev) if (dev->has_remote == SAA7134_REMOTE_GPIO && dev->remote) { if (dev->remote->mask_keydown & 0x10000) irq2_mask |= SAA7134_IRQ2_INTE_GPIO16_N; - else if (dev->remote->mask_keydown & 0x40000) - irq2_mask |= SAA7134_IRQ2_INTE_GPIO18_P; - else if (dev->remote->mask_keyup & 0x40000) - irq2_mask |= SAA7134_IRQ2_INTE_GPIO18_N; + else { /* Allow enabling both IRQ edge triggers */ + if (dev->remote->mask_keydown & 0x40000) + irq2_mask |= SAA7134_IRQ2_INTE_GPIO18_P; + if (dev->remote->mask_keyup & 0x40000) + irq2_mask |= SAA7134_IRQ2_INTE_GPIO18_N; + } } if (dev->has_remote == SAA7134_REMOTE_I2C) {