From patchwork Fri Apr 30 12:23:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatolij Gustschin X-Patchwork-Id: 95989 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 o3UIh0tx031545 for ; Fri, 30 Apr 2010 18:43:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932613Ab0D3RUW (ORCPT ); Fri, 30 Apr 2010 13:20:22 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:40908 "EHLO mail-out.m-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758398Ab0D3RUR (ORCPT ); Fri, 30 Apr 2010 13:20:17 -0400 Received: from mail01.m-online.net (mail.m-online.net [192.168.3.149]) by mail-out.m-online.net (Postfix) with ESMTP id C3B511C00438; Fri, 30 Apr 2010 14:23:01 +0200 (CEST) X-Auth-Info: mDLwAqNKy1fNoeHzUwpRXc+KF8gAB2CT3lX6bz0p8aw= Received: from localhost (p578FAAA8.dip.t-dialin.net [87.143.170.168]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTP id 9916F902BB; Fri, 30 Apr 2010 14:23:01 +0200 (CEST) From: Anatolij Gustschin To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Detlev Zundel Subject: [PATCH 1/2] Input: ads7846 - allow specifying irq trigger type in platform data Date: Fri, 30 Apr 2010 14:23:00 +0200 Message-Id: <1272630181-5364-1-git-send-email-agust@denx.de> X-Mailer: git-send-email 1.6.3.3 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 Apr 2010 18:43:00 +0000 (UTC) diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 532279c..9cfc865 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -1174,7 +1174,10 @@ static int __devinit ads7846_probe(struct spi_device *spi) goto err_put_regulator; } - if (request_irq(spi->irq, ads7846_irq, IRQF_TRIGGER_FALLING, + if (!pdata->irq_trigger) + pdata->irq_trigger = IRQF_TRIGGER_FALLING; + + if (request_irq(spi->irq, ads7846_irq, pdata->irq_trigger, spi->dev.driver->name, ts)) { dev_info(&spi->dev, "trying pin change workaround on irq %d\n", spi->irq); diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h index b4ae570..32e34ba 100644 --- a/include/linux/spi/ads7846.h +++ b/include/linux/spi/ads7846.h @@ -54,5 +54,6 @@ struct ads7846_platform_data { void (*filter_cleanup)(void *filter_data); void (*wait_for_sync)(void); bool wakeup; + u8 irq_trigger; };