aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap1/board-fsample.c2
-rw-r--r--arch/arm/mach-omap1/board-h2.c9
-rw-r--r--arch/arm/mach-omap1/board-h3.c2
-rw-r--r--arch/arm/mach-omap1/board-nokia770.c10
-rw-r--r--arch/arm/mach-omap1/board-palmte.c6
-rw-r--r--arch/arm/mach-omap1/board-palmtt.c2
-rw-r--r--arch/arm/mach-omap1/board-palmz71.c6
-rw-r--r--arch/arm/mach-omap1/board-perseus2.c2
-rw-r--r--arch/arm/mach-omap1/board-sx1.c6
-rw-r--r--arch/arm/mach-omap1/board-voiceblue.c20
-rw-r--r--arch/arm/mach-omap1/leds-h2p2-debug.c10
-rw-r--r--arch/arm/mach-omap1/leds-osk.c4
-rw-r--r--arch/arm/mach-omap2/board-apollon.c2
-rw-r--r--arch/arm/plat-omap/debug-leds.c10
-rw-r--r--arch/arm/plat-omap/gpio.c21
-rw-r--r--arch/arm/plat-omap/include/mach/gpio.h2
16 files changed, 47 insertions, 67 deletions
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c
index db789461fca4..68da3131f8f8 100644
--- a/arch/arm/mach-omap1/board-fsample.c
+++ b/arch/arm/mach-omap1/board-fsample.c
@@ -205,7 +205,7 @@ static struct platform_device *devices[] __initdata = {
205 205
206static int nand_dev_ready(struct omap_nand_platform_data *data) 206static int nand_dev_ready(struct omap_nand_platform_data *data)
207{ 207{
208 return omap_get_gpio_datain(P2_NAND_RB_GPIO_PIN); 208 return gpio_get_value(P2_NAND_RB_GPIO_PIN);
209} 209}
210 210
211static struct omap_uart_config fsample_uart_config __initdata = { 211static struct omap_uart_config fsample_uart_config __initdata = {
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 3b65914b9141..a2914ac4a202 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -250,11 +250,8 @@ static struct platform_device h2_kp_device = {
250#if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE) 250#if defined(CONFIG_OMAP_IR) || defined(CONFIG_OMAP_IR_MODULE)
251static int h2_transceiver_mode(struct device *dev, int state) 251static int h2_transceiver_mode(struct device *dev, int state)
252{ 252{
253 if (state & IR_SIRMODE) 253 /* SIR when low, else MIR/FIR when HIGH */
254 omap_set_gpio_dataout(H2_IRDA_FIRSEL_GPIO_PIN, 0); 254 gpio_set_value(H2_IRDA_FIRSEL_GPIO_PIN, !(state & IR_SIRMODE));
255 else /* MIR/FIR */
256 omap_set_gpio_dataout(H2_IRDA_FIRSEL_GPIO_PIN, 1);
257
258 return 0; 255 return 0;
259} 256}
260#endif 257#endif
@@ -409,7 +406,7 @@ static struct omap_board_config_kernel h2_config[] __initdata = {
409 406
410static int h2_nand_dev_ready(struct omap_nand_platform_data *data) 407static int h2_nand_dev_ready(struct omap_nand_platform_data *data)
411{ 408{
412 return omap_get_gpio_datain(H2_NAND_RB_GPIO_PIN); 409 return gpio_get_value(H2_NAND_RB_GPIO_PIN);
413} 410}
414 411
415static void __init h2_init(void) 412static void __init h2_init(void)
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index adfcd7b51393..c524f47cf862 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -498,7 +498,7 @@ static struct omap_gpio_switch h3_gpio_switches[] __initdata = {
498 498
499static int nand_dev_ready(struct omap_nand_platform_data *data) 499static int nand_dev_ready(struct omap_nand_platform_data *data)
500{ 500{
501 return omap_get_gpio_datain(H3_NAND_RB_GPIO_PIN); 501 return gpio_get_value(H3_NAND_RB_GPIO_PIN);
502} 502}
503 503
504static void __init h3_init(void) 504static void __init h3_init(void)
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c
index 38d9783ac6d6..e0576f5bcdab 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -102,7 +102,7 @@ static void mipid_shutdown(struct mipid_platform_data *pdata)
102{ 102{
103 if (pdata->nreset_gpio != -1) { 103 if (pdata->nreset_gpio != -1) {
104 printk(KERN_INFO "shutdown LCD\n"); 104 printk(KERN_INFO "shutdown LCD\n");
105 omap_set_gpio_dataout(pdata->nreset_gpio, 0); 105 gpio_set_value(pdata->nreset_gpio, 0);
106 msleep(120); 106 msleep(120);
107 } 107 }
108} 108}
@@ -130,7 +130,7 @@ static void ads7846_dev_init(void)
130 130
131static int ads7846_get_pendown_state(void) 131static int ads7846_get_pendown_state(void)
132{ 132{
133 return !omap_get_gpio_datain(ADS7846_PENDOWN_GPIO); 133 return !gpio_get_value(ADS7846_PENDOWN_GPIO);
134} 134}
135 135
136static struct ads7846_platform_data nokia770_ads7846_platform_data __initdata = { 136static struct ads7846_platform_data nokia770_ads7846_platform_data __initdata = {
@@ -228,9 +228,9 @@ static void nokia770_audio_pwr_up(void)
228 /* Turn on codec */ 228 /* Turn on codec */
229 aic23_power_up(); 229 aic23_power_up();
230 230
231 if (omap_get_gpio_datain(HEADPHONE_GPIO)) 231 if (gpio_get_value(HEADPHONE_GPIO))
232 /* HP not connected, turn on amplifier */ 232 /* HP not connected, turn on amplifier */
233 omap_set_gpio_dataout(AMPLIFIER_CTRL_GPIO, 1); 233 gpio_set_value(AMPLIFIER_CTRL_GPIO, 1);
234 else 234 else
235 /* HP connected, do not turn on amplifier */ 235 /* HP connected, do not turn on amplifier */
236 printk("HP connected\n"); 236 printk("HP connected\n");
@@ -250,7 +250,7 @@ static DECLARE_DELAYED_WORK(codec_power_down_work, codec_delayed_power_down);
250static void nokia770_audio_pwr_down(void) 250static void nokia770_audio_pwr_down(void)
251{ 251{
252 /* Turn off amplifier */ 252 /* Turn off amplifier */
253 omap_set_gpio_dataout(AMPLIFIER_CTRL_GPIO, 0); 253 gpio_set_value(AMPLIFIER_CTRL_GPIO, 0);
254 254
255 /* Turn off codec: schedule delayed work */ 255 /* Turn off codec: schedule delayed work */
256 schedule_delayed_work(&codec_power_down_work, HZ / 20); /* 50ms */ 256 schedule_delayed_work(&codec_power_down_work, HZ / 20); /* 50ms */
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c
index b58043644a6f..df663ba7ea88 100644
--- a/arch/arm/mach-omap1/board-palmte.c
+++ b/arch/arm/mach-omap1/board-palmte.c
@@ -255,7 +255,7 @@ static void palmte_get_power_status(struct apm_power_info *info, int *battery)
255{ 255{
256 int charging, batt, hi, lo, mid; 256 int charging, batt, hi, lo, mid;
257 257
258 charging = !omap_get_gpio_datain(PALMTE_DC_GPIO); 258 charging = !gpio_get_value(PALMTE_DC_GPIO);
259 batt = battery[0]; 259 batt = battery[0];
260 if (charging) 260 if (charging)
261 batt -= 60; 261 batt -= 60;
@@ -335,11 +335,11 @@ static void palmte_headphones_detect(void *data, int state)
335{ 335{
336 if (state) { 336 if (state) {
337 /* Headphones connected, disable speaker */ 337 /* Headphones connected, disable speaker */
338 omap_set_gpio_dataout(PALMTE_SPEAKER_GPIO, 0); 338 gpio_set_value(PALMTE_SPEAKER_GPIO, 0);
339 printk(KERN_INFO "PM: speaker off\n"); 339 printk(KERN_INFO "PM: speaker off\n");
340 } else { 340 } else {
341 /* Headphones unplugged, re-enable speaker */ 341 /* Headphones unplugged, re-enable speaker */
342 omap_set_gpio_dataout(PALMTE_SPEAKER_GPIO, 1); 342 gpio_set_value(PALMTE_SPEAKER_GPIO, 1);
343 printk(KERN_INFO "PM: speaker on\n"); 343 printk(KERN_INFO "PM: speaker on\n");
344 } 344 }
345} 345}
diff --git a/arch/arm/mach-omap1/board-palmtt.c b/arch/arm/mach-omap1/board-palmtt.c
index 40f9860a09df..5c001afe8062 100644
--- a/arch/arm/mach-omap1/board-palmtt.c
+++ b/arch/arm/mach-omap1/board-palmtt.c
@@ -268,7 +268,7 @@ static struct platform_device *palmtt_devices[] __initdata = {
268 268
269static int palmtt_get_pendown_state(void) 269static int palmtt_get_pendown_state(void)
270{ 270{
271 return !omap_get_gpio_datain(6); 271 return !gpio_get_value(6);
272} 272}
273 273
274static const struct ads7846_platform_data palmtt_ts_info = { 274static const struct ads7846_platform_data palmtt_ts_info = {
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c
index e719294250b1..c33766c4dd92 100644
--- a/arch/arm/mach-omap1/board-palmz71.c
+++ b/arch/arm/mach-omap1/board-palmz71.c
@@ -239,7 +239,7 @@ static struct platform_device *devices[] __initdata = {
239static int 239static int
240palmz71_get_pendown_state(void) 240palmz71_get_pendown_state(void)
241{ 241{
242 return !omap_get_gpio_datain(PALMZ71_PENIRQ_GPIO); 242 return !gpio_get_value(PALMZ71_PENIRQ_GPIO);
243} 243}
244 244
245static const struct ads7846_platform_data palmz71_ts_info = { 245static const struct ads7846_platform_data palmz71_ts_info = {
@@ -295,7 +295,7 @@ static struct omap_board_config_kernel palmz71_config[] __initdata = {
295static irqreturn_t 295static irqreturn_t
296palmz71_powercable(int irq, void *dev_id) 296palmz71_powercable(int irq, void *dev_id)
297{ 297{
298 if (omap_get_gpio_datain(PALMZ71_USBDETECT_GPIO)) { 298 if (gpio_get_value(PALMZ71_USBDETECT_GPIO)) {
299 printk(KERN_INFO "PM: Power cable connected\n"); 299 printk(KERN_INFO "PM: Power cable connected\n");
300 set_irq_type(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO), 300 set_irq_type(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO),
301 IRQ_TYPE_EDGE_FALLING); 301 IRQ_TYPE_EDGE_FALLING);
@@ -323,7 +323,7 @@ palmz71_gpio_setup(int early)
323{ 323{
324 if (early) { 324 if (early) {
325 /* Only set GPIO1 so we have a working serial */ 325 /* Only set GPIO1 so we have a working serial */
326 omap_set_gpio_dataout(1, 1); 326 gpio_set_value(1, 1);
327 omap_set_gpio_direction(1, 0); 327 omap_set_gpio_direction(1, 0);
328 } else { 328 } else {
329 /* Set MMC/SD host WP pin as input */ 329 /* Set MMC/SD host WP pin as input */
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c
index b715917bfdaf..b8f0077f9c77 100644
--- a/arch/arm/mach-omap1/board-perseus2.c
+++ b/arch/arm/mach-omap1/board-perseus2.c
@@ -205,7 +205,7 @@ static struct platform_device *devices[] __initdata = {
205 205
206static int nand_dev_ready(struct omap_nand_platform_data *data) 206static int nand_dev_ready(struct omap_nand_platform_data *data)
207{ 207{
208 return omap_get_gpio_datain(P2_NAND_RB_GPIO_PIN); 208 return gpio_get_value(P2_NAND_RB_GPIO_PIN);
209} 209}
210 210
211static struct omap_uart_config perseus2_uart_config __initdata = { 211static struct omap_uart_config perseus2_uart_config __initdata = {
diff --git a/arch/arm/mach-omap1/board-sx1.c b/arch/arm/mach-omap1/board-sx1.c
index 130bcc6fd082..22305270381d 100644
--- a/arch/arm/mach-omap1/board-sx1.c
+++ b/arch/arm/mach-omap1/board-sx1.c
@@ -440,9 +440,9 @@ static void __init omap_sx1_init(void)
440 omap_set_gpio_direction(11, 0);/* gpio11 -> output */ 440 omap_set_gpio_direction(11, 0);/* gpio11 -> output */
441 omap_set_gpio_direction(15, 0);/* gpio15 -> output */ 441 omap_set_gpio_direction(15, 0);/* gpio15 -> output */
442 /* set GPIO data */ 442 /* set GPIO data */
443 omap_set_gpio_dataout(1, 1);/*A_IRDA_OFF = 1 */ 443 gpio_set_value(1, 1);/*A_IRDA_OFF = 1 */
444 omap_set_gpio_dataout(11, 0);/*A_SWITCH = 0 */ 444 gpio_set_value(11, 0);/*A_SWITCH = 0 */
445 omap_set_gpio_dataout(15, 0);/*A_USB_ON = 0 */ 445 gpio_set_value(15, 0);/*A_USB_ON = 0 */
446 446
447} 447}
448/*----------------------------------------*/ 448/*----------------------------------------*/
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c
index 45a01311669a..d7ab11acc7eb 100644
--- a/arch/arm/mach-omap1/board-voiceblue.c
+++ b/arch/arm/mach-omap1/board-voiceblue.c
@@ -172,16 +172,16 @@ static void __init voiceblue_init(void)
172 /* smc91x reset */ 172 /* smc91x reset */
173 omap_request_gpio(7); 173 omap_request_gpio(7);
174 omap_set_gpio_direction(7, 0); 174 omap_set_gpio_direction(7, 0);
175 omap_set_gpio_dataout(7, 1); 175 gpio_set_value(7, 1);
176 udelay(2); /* wait at least 100ns */ 176 udelay(2); /* wait at least 100ns */
177 omap_set_gpio_dataout(7, 0); 177 gpio_set_value(7, 0);
178 mdelay(50); /* 50ms until PHY ready */ 178 mdelay(50); /* 50ms until PHY ready */
179 /* smc91x interrupt pin */ 179 /* smc91x interrupt pin */
180 omap_request_gpio(8); 180 omap_request_gpio(8);
181 /* 16C554 reset*/ 181 /* 16C554 reset*/
182 omap_request_gpio(6); 182 omap_request_gpio(6);
183 omap_set_gpio_direction(6, 0); 183 omap_set_gpio_direction(6, 0);
184 omap_set_gpio_dataout(6, 0); 184 gpio_set_value(6, 0);
185 /* 16C554 interrupt pins */ 185 /* 16C554 interrupt pins */
186 omap_request_gpio(12); 186 omap_request_gpio(12);
187 omap_request_gpio(13); 187 omap_request_gpio(13);
@@ -245,17 +245,17 @@ static int wdt_gpio_state;
245void voiceblue_wdt_enable(void) 245void voiceblue_wdt_enable(void)
246{ 246{
247 omap_set_gpio_direction(0, 0); 247 omap_set_gpio_direction(0, 0);
248 omap_set_gpio_dataout(0, 0); 248 gpio_set_value(0, 0);
249 omap_set_gpio_dataout(0, 1); 249 gpio_set_value(0, 1);
250 omap_set_gpio_dataout(0, 0); 250 gpio_set_value(0, 0);
251 wdt_gpio_state = 0; 251 wdt_gpio_state = 0;
252} 252}
253 253
254void voiceblue_wdt_disable(void) 254void voiceblue_wdt_disable(void)
255{ 255{
256 omap_set_gpio_dataout(0, 0); 256 gpio_set_value(0, 0);
257 omap_set_gpio_dataout(0, 1); 257 gpio_set_value(0, 1);
258 omap_set_gpio_dataout(0, 0); 258 gpio_set_value(0, 0);
259 omap_set_gpio_direction(0, 1); 259 omap_set_gpio_direction(0, 1);
260} 260}
261 261
@@ -265,7 +265,7 @@ void voiceblue_wdt_ping(void)
265 return; 265 return;
266 266
267 wdt_gpio_state = !wdt_gpio_state; 267 wdt_gpio_state = !wdt_gpio_state;
268 omap_set_gpio_dataout(0, wdt_gpio_state); 268 gpio_set_value(0, wdt_gpio_state);
269} 269}
270 270
271void voiceblue_reset(void) 271void voiceblue_reset(void)
diff --git a/arch/arm/mach-omap1/leds-h2p2-debug.c b/arch/arm/mach-omap1/leds-h2p2-debug.c
index 71fe2cc7f7cf..17c9d0e04216 100644
--- a/arch/arm/mach-omap1/leds-h2p2-debug.c
+++ b/arch/arm/mach-omap1/leds-h2p2-debug.c
@@ -65,8 +65,8 @@ void h2p2_dbg_leds_event(led_event_t evt)
65 /* all leds off during suspend or shutdown */ 65 /* all leds off during suspend or shutdown */
66 66
67 if (! machine_is_omap_perseus2()) { 67 if (! machine_is_omap_perseus2()) {
68 omap_set_gpio_dataout(GPIO_TIMER, 0); 68 gpio_set_value(GPIO_TIMER, 0);
69 omap_set_gpio_dataout(GPIO_IDLE, 0); 69 gpio_set_value(GPIO_IDLE, 0);
70 } 70 }
71 71
72 __raw_writew(~0, &fpga->leds); 72 __raw_writew(~0, &fpga->leds);
@@ -94,7 +94,7 @@ void h2p2_dbg_leds_event(led_event_t evt)
94 if (machine_is_omap_perseus2()) 94 if (machine_is_omap_perseus2())
95 hw_led_state ^= H2P2_DBG_FPGA_P2_LED_TIMER; 95 hw_led_state ^= H2P2_DBG_FPGA_P2_LED_TIMER;
96 else { 96 else {
97 omap_set_gpio_dataout(GPIO_TIMER, led_state & LED_TIMER_ON); 97 gpio_set_value(GPIO_TIMER, led_state & LED_TIMER_ON);
98 goto done; 98 goto done;
99 } 99 }
100 100
@@ -106,7 +106,7 @@ void h2p2_dbg_leds_event(led_event_t evt)
106 if (machine_is_omap_perseus2()) 106 if (machine_is_omap_perseus2())
107 hw_led_state |= H2P2_DBG_FPGA_P2_LED_IDLE; 107 hw_led_state |= H2P2_DBG_FPGA_P2_LED_IDLE;
108 else { 108 else {
109 omap_set_gpio_dataout(GPIO_IDLE, 1); 109 gpio_set_value(GPIO_IDLE, 1);
110 goto done; 110 goto done;
111 } 111 }
112 112
@@ -116,7 +116,7 @@ void h2p2_dbg_leds_event(led_event_t evt)
116 if (machine_is_omap_perseus2()) 116 if (machine_is_omap_perseus2())
117 hw_led_state &= ~H2P2_DBG_FPGA_P2_LED_IDLE; 117 hw_led_state &= ~H2P2_DBG_FPGA_P2_LED_IDLE;
118 else { 118 else {
119 omap_set_gpio_dataout(GPIO_IDLE, 0); 119 gpio_set_value(GPIO_IDLE, 0);
120 goto done; 120 goto done;
121 } 121 }
122 122
diff --git a/arch/arm/mach-omap1/leds-osk.c b/arch/arm/mach-omap1/leds-osk.c
index 98e789622dfd..499d7ad8697d 100644
--- a/arch/arm/mach-omap1/leds-osk.c
+++ b/arch/arm/mach-omap1/leds-osk.c
@@ -44,8 +44,8 @@ static void mistral_setled(void)
44 green = 1; 44 green = 1;
45 /* else both sides are disabled */ 45 /* else both sides are disabled */
46 46
47 omap_set_gpio_dataout(GPIO_LED_GREEN, green); 47 gpio_set_value(GPIO_LED_GREEN, green);
48 omap_set_gpio_dataout(GPIO_LED_RED, red); 48 gpio_set_value(GPIO_LED_RED, red);
49} 49}
50 50
51#endif 51#endif
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index 989ad152d7f8..a4ba52c8119b 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -361,7 +361,7 @@ static void __init apollon_usb_init(void)
361 omap_cfg_reg(P21_242X_GPIO12); 361 omap_cfg_reg(P21_242X_GPIO12);
362 omap_request_gpio(12); 362 omap_request_gpio(12);
363 omap_set_gpio_direction(12, 0); /* OUT */ 363 omap_set_gpio_direction(12, 0); /* OUT */
364 omap_set_gpio_dataout(12, 0); 364 gpio_set_value(12, 0);
365} 365}
366 366
367static void __init omap_apollon_init(void) 367static void __init omap_apollon_init(void)
diff --git a/arch/arm/plat-omap/debug-leds.c b/arch/arm/plat-omap/debug-leds.c
index 2f4c0cabfd34..be4eefda4767 100644
--- a/arch/arm/plat-omap/debug-leds.c
+++ b/arch/arm/plat-omap/debug-leds.c
@@ -83,8 +83,8 @@ static void h2p2_dbg_leds_event(led_event_t evt)
83 /* all leds off during suspend or shutdown */ 83 /* all leds off during suspend or shutdown */
84 84
85 if (!(machine_is_omap_perseus2() || machine_is_omap_h4())) { 85 if (!(machine_is_omap_perseus2() || machine_is_omap_h4())) {
86 omap_set_gpio_dataout(GPIO_TIMER, 0); 86 gpio_set_value(GPIO_TIMER, 0);
87 omap_set_gpio_dataout(GPIO_IDLE, 0); 87 gpio_set_value(GPIO_IDLE, 0);
88 } 88 }
89 89
90 __raw_writew(~0, &fpga->leds); 90 __raw_writew(~0, &fpga->leds);
@@ -107,7 +107,7 @@ static void h2p2_dbg_leds_event(led_event_t evt)
107 if (machine_is_omap_perseus2() || machine_is_omap_h4()) 107 if (machine_is_omap_perseus2() || machine_is_omap_h4())
108 hw_led_state ^= H2P2_DBG_FPGA_P2_LED_TIMER; 108 hw_led_state ^= H2P2_DBG_FPGA_P2_LED_TIMER;
109 else { 109 else {
110 omap_set_gpio_dataout(GPIO_TIMER, 110 gpio_set_value(GPIO_TIMER,
111 led_state & LED_TIMER_ON); 111 led_state & LED_TIMER_ON);
112 goto done; 112 goto done;
113 } 113 }
@@ -121,7 +121,7 @@ static void h2p2_dbg_leds_event(led_event_t evt)
121 if (machine_is_omap_perseus2() || machine_is_omap_h4()) 121 if (machine_is_omap_perseus2() || machine_is_omap_h4())
122 hw_led_state &= ~H2P2_DBG_FPGA_P2_LED_IDLE; 122 hw_led_state &= ~H2P2_DBG_FPGA_P2_LED_IDLE;
123 else { 123 else {
124 omap_set_gpio_dataout(GPIO_IDLE, 1); 124 gpio_set_value(GPIO_IDLE, 1);
125 goto done; 125 goto done;
126 } 126 }
127 127
@@ -131,7 +131,7 @@ static void h2p2_dbg_leds_event(led_event_t evt)
131 if (machine_is_omap_perseus2() || machine_is_omap_h4()) 131 if (machine_is_omap_perseus2() || machine_is_omap_h4())
132 hw_led_state |= H2P2_DBG_FPGA_P2_LED_IDLE; 132 hw_led_state |= H2P2_DBG_FPGA_P2_LED_IDLE;
133 else { 133 else {
134 omap_set_gpio_dataout(GPIO_IDLE, 0); 134 gpio_set_value(GPIO_IDLE, 0);
135 goto done; 135 goto done;
136 } 136 }
137 137
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index e07ab233e783..c0322b56efe9 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -407,20 +407,7 @@ static void _set_gpio_dataout(struct gpio_bank *bank, int gpio, int enable)
407 __raw_writel(l, reg); 407 __raw_writel(l, reg);
408} 408}
409 409
410void omap_set_gpio_dataout(int gpio, int enable) 410static int __omap_get_gpio_datain(int gpio)
411{
412 struct gpio_bank *bank;
413 unsigned long flags;
414
415 if (check_gpio(gpio) < 0)
416 return;
417 bank = get_gpio_bank(gpio);
418 spin_lock_irqsave(&bank->lock, flags);
419 _set_gpio_dataout(bank, get_gpio_index(gpio), enable);
420 spin_unlock_irqrestore(&bank->lock, flags);
421}
422
423int omap_get_gpio_datain(int gpio)
424{ 411{
425 struct gpio_bank *bank; 412 struct gpio_bank *bank;
426 void __iomem *reg; 413 void __iomem *reg;
@@ -1258,7 +1245,7 @@ static int gpio_input(struct gpio_chip *chip, unsigned offset)
1258 1245
1259static int gpio_get(struct gpio_chip *chip, unsigned offset) 1246static int gpio_get(struct gpio_chip *chip, unsigned offset)
1260{ 1247{
1261 return omap_get_gpio_datain(chip->base + offset); 1248 return __omap_get_gpio_datain(chip->base + offset);
1262} 1249}
1263 1250
1264static int gpio_output(struct gpio_chip *chip, unsigned offset, int value) 1251static int gpio_output(struct gpio_chip *chip, unsigned offset, int value)
@@ -1755,8 +1742,6 @@ static int __init omap_gpio_sysinit(void)
1755EXPORT_SYMBOL(omap_request_gpio); 1742EXPORT_SYMBOL(omap_request_gpio);
1756EXPORT_SYMBOL(omap_free_gpio); 1743EXPORT_SYMBOL(omap_free_gpio);
1757EXPORT_SYMBOL(omap_set_gpio_direction); 1744EXPORT_SYMBOL(omap_set_gpio_direction);
1758EXPORT_SYMBOL(omap_set_gpio_dataout);
1759EXPORT_SYMBOL(omap_get_gpio_datain);
1760 1745
1761arch_initcall(omap_gpio_sysinit); 1746arch_initcall(omap_gpio_sysinit);
1762 1747
@@ -1814,7 +1799,7 @@ static int dbg_gpio_show(struct seq_file *s, void *unused)
1814 continue; 1799 continue;
1815 1800
1816 irq = bank->virtual_irq_start + j; 1801 irq = bank->virtual_irq_start + j;
1817 value = omap_get_gpio_datain(gpio); 1802 value = gpio_get_value(gpio);
1818 is_in = gpio_is_input(bank, mask); 1803 is_in = gpio_is_input(bank, mask);
1819 1804
1820 if (bank_is_mpuio(bank)) 1805 if (bank_is_mpuio(bank))
diff --git a/arch/arm/plat-omap/include/mach/gpio.h b/arch/arm/plat-omap/include/mach/gpio.h
index 5f996f350c84..d91ba328a309 100644
--- a/arch/arm/plat-omap/include/mach/gpio.h
+++ b/arch/arm/plat-omap/include/mach/gpio.h
@@ -74,8 +74,6 @@ extern int omap_gpio_init(void); /* Call from board init only */
74extern int omap_request_gpio(int gpio); 74extern int omap_request_gpio(int gpio);
75extern void omap_free_gpio(int gpio); 75extern void omap_free_gpio(int gpio);
76extern void omap_set_gpio_direction(int gpio, int is_input); 76extern void omap_set_gpio_direction(int gpio, int is_input);
77extern void omap_set_gpio_dataout(int gpio, int enable);
78extern int omap_get_gpio_datain(int gpio);
79extern void omap2_gpio_prepare_for_retention(void); 77extern void omap2_gpio_prepare_for_retention(void);
80extern void omap2_gpio_resume_after_retention(void); 78extern void omap2_gpio_resume_after_retention(void);
81extern void omap_set_gpio_debounce(int gpio, int enable); 79extern void omap_set_gpio_debounce(int gpio, int enable);