mfd: pcap: depend on arch-pxa
PATCH 1/1 mfd: pcap: depend on arch-pxa
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.
--- drivers/mfd/Kconfig | 2 +- drivers/mfd/ezx-pcap.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/mfd/Kconfig +1 -1
@@ -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..
drivers/mfd/ezx-pcap.c +2 -1
@@ -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)
Signature · 1 line
1.7.5.4
PATCH 1/1 mfd: pcap: depend on arch-pxa
Quoted 53 lines · Haojian Zhuang
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 1PCAP 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 usepxa_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 <[email protected]>---
?drivers/mfd/Kconfig ? ?| ? ?2 +-
?drivers/mfd/ezx-pcap.c | ? ?3 ++-
?2 files changed, 3 insertions(+), 2 deletions(-)drivers/mfd/Kconfig +0
-0@@ -619,7 +619,7 @@ config AB3100_OTP?config
EZX_PCAP
? ? ? ?bool "PCAP Support"
- ? ? ? depends onGENERIC_HARDIRQS&&SPI_MASTER
+ ? ? ? depends onGENERIC_HARDIRQS&&SPI_MASTER&&ARCH_PXA? ? ? ?help
? ? ? ? ?This enables the PCAP ASIC present on EZX Phones. This is ? ? ? ? ?needed for MMC, TouchScreen, Sound, USB, etc..drivers/mfd/ezx-pcap.c +0
-0@@ -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? ? ? ? ?8drivers/mfd/ezx-pcap.c +1
-2@@ -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) --
Quoted 2 lines
1.7.5.4
Hi Samuel,
How about this patch? Is it OK?
Best Regards
Haojian
PATCH 1/1 mfd: pcap: depend on arch-pxa
In reply to Haojian ZhuangHi Haojian,
Quoted 4 lines · Haojian Zhuang
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
You get that error once you replace irq_to_gpio() with pxa_irq_to_gpio().
Quoted 6 lines
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 usepxa_irq_to_gpio()instead.It's only a workaround for this issue. Acutally the best solution is using thread irq to fix this issue.
How would that fix the problem ? Defining irq_to_gpio for the PXA arch sounds like a better option. I don't particularily like this patch as it restricts the pcap driver quite a lot.
Would you be able to look at fixing the PXA gpio.h instead ?
Cheers,
Samuel.
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/