mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: arm@kernel.org, linux-kernel@vger.kernel.org,
	Arnd Bergmann <arnd@arndb.de>, stable@vger.kernel.org (v3.2+),
	Daniel Mack <zonque@gmail.com>,
	Haojian Zhuang <haojian.zhuang@gmail.com>
Subject: [PATCH 2/6] ARM: pxa remove irq_to_gpio from eeti_ts driver
Date: Wed,  8 Aug 2012 14:54:49 +0200	[thread overview]
Message-ID: <1344430493-5304-3-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1344430493-5304-1-git-send-email-arnd@arndb.de>

The irq_to_gpio function was removed from the pxa platform
in linux-3.2, and this driver has been broken since.

Without this patch, building raumfeld_defconfig results in:

drivers/input/touchscreen/eeti_ts.c: In function 'eeti_ts_irq_active':
drivers/input/touchscreen/eeti_ts.c:65:2: error: implicit declaration of function 'irq_to_gpio' [-Werror=implicit-function-declaration]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: stable@vger.kernel.org (v3.2+)
Cc: Daniel Mack <zonque@gmail.com>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
---
 arch/arm/mach-pxa/raumfeld.c        |    1 +
 drivers/input/touchscreen/eeti_ts.c |    8 +++++---
 include/linux/input/eeti_ts.h       |    1 +
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 5905ed1..9e1c4ea 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -953,6 +953,7 @@ static struct i2c_board_info raumfeld_connector_i2c_board_info __initdata = {
 
 static struct eeti_ts_platform_data eeti_ts_pdata = {
 	.irq_active_high = 1,
+	.gpio = GPIO_TOUCH_IRQ,
 };
 
 static struct i2c_board_info raumfeld_controller_i2c_board_info __initdata = {
diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c
index 503c709..45dab18 100644
--- a/drivers/input/touchscreen/eeti_ts.c
+++ b/drivers/input/touchscreen/eeti_ts.c
@@ -48,7 +48,7 @@ struct eeti_ts_priv {
 	struct input_dev *input;
 	struct work_struct work;
 	struct mutex mutex;
-	int irq, irq_active_high;
+	int irq, gpio, irq_active_high;
 };
 
 #define EETI_TS_BITDEPTH	(11)
@@ -62,7 +62,7 @@ struct eeti_ts_priv {
 
 static inline int eeti_ts_irq_active(struct eeti_ts_priv *priv)
 {
-	return gpio_get_value(irq_to_gpio(priv->irq)) == priv->irq_active_high;
+	return gpio_get_value(priv->gpio) == priv->irq_active_high;
 }
 
 static void eeti_ts_read(struct work_struct *work)
@@ -203,8 +203,10 @@ static int __devinit eeti_ts_probe(struct i2c_client *client,
 
 	pdata = client->dev.platform_data;
 
-	if (pdata)
+	if (pdata) {
+		priv->gpio = pdata->gpio;
 		priv->irq_active_high = pdata->irq_active_high;
+	}
 
 	irq_flags = priv->irq_active_high ?
 		IRQF_TRIGGER_RISING : IRQF_TRIGGER_FALLING;
diff --git a/include/linux/input/eeti_ts.h b/include/linux/input/eeti_ts.h
index f875b31..3404504 100644
--- a/include/linux/input/eeti_ts.h
+++ b/include/linux/input/eeti_ts.h
@@ -3,6 +3,7 @@
 
 struct eeti_ts_platform_data {
 	unsigned int irq_active_high;
+	unsigned int gpio;
 };
 
 #endif /* LINUX_INPUT_EETI_TS_H */
-- 
1.7.10


  parent reply	other threads:[~2012-08-08 12:56 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-08 12:54 [PATCH 0/6] ARM: defconfig build errors Arnd Bergmann
2012-08-08 12:54 ` [PATCH 1/6] ARM: pxa: remove irq_to_gpio from ezx-pcap driver Arnd Bergmann
2012-08-08 15:27   ` Haojian Zhuang
2012-08-08 12:54 ` Arnd Bergmann [this message]
2012-08-08 13:23   ` [PATCH 2/6] ARM: pxa remove irq_to_gpio from eeti_ts driver Daniel Mack
2012-08-08 14:19     ` Arnd Bergmann
2012-08-08 14:22       ` Daniel Mack
2012-08-08 14:38         ` Arnd Bergmann
2012-08-08 15:24   ` Haojian Zhuang
2012-08-08 12:54 ` [PATCH 3/6] ARM: sa1100: include asm/io.h in hackkit leds code Arnd Bergmann
2012-08-08 15:36   ` Russell King - ARM Linux
2012-08-08 17:17     ` Arnd Bergmann
2012-08-08 12:54 ` [PATCH 4/6] ARM: s3c24xx: use new PWM driver Arnd Bergmann
2012-08-08 13:10   ` Kukjin Kim
2012-08-08 14:34     ` Arnd Bergmann
2012-08-09  5:31       ` Kukjin Kim
2012-08-08 12:54 ` [PATCH 5/6] ARM: integrator: include <linux/export.h Arnd Bergmann
2012-08-08 13:24   ` Linus Walleij
2012-08-08 14:01     ` Arnd Bergmann
2012-08-08 12:54 ` [PATCH 6/6] ARM: imx: gpmi-nand depends on mxs-dma Arnd Bergmann
2012-08-08 13:00   ` Dirk Behme
2012-08-08 13:01   ` Fabio Estevam
2012-08-08 13:05     ` Dirk Behme
2012-08-08 13:18       ` Fabio Estevam
2012-08-13 10:22         ` Artem Bityutskiy

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=1344430493-5304-3-git-send-email-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=arm@kernel.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=zonque@gmail.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

all inboxes | Powered by JetHome®