Commit 40e3925b authored by David Brownell's avatar David Brownell Committed by Tony Lindgren

ARM: OMAP: switch to gpio_direction_input

More switchover to the cross-platform GPIO interface:
use gpio_direction_input(), not an OMAP-specific call.
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 0b84b5ca
...@@ -351,14 +351,14 @@ static void __init palmte_misc_gpio_setup(void) ...@@ -351,14 +351,14 @@ static void __init palmte_misc_gpio_setup(void)
printk(KERN_ERR "Could not reserve PINTDAV GPIO!\n"); printk(KERN_ERR "Could not reserve PINTDAV GPIO!\n");
return; return;
} }
omap_set_gpio_direction(PALMTE_PINTDAV_GPIO, 1); gpio_direction_input(PALMTE_PINTDAV_GPIO);
/* Set USB-or-DC-IN pin as input (unused) */ /* Set USB-or-DC-IN pin as input (unused) */
if (omap_request_gpio(PALMTE_USB_OR_DC_GPIO)) { if (omap_request_gpio(PALMTE_USB_OR_DC_GPIO)) {
printk(KERN_ERR "Could not reserve cable signal GPIO!\n"); printk(KERN_ERR "Could not reserve cable signal GPIO!\n");
return; return;
} }
omap_set_gpio_direction(PALMTE_USB_OR_DC_GPIO, 1); gpio_direction_input(PALMTE_USB_OR_DC_GPIO);
} }
static void __init omap_palmte_init(void) static void __init omap_palmte_init(void)
......
...@@ -331,7 +331,7 @@ palmz71_gpio_setup(int early) ...@@ -331,7 +331,7 @@ palmz71_gpio_setup(int early)
printk(KERN_ERR "Could not reserve WP GPIO!\n"); printk(KERN_ERR "Could not reserve WP GPIO!\n");
return; return;
} }
omap_set_gpio_direction(PALMZ71_MMC_WP_GPIO, 1); gpio_direction_input(PALMZ71_MMC_WP_GPIO);
/* Monitor the Power-cable-connected signal */ /* Monitor the Power-cable-connected signal */
if (omap_request_gpio(PALMZ71_USBDETECT_GPIO)) { if (omap_request_gpio(PALMZ71_USBDETECT_GPIO)) {
...@@ -339,7 +339,7 @@ palmz71_gpio_setup(int early) ...@@ -339,7 +339,7 @@ palmz71_gpio_setup(int early)
"Could not reserve cable signal GPIO!\n"); "Could not reserve cable signal GPIO!\n");
return; return;
} }
omap_set_gpio_direction(PALMZ71_USBDETECT_GPIO, 1); gpio_direction_input(PALMZ71_USBDETECT_GPIO);
if (request_irq(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO), if (request_irq(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO),
palmz71_powercable, IRQF_SAMPLE_RANDOM, palmz71_powercable, IRQF_SAMPLE_RANDOM,
"palmz71-cable", 0)) "palmz71-cable", 0))
......
...@@ -256,7 +256,7 @@ void voiceblue_wdt_disable(void) ...@@ -256,7 +256,7 @@ void voiceblue_wdt_disable(void)
gpio_set_value(0, 0); gpio_set_value(0, 0);
gpio_set_value(0, 1); gpio_set_value(0, 1);
gpio_set_value(0, 0); gpio_set_value(0, 0);
omap_set_gpio_direction(0, 1); gpio_direction_input(0);
} }
void voiceblue_wdt_ping(void) void voiceblue_wdt_ping(void)
......
...@@ -178,7 +178,7 @@ void omap1510_fpga_init_irq(void) ...@@ -178,7 +178,7 @@ void omap1510_fpga_init_irq(void)
* gpio.[ch] * gpio.[ch]
*/ */
omap_request_gpio(13); omap_request_gpio(13);
omap_set_gpio_direction(13, 1); gpio_direction_input(13);
set_irq_type(OMAP_GPIO_IRQ(13), IRQ_TYPE_EDGE_RISING); set_irq_type(OMAP_GPIO_IRQ(13), IRQ_TYPE_EDGE_RISING);
set_irq_chained_handler(OMAP1510_INT_FPGA, innovator_fpga_IRQ_demux); set_irq_chained_handler(OMAP1510_INT_FPGA, innovator_fpga_IRQ_demux);
} }
......
...@@ -250,7 +250,7 @@ static void __init omap_serial_set_port_wakeup(int gpio_nr) ...@@ -250,7 +250,7 @@ static void __init omap_serial_set_port_wakeup(int gpio_nr)
gpio_nr); gpio_nr);
return; return;
} }
omap_set_gpio_direction(gpio_nr, 1); gpio_direction_input(gpio_nr);
ret = request_irq(OMAP_GPIO_IRQ(gpio_nr), &omap_serial_wake_interrupt, ret = request_irq(OMAP_GPIO_IRQ(gpio_nr), &omap_serial_wake_interrupt,
IRQF_TRIGGER_RISING, "serial wakeup", NULL); IRQF_TRIGGER_RISING, "serial wakeup", NULL);
if (ret) { if (ret) {
......
...@@ -174,7 +174,7 @@ static inline void __init sdp2430_init_smc91x(void) ...@@ -174,7 +174,7 @@ static inline void __init sdp2430_init_smc91x(void)
gpmc_cs_free(eth_cs); gpmc_cs_free(eth_cs);
goto out; goto out;
} }
omap_set_gpio_direction(OMAP24XX_ETHR_GPIO_IRQ, 1); gpio_direction_input(OMAP24XX_ETHR_GPIO_IRQ);
out: out:
clk_disable(gpmc_fck); clk_disable(gpmc_fck);
......
...@@ -242,7 +242,7 @@ static inline void __init apollon_init_smc91x(void) ...@@ -242,7 +242,7 @@ static inline void __init apollon_init_smc91x(void)
gpmc_cs_free(APOLLON_ETH_CS); gpmc_cs_free(APOLLON_ETH_CS);
goto out; goto out;
} }
omap_set_gpio_direction(APOLLON_ETHR_GPIO_IRQ, 1); gpio_direction_input(APOLLON_ETHR_GPIO_IRQ);
out: out:
clk_disable(gpmc_fck); clk_disable(gpmc_fck);
...@@ -327,15 +327,15 @@ static void __init apollon_sw_init(void) ...@@ -327,15 +327,15 @@ static void __init apollon_sw_init(void)
/* Enter SW - Y11 */ /* Enter SW - Y11 */
omap_cfg_reg(Y11_242X_GPIO16); omap_cfg_reg(Y11_242X_GPIO16);
omap_request_gpio(SW_ENTER_GPIO16); omap_request_gpio(SW_ENTER_GPIO16);
omap_set_gpio_direction(SW_ENTER_GPIO16, 1); gpio_direction_input(SW_ENTER_GPIO16);
/* Up SW - AA12 */ /* Up SW - AA12 */
omap_cfg_reg(AA12_242X_GPIO17); omap_cfg_reg(AA12_242X_GPIO17);
omap_request_gpio(SW_UP_GPIO17); omap_request_gpio(SW_UP_GPIO17);
omap_set_gpio_direction(SW_UP_GPIO17, 1); gpio_direction_input(SW_UP_GPIO17);
/* Down SW - AA8 */ /* Down SW - AA8 */
omap_cfg_reg(AA8_242X_GPIO58); omap_cfg_reg(AA8_242X_GPIO58);
omap_request_gpio(SW_DOWN_GPIO58); omap_request_gpio(SW_DOWN_GPIO58);
omap_set_gpio_direction(SW_DOWN_GPIO58, 1); gpio_direction_input(SW_DOWN_GPIO58);
set_irq_type(OMAP_GPIO_IRQ(SW_ENTER_GPIO16), IRQ_TYPE_EDGE_RISING); set_irq_type(OMAP_GPIO_IRQ(SW_ENTER_GPIO16), IRQ_TYPE_EDGE_RISING);
if (request_irq(OMAP_GPIO_IRQ(SW_ENTER_GPIO16), &apollon_sw_interrupt, if (request_irq(OMAP_GPIO_IRQ(SW_ENTER_GPIO16), &apollon_sw_interrupt,
......
...@@ -297,7 +297,7 @@ tusb6010_setup_interface(struct musb_hdrc_platform_data *data, ...@@ -297,7 +297,7 @@ tusb6010_setup_interface(struct musb_hdrc_platform_data *data,
printk(error, 3, status); printk(error, 3, status);
return status; return status;
} }
omap_set_gpio_direction(irq, 1); gpio_direction_input(irq);
tusb_resources[2].start = irq + IH_GPIO_BASE; tusb_resources[2].start = irq + IH_GPIO_BASE;
/* set up memory timings ... can speed them up later */ /* set up memory timings ... can speed them up later */
......
...@@ -77,7 +77,7 @@ int __init debug_card_init(u32 addr, unsigned gpio) ...@@ -77,7 +77,7 @@ int __init debug_card_init(u32 addr, unsigned gpio)
printk(KERN_ERR "GPIO%d unavailable for smc91x IRQ\n", gpio); printk(KERN_ERR "GPIO%d unavailable for smc91x IRQ\n", gpio);
return status; return status;
} }
omap_set_gpio_direction(gpio, 1); gpio_direction_input(gpio);
led_resources[0].start = addr; led_resources[0].start = addr;
led_resources[0].end = addr + SZ_4K - 1; led_resources[0].end = addr + SZ_4K - 1;
......
...@@ -634,7 +634,7 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev) ...@@ -634,7 +634,7 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
"OneNAND\n", c->gpio_irq); "OneNAND\n", c->gpio_irq);
goto err_iounmap; goto err_iounmap;
} }
omap_set_gpio_direction(c->gpio_irq, 1); gpio_direction_input(c->gpio_irq);
if ((r = request_irq(OMAP_GPIO_IRQ(c->gpio_irq), if ((r = request_irq(OMAP_GPIO_IRQ(c->gpio_irq),
omap2_onenand_interrupt, IRQF_TRIGGER_RISING, omap2_onenand_interrupt, IRQF_TRIGGER_RISING,
......
...@@ -255,7 +255,7 @@ static int ohci_omap_init(struct usb_hcd *hcd) ...@@ -255,7 +255,7 @@ static int ohci_omap_init(struct usb_hcd *hcd)
/* gpio9 for overcurrent detction */ /* gpio9 for overcurrent detction */
omap_cfg_reg(W8_1610_GPIO9); omap_cfg_reg(W8_1610_GPIO9);
omap_request_gpio(9); omap_request_gpio(9);
omap_set_gpio_direction(9, 1 /* IN */); gpio_direction_input(9);
/* for paranoia's sake: disable USB.PUEN */ /* for paranoia's sake: disable USB.PUEN */
omap_cfg_reg(W4_USB_HIGHZ); omap_cfg_reg(W4_USB_HIGHZ);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment