aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-12-28 05:27:16 -0500
committerArnd Bergmann <arnd@arndb.de>2011-12-28 05:27:16 -0500
commitd7bd1b8a6104bcdc53611689fec8715a236a22c8 (patch)
treeab13f2a62b39099f7c366cdcf1980ea9ee1348e1
parenta46117836e23f97cf4660b0ebf8404ad151fb63d (diff)
parentb5d798cc7a221aec50baf496c482280f1b809143 (diff)
Merge branch 'drivers/pxa-gpio' into next/drivers
* drivers/pxa-gpio: Input: zylonite-wm97xx - replace IRQ_GPIO() with gpio_to_irq() pcmcia: pxa: replace IRQ_GPIO() with gpio_to_irq()
-rw-r--r--drivers/input/touchscreen/zylonite-wm97xx.c5
-rw-r--r--drivers/pcmcia/pxa2xx_e740.c11
-rw-r--r--drivers/pcmcia/pxa2xx_palmld.c2
-rw-r--r--drivers/pcmcia/pxa2xx_palmtc.c2
-rw-r--r--drivers/pcmcia/pxa2xx_stargate2.c6
-rw-r--r--drivers/pcmcia/pxa2xx_trizeps4.c5
-rw-r--r--drivers/pcmcia/pxa2xx_vpac270.c4
7 files changed, 21 insertions, 14 deletions
diff --git a/drivers/input/touchscreen/zylonite-wm97xx.c b/drivers/input/touchscreen/zylonite-wm97xx.c
index f6328c0cded..0a707bbbbea 100644
--- a/drivers/input/touchscreen/zylonite-wm97xx.c
+++ b/drivers/input/touchscreen/zylonite-wm97xx.c
@@ -22,6 +22,7 @@
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/init.h> 23#include <linux/init.h>
24#include <linux/delay.h> 24#include <linux/delay.h>
25#include <linux/gpio.h>
25#include <linux/irq.h> 26#include <linux/irq.h>
26#include <linux/interrupt.h> 27#include <linux/interrupt.h>
27#include <linux/io.h> 28#include <linux/io.h>
@@ -192,8 +193,8 @@ static int zylonite_wm97xx_probe(struct platform_device *pdev)
192 else 193 else
193 gpio_touch_irq = mfp_to_gpio(MFP_PIN_GPIO26); 194 gpio_touch_irq = mfp_to_gpio(MFP_PIN_GPIO26);
194 195
195 wm->pen_irq = IRQ_GPIO(gpio_touch_irq); 196 wm->pen_irq = gpio_to_irq(gpio_touch_irq);
196 irq_set_irq_type(IRQ_GPIO(gpio_touch_irq), IRQ_TYPE_EDGE_BOTH); 197 irq_set_irq_type(wm->pen_irq, IRQ_TYPE_EDGE_BOTH);
197 198
198 wm97xx_config_gpio(wm, WM97XX_GPIO_13, WM97XX_GPIO_IN, 199 wm97xx_config_gpio(wm, WM97XX_GPIO_13, WM97XX_GPIO_IN,
199 WM97XX_GPIO_POL_HIGH, 200 WM97XX_GPIO_POL_HIGH,
diff --git a/drivers/pcmcia/pxa2xx_e740.c b/drivers/pcmcia/pxa2xx_e740.c
index 8bfbd4dca13..17cd2ce7428 100644
--- a/drivers/pcmcia/pxa2xx_e740.c
+++ b/drivers/pcmcia/pxa2xx_e740.c
@@ -26,20 +26,23 @@
26static struct pcmcia_irqs cd_irqs[] = { 26static struct pcmcia_irqs cd_irqs[] = {
27 { 27 {
28 .sock = 0, 28 .sock = 0,
29 .irq = IRQ_GPIO(GPIO_E740_PCMCIA_CD0),
30 .str = "CF card detect" 29 .str = "CF card detect"
31 }, 30 },
32 { 31 {
33 .sock = 1, 32 .sock = 1,
34 .irq = IRQ_GPIO(GPIO_E740_PCMCIA_CD1),
35 .str = "Wifi switch" 33 .str = "Wifi switch"
36 }, 34 },
37}; 35};
38 36
39static int e740_pcmcia_hw_init(struct soc_pcmcia_socket *skt) 37static int e740_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
40{ 38{
41 skt->socket.pci_irq = skt->nr == 0 ? IRQ_GPIO(GPIO_E740_PCMCIA_RDY0) : 39 if (skt->nr == 0)
42 IRQ_GPIO(GPIO_E740_PCMCIA_RDY1); 40 skt->socket.pci_irq = gpio_to_irq(GPIO_E740_PCMCIA_RDY0);
41 else
42 skt->socket.pci_irq = gpio_to_irq(GPIO_E740_PCMCIA_RDY1);
43
44 cd_irqs[0].irq = gpio_to_irq(GPIO_E740_PCMCIA_CD0);
45 cd_irqs[1].irq = gpio_to_irq(GPIO_E740_PCMCIA_CD1);
43 46
44 return soc_pcmcia_request_irqs(skt, &cd_irqs[skt->nr], 1); 47 return soc_pcmcia_request_irqs(skt, &cd_irqs[skt->nr], 1);
45} 48}
diff --git a/drivers/pcmcia/pxa2xx_palmld.c b/drivers/pcmcia/pxa2xx_palmld.c
index d589ad1dcd4..6a8e011a8c1 100644
--- a/drivers/pcmcia/pxa2xx_palmld.c
+++ b/drivers/pcmcia/pxa2xx_palmld.c
@@ -33,7 +33,7 @@ static int palmld_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
33 ret = gpio_request_array(palmld_pcmcia_gpios, 33 ret = gpio_request_array(palmld_pcmcia_gpios,
34 ARRAY_SIZE(palmld_pcmcia_gpios)); 34 ARRAY_SIZE(palmld_pcmcia_gpios));
35 35
36 skt->socket.pci_irq = IRQ_GPIO(GPIO_NR_PALMLD_PCMCIA_READY); 36 skt->socket.pci_irq = gpio_to_irq(GPIO_NR_PALMLD_PCMCIA_READY);
37 37
38 return ret; 38 return ret;
39} 39}
diff --git a/drivers/pcmcia/pxa2xx_palmtc.c b/drivers/pcmcia/pxa2xx_palmtc.c
index 9c6a04b2f71..9e38de769ba 100644
--- a/drivers/pcmcia/pxa2xx_palmtc.c
+++ b/drivers/pcmcia/pxa2xx_palmtc.c
@@ -37,7 +37,7 @@ static int palmtc_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
37 ret = gpio_request_array(palmtc_pcmcia_gpios, 37 ret = gpio_request_array(palmtc_pcmcia_gpios,
38 ARRAY_SIZE(palmtc_pcmcia_gpios)); 38 ARRAY_SIZE(palmtc_pcmcia_gpios));
39 39
40 skt->socket.pci_irq = IRQ_GPIO(GPIO_NR_PALMTC_PCMCIA_READY); 40 skt->socket.pci_irq = gpio_to_irq(GPIO_NR_PALMTC_PCMCIA_READY);
41 41
42 return ret; 42 return ret;
43} 43}
diff --git a/drivers/pcmcia/pxa2xx_stargate2.c b/drivers/pcmcia/pxa2xx_stargate2.c
index 939622251df..6c2366b74a3 100644
--- a/drivers/pcmcia/pxa2xx_stargate2.c
+++ b/drivers/pcmcia/pxa2xx_stargate2.c
@@ -34,7 +34,7 @@
34#define SG2_S0_GPIO_READY 81 34#define SG2_S0_GPIO_READY 81
35 35
36static struct pcmcia_irqs irqs[] = { 36static struct pcmcia_irqs irqs[] = {
37 { 0, IRQ_GPIO(SG2_S0_GPIO_DETECT), "PCMCIA0 CD" }, 37 {.sock = 0, .str = "PCMCIA0 CD" },
38}; 38};
39 39
40static struct gpio sg2_pcmcia_gpios[] = { 40static struct gpio sg2_pcmcia_gpios[] = {
@@ -44,7 +44,9 @@ static struct gpio sg2_pcmcia_gpios[] = {
44 44
45static int sg2_pcmcia_hw_init(struct soc_pcmcia_socket *skt) 45static int sg2_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
46{ 46{
47 skt->socket.pci_irq = IRQ_GPIO(SG2_S0_GPIO_READY); 47 skt->socket.pci_irq = gpio_to_irq(SG2_S0_GPIO_READY);
48 irqs[0].irq = gpio_to_irq(SG2_S0_GPIO_DETECT);
49
48 return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs)); 50 return soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
49} 51}
50 52
diff --git a/drivers/pcmcia/pxa2xx_trizeps4.c b/drivers/pcmcia/pxa2xx_trizeps4.c
index 57ddb969d88..7c33f898135 100644
--- a/drivers/pcmcia/pxa2xx_trizeps4.c
+++ b/drivers/pcmcia/pxa2xx_trizeps4.c
@@ -30,7 +30,7 @@
30extern void board_pcmcia_power(int power); 30extern void board_pcmcia_power(int power);
31 31
32static struct pcmcia_irqs irqs[] = { 32static struct pcmcia_irqs irqs[] = {
33 { 0, IRQ_GPIO(GPIO_PCD), "cs0_cd" } 33 { .sock = 0, .str = "cs0_cd" }
34 /* on other baseboards we can have more inputs */ 34 /* on other baseboards we can have more inputs */
35}; 35};
36 36
@@ -53,7 +53,8 @@ static int trizeps_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
53 gpio_free(GPIO_PRDY); 53 gpio_free(GPIO_PRDY);
54 return -EINVAL; 54 return -EINVAL;
55 } 55 }
56 skt->socket.pci_irq = IRQ_GPIO(GPIO_PRDY); 56 skt->socket.pci_irq = gpio_to_irq(GPIO_PRDY);
57 irqs[0].irq = gpio_to_irq(GPIO_PCD);
57 break; 58 break;
58 default: 59 default:
59 break; 60 break;
diff --git a/drivers/pcmcia/pxa2xx_vpac270.c b/drivers/pcmcia/pxa2xx_vpac270.c
index 66ab92cf310..61b17d235db 100644
--- a/drivers/pcmcia/pxa2xx_vpac270.c
+++ b/drivers/pcmcia/pxa2xx_vpac270.c
@@ -38,12 +38,10 @@ static struct gpio vpac270_cf_gpios[] = {
38static struct pcmcia_irqs cd_irqs[] = { 38static struct pcmcia_irqs cd_irqs[] = {
39 { 39 {
40 .sock = 0, 40 .sock = 0,
41 .irq = IRQ_GPIO(GPIO84_VPAC270_PCMCIA_CD),
42 .str = "PCMCIA CD" 41 .str = "PCMCIA CD"
43 }, 42 },
44 { 43 {
45 .sock = 1, 44 .sock = 1,
46 .irq = IRQ_GPIO(GPIO17_VPAC270_CF_CD),
47 .str = "CF CD" 45 .str = "CF CD"
48 }, 46 },
49}; 47};
@@ -57,6 +55,7 @@ static int vpac270_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
57 ARRAY_SIZE(vpac270_pcmcia_gpios)); 55 ARRAY_SIZE(vpac270_pcmcia_gpios));
58 56
59 skt->socket.pci_irq = gpio_to_irq(GPIO35_VPAC270_PCMCIA_RDY); 57 skt->socket.pci_irq = gpio_to_irq(GPIO35_VPAC270_PCMCIA_RDY);
58 cd_irqs[0].irq = gpio_to_irq(GPIO84_VPAC270_PCMCIA_CD);
60 59
61 if (!ret) 60 if (!ret)
62 ret = soc_pcmcia_request_irqs(skt, &cd_irqs[0], 1); 61 ret = soc_pcmcia_request_irqs(skt, &cd_irqs[0], 1);
@@ -65,6 +64,7 @@ static int vpac270_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
65 ARRAY_SIZE(vpac270_cf_gpios)); 64 ARRAY_SIZE(vpac270_cf_gpios));
66 65
67 skt->socket.pci_irq = gpio_to_irq(GPIO12_VPAC270_CF_RDY); 66 skt->socket.pci_irq = gpio_to_irq(GPIO12_VPAC270_CF_RDY);
67 cd_irqs[1].irq = gpio_to_irq(GPIO17_VPAC270_CF_CD);
68 68
69 if (!ret) 69 if (!ret)
70 ret = soc_pcmcia_request_irqs(skt, &cd_irqs[1], 1); 70 ret = soc_pcmcia_request_irqs(skt, &cd_irqs[1], 1);