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 <linux@dominikbrodowski.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
Russell King
2011-12-19 22:00:22 +00:00
parent e0d21178ce
commit d9dc878769
2 changed files with 127 additions and 3 deletions

View File

@@ -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;