From d9dc878769f521f494d1617d7cd0c92073df75d8 Mon Sep 17 00:00:00 2001 From: Russell King Date: Mon, 19 Dec 2011 22:00:22 +0000 Subject: PCMCIA: soc_common: add GPIO support for card status signals Add GPIO support for reading the card status (card detect, ready, battery voltage detect) signals into soc_common code. As we want interrupts from these GPIOs, this takes over the old irq handling infrastructure for card status signals, which will now be managed entirely by the soc_common code. Acked-by: Dominik Brodowski Signed-off-by: Russell King --- drivers/pcmcia/soc_common.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/pcmcia/soc_common.h') diff --git a/drivers/pcmcia/soc_common.h b/drivers/pcmcia/soc_common.h index 3ff7ead11b1d..ebdfa6c16308 100644 --- a/drivers/pcmcia/soc_common.h +++ b/drivers/pcmcia/soc_common.h @@ -50,6 +50,16 @@ struct soc_pcmcia_socket { struct resource res_attr; void __iomem *virt_io; + struct { + int gpio; + unsigned int irq; + const char *name; + } stat[4]; +#define SOC_STAT_CD 0 /* Card detect */ +#define SOC_STAT_BVD1 1 /* BATDEAD / IOSTSCHG */ +#define SOC_STAT_BVD2 2 /* BATWARN / IOSPKR */ +#define SOC_STAT_RDY 3 /* Ready / Interrupt */ + unsigned int irq_state; struct timer_list poll_timer; -- cgit v1.2.3