All of lore.kernel.org
 help / color / mirror / Atom feed
From: <michael.hennerich@analog.com>
To: dmitry.torokhov@gmail.com
Cc: linux-input@vger.kernel.org, jeff.dagenais@gmail.com,
	drivers@analog.com, device-drivers-devel@blackfin.uclinux.org,
	Michael Hennerich <michael.hennerich@analog.com>
Subject: [PATCH v2 4/6] input: misc: AD714x: Add option to specify irqflags
Date: Thu, 12 May 2011 10:45:09 +0200	[thread overview]
Message-ID: <1305189911-24769-4-git-send-email-michael.hennerich@analog.com> (raw)
In-Reply-To: <1305189911-24769-1-git-send-email-michael.hennerich@analog.com>

From: Michael Hennerich <michael.hennerich@analog.com>

Add option to specify irqflags.
Use IRQF_TRIGGER_LOW | IRQF_ONESHOT if not set otherwise.
Update copyright notice.

Changes since V1:
input: misc: AD714x: Revert to previous default irqflags

As per Dmitry's suggestion Rrevert to previous default irqflags

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
---
 drivers/input/misc/ad714x.c  |    4 +++-
 include/linux/input/ad714x.h |    3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/input/misc/ad714x.c b/drivers/input/misc/ad714x.c
index 438bf74..b4d95d5 100644
--- a/drivers/input/misc/ad714x.c
+++ b/drivers/input/misc/ad714x.c
@@ -1260,7 +1260,9 @@ struct ad714x_chip *ad714x_probe(struct device *dev, u16 bus_type, int irq,
 	}
 
 	error = request_threaded_irq(ad714x->irq, NULL, ad714x_interrupt_thread,
-			IRQF_TRIGGER_FALLING, "ad714x_captouch", ad714x);
+			plat_data->irqflags ? plat_data->irqflags :
+			IRQF_TRIGGER_FALLING,
+			"ad714x_captouch", ad714x);
 	if (error) {
 		dev_err(dev, "can't allocate irq %d\n", ad714x->irq);
 		goto err_unreg_dev;
diff --git a/include/linux/input/ad714x.h b/include/linux/input/ad714x.h
index 0cbe5e8..d388d85 100644
--- a/include/linux/input/ad714x.h
+++ b/include/linux/input/ad714x.h
@@ -6,7 +6,7 @@
  * The platform_data for the device's "struct device" holds this
  * information.
  *
- * Copyright 2009 Analog Devices Inc.
+ * Copyright 2009-2011 Analog Devices Inc.
  *
  * Licensed under the GPL-2 or later.
  */
@@ -58,6 +58,7 @@ struct ad714x_platform_data {
 	struct ad714x_button_plat *button;
 	unsigned short stage_cfg_reg[STAGE_NUM][STAGE_CFGREG_NUM];
 	unsigned short sys_cfg_reg[SYS_CFGREG_NUM];
+	unsigned long irqflags;
 };
 
 #endif
-- 
1.6.0.2



  parent reply	other threads:[~2011-05-12  8:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-12  8:45 [PATCH v2 1/6] input: misc: AD714x: The interrupt status registers should be read in row michael.hennerich
2011-05-12  8:45 ` [PATCH v2 2/6] input: misc: AD714x: Fix up input configuration michael.hennerich
2011-05-12  8:45 ` [PATCH v2 3/6] input: misc: AD714x: Fix thresh and completion interrupt mask and unmask functions michael.hennerich
2011-05-12  8:45 ` michael.hennerich [this message]
2011-05-12  8:45 ` [PATCH v2 5/6] input: misc: AD714x: Fix captouch wheel option algorithm michael.hennerich
2011-05-12  8:45 ` [PATCH v2 6/6] input: misc: AD714x: Fix endianness issues michael.hennerich
2011-05-17 11:01 ` [PATCH v2 1/6] input: misc: AD714x: The interrupt status registers should be read in row Hennerich, Michael
2011-05-18  7:14   ` Dmitry Torokhov
2011-05-18 19:10     ` Hennerich, Michael
2011-05-19  8:00       ` Dmitry Torokhov
2011-07-13 11:10         ` Hennerich, Michael
2011-08-03  8:40         ` Hennerich, Michael
2011-08-04  7:54           ` Dmitry Torokhov
2011-08-12  8:58             ` Michael Hennerich
2011-08-21 20:09               ` Dmitry Torokhov

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=1305189911-24769-4-git-send-email-michael.hennerich@analog.com \
    --to=michael.hennerich@analog.com \
    --cc=device-drivers-devel@blackfin.uclinux.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=drivers@analog.com \
    --cc=jeff.dagenais@gmail.com \
    --cc=linux-input@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.