diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-13 17:56:32 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-02-04 09:32:22 -0500 |
commit | a9bb5a4bf9f84256499c802fd397d56d55227e4f (patch) | |
tree | 793a74bebd0ed3f254035cb14caa093f58bb8bf6 /drivers/pcmcia/pxa2xx_balloon3.c | |
parent | d9dc878769f521f494d1617d7cd0c92073df75d8 (diff) |
PCMCIA: pxa: convert PXA socket drivers to use new irq/gpio management
Convert all the PXA platform socket drivers to use the new irq/gpio
management provided by soc_common. This relieves these drivers from
having to do anything with these GPIOs other than provide the numbers
to soc_common.
Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/pcmcia/pxa2xx_balloon3.c')
-rw-r--r-- | drivers/pcmcia/pxa2xx_balloon3.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/drivers/pcmcia/pxa2xx_balloon3.c b/drivers/pcmcia/pxa2xx_balloon3.c index 22a75e610f12..12e38b497719 100644 --- a/drivers/pcmcia/pxa2xx_balloon3.c +++ b/drivers/pcmcia/pxa2xx_balloon3.c | |||
@@ -29,15 +29,6 @@ | |||
29 | 29 | ||
30 | #include "soc_common.h" | 30 | #include "soc_common.h" |
31 | 31 | ||
32 | /* | ||
33 | * These are a list of interrupt sources that provokes a polled | ||
34 | * check of status | ||
35 | */ | ||
36 | static struct pcmcia_irqs irqs[] = { | ||
37 | { 0, BALLOON3_S0_CD_IRQ, "PCMCIA0 CD" }, | ||
38 | { 0, BALLOON3_BP_NSTSCHG_IRQ, "PCMCIA0 STSCHG" }, | ||
39 | }; | ||
40 | |||
41 | static int balloon3_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | 32 | static int balloon3_pcmcia_hw_init(struct soc_pcmcia_socket *skt) |
42 | { | 33 | { |
43 | uint16_t ver; | 34 | uint16_t ver; |
@@ -49,12 +40,12 @@ static int balloon3_pcmcia_hw_init(struct soc_pcmcia_socket *skt) | |||
49 | ver); | 40 | ver); |
50 | 41 | ||
51 | skt->socket.pci_irq = BALLOON3_BP_CF_NRDY_IRQ; | 42 | skt->socket.pci_irq = BALLOON3_BP_CF_NRDY_IRQ; |
52 | return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); | 43 | skt->stat[SOC_STAT_CD].gpio = BALLOON3_GPIO_S0_CD; |
53 | } | 44 | skt->stat[SOC_STAT_CD].name = "PCMCIA0 CD"; |
45 | skt->stat[SOC_STAT_BVD1].irq = BALLOON3_BP_NSTSCHG_IRQ; | ||
46 | skt->stat[SOC_STAT_BVD1].name = "PCMCIA0 STSCHG"; | ||
54 | 47 | ||
55 | static void balloon3_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt) | 48 | return 0; |
56 | { | ||
57 | soc_pcmcia_free_irqs(skt, irqs, ARRAY_SIZE(irqs)); | ||
58 | } | 49 | } |
59 | 50 | ||
60 | static unsigned long balloon3_pcmcia_status[2] = { | 51 | static unsigned long balloon3_pcmcia_status[2] = { |
@@ -85,7 +76,6 @@ static void balloon3_pcmcia_socket_state(struct soc_pcmcia_socket *skt, | |||
85 | disable_irq(BALLOON3_BP_NSTSCHG_IRQ); | 76 | disable_irq(BALLOON3_BP_NSTSCHG_IRQ); |
86 | } | 77 | } |
87 | 78 | ||
88 | state->detect = !gpio_get_value(BALLOON3_GPIO_S0_CD); | ||
89 | state->ready = !!(status & BALLOON3_CF_nIRQ); | 79 | state->ready = !!(status & BALLOON3_CF_nIRQ); |
90 | state->bvd1 = !!(status & BALLOON3_CF_nSTSCHG_BVD1); | 80 | state->bvd1 = !!(status & BALLOON3_CF_nSTSCHG_BVD1); |
91 | state->bvd2 = 0; /* not available */ | 81 | state->bvd2 = 0; /* not available */ |
@@ -106,7 +96,6 @@ static int balloon3_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, | |||
106 | static struct pcmcia_low_level balloon3_pcmcia_ops = { | 96 | static struct pcmcia_low_level balloon3_pcmcia_ops = { |
107 | .owner = THIS_MODULE, | 97 | .owner = THIS_MODULE, |
108 | .hw_init = balloon3_pcmcia_hw_init, | 98 | .hw_init = balloon3_pcmcia_hw_init, |
109 | .hw_shutdown = balloon3_pcmcia_hw_shutdown, | ||
110 | .socket_state = balloon3_pcmcia_socket_state, | 99 | .socket_state = balloon3_pcmcia_socket_state, |
111 | .configure_socket = balloon3_pcmcia_configure_socket, | 100 | .configure_socket = balloon3_pcmcia_configure_socket, |
112 | .first = 0, | 101 | .first = 0, |