linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: haojian.zhuang@gmail.com (Haojian Zhuang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] mfd: pcap: depend on arch-pxa
Date: Tue,  6 Mar 2012 13:30:08 +0800	[thread overview]
Message-ID: <1331011808-28307-1-git-send-email-haojian.zhuang@gmail.com> (raw)

drivers/mfd/ezx-pcap.c: In function ?pcap_isr_work?:
drivers/mfd/ezx-pcap.c:206:2: error: implicit declaration of function
?pxa_irq_to_gpio?
make[2]: *** [drivers/mfd/ezx-pcap.o] Error 1

PCAP driver invokes irq_to_gpio() directly. This function isn't common
function in most silicons. PCAP driver is enabled for EZX machine with
arch-pxa. Now use pxa_irq_to_gpio() instead.

It's only a workaround for this issue. Acutally the best solution is
using thread irq to fix this issue.

Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
---
 drivers/mfd/Kconfig    |    2 +-
 drivers/mfd/ezx-pcap.c |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index f147395..e88d315 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -619,7 +619,7 @@ config AB3100_OTP
 
 config EZX_PCAP
 	bool "PCAP Support"
-	depends on GENERIC_HARDIRQS && SPI_MASTER
+	depends on GENERIC_HARDIRQS && SPI_MASTER && ARCH_PXA
 	help
 	  This enables the PCAP ASIC present on EZX Phones. This is
 	  needed for MMC, TouchScreen, Sound, USB, etc..
diff --git a/drivers/mfd/ezx-pcap.c b/drivers/mfd/ezx-pcap.c
index 43a76c4..e9320e2 100644
--- a/drivers/mfd/ezx-pcap.c
+++ b/drivers/mfd/ezx-pcap.c
@@ -18,6 +18,7 @@
 #include <linux/mfd/ezx-pcap.h>
 #include <linux/spi/spi.h>
 #include <linux/gpio.h>
+#include <linux/gpio-pxa.h>
 #include <linux/slab.h>
 
 #define PCAP_ADC_MAXQ		8
@@ -202,7 +203,7 @@ static void pcap_isr_work(struct work_struct *work)
 		}
 		local_irq_enable();
 		ezx_pcap_write(pcap, PCAP_REG_MSR, pcap->msr);
-	} while (gpio_get_value(irq_to_gpio(pcap->spi->irq)));
+	} while (gpio_get_value(pxa_irq_to_gpio(pcap->spi->irq)));
 }
 
 static void pcap_irq_handler(unsigned int irq, struct irq_desc *desc)
-- 
1.7.5.4

             reply	other threads:[~2012-03-06  5:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-06  5:30 Haojian Zhuang [this message]
2012-03-14 14:32 ` [PATCH] mfd: pcap: depend on arch-pxa Haojian Zhuang
2012-03-16 17:14 ` Samuel Ortiz

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=1331011808-28307-1-git-send-email-haojian.zhuang@gmail.com \
    --to=haojian.zhuang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).