Commit d59842e6 authored by David Brownell's avatar David Brownell Committed by Tony Lindgren

use gpio_direction_input (OMAP tree only)

More switchover to the cross-platform GPIO interface:
use gpio_direction_input(), not an OMAP-specific call,
for code that has NOT merged to mainline.
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 7270f33b
...@@ -219,7 +219,7 @@ static void ads7846_dev_init(void) ...@@ -219,7 +219,7 @@ static void ads7846_dev_init(void)
if (omap_request_gpio(TS_GPIO) < 0) if (omap_request_gpio(TS_GPIO) < 0)
printk(KERN_ERR "can't get ads746 pen down GPIO\n"); printk(KERN_ERR "can't get ads746 pen down GPIO\n");
omap_set_gpio_direction(TS_GPIO, 1); gpio_direction_input(TS_GPIO);
omap_set_gpio_debounce(TS_GPIO, 1); omap_set_gpio_debounce(TS_GPIO, 1);
omap_set_gpio_debounce_time(TS_GPIO, 0xa); omap_set_gpio_debounce_time(TS_GPIO, 0xa);
......
...@@ -171,7 +171,7 @@ static void ads7846_dev_init(void) ...@@ -171,7 +171,7 @@ static void ads7846_dev_init(void)
return; return;
} }
omap_set_gpio_direction(ts_gpio, 1); gpio_direction_input(ts_gpio);
omap_set_gpio_debounce(ts_gpio, 1); omap_set_gpio_debounce(ts_gpio, 1);
omap_set_gpio_debounce_time(ts_gpio, 0xa); omap_set_gpio_debounce_time(ts_gpio, 0xa);
...@@ -279,7 +279,7 @@ static inline void __init sdp3430_init_smc91x(void) ...@@ -279,7 +279,7 @@ static inline void __init sdp3430_init_smc91x(void)
eth_gpio); eth_gpio);
return; return;
} }
omap_set_gpio_direction(eth_gpio, 1); gpio_direction_input(eth_gpio);
} }
static void __init omap_3430sdp_init_irq(void) static void __init omap_3430sdp_init_irq(void)
......
...@@ -314,7 +314,7 @@ static inline void __init apollon_init_smc91x(void) ...@@ -314,7 +314,7 @@ static inline void __init apollon_init_smc91x(void)
gpmc_cs_free(eth_cs); gpmc_cs_free(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);
......
...@@ -102,7 +102,7 @@ static void ads7846_dev_init(void) ...@@ -102,7 +102,7 @@ static void ads7846_dev_init(void)
return; return;
} }
omap_set_gpio_direction(ts_gpio, 1); gpio_direction_input(ts_gpio);
omap_set_gpio_debounce(ts_gpio, 1); omap_set_gpio_debounce(ts_gpio, 1);
omap_set_gpio_debounce_time(ts_gpio, 0xa); omap_set_gpio_debounce_time(ts_gpio, 0xa);
......
...@@ -83,7 +83,7 @@ static inline void __init omap3evm_init_smc911x(void) ...@@ -83,7 +83,7 @@ static inline void __init omap3evm_init_smc911x(void)
return; return;
} }
omap_set_gpio_direction(OMAP3EVM_ETHR_GPIO_IRQ, 1); gpio_direction_input(OMAP3EVM_ETHR_GPIO_IRQ);
} }
static struct omap_uart_config omap3_evm_uart_config __initdata = { static struct omap_uart_config omap3_evm_uart_config __initdata = {
...@@ -176,7 +176,7 @@ static void ads7846_dev_init(void) ...@@ -176,7 +176,7 @@ static void ads7846_dev_init(void)
if (omap_request_gpio(OMAP3_EVM_TS_GPIO) < 0) if (omap_request_gpio(OMAP3_EVM_TS_GPIO) < 0)
printk(KERN_ERR "can't get ads7846 pen down GPIO\n"); printk(KERN_ERR "can't get ads7846 pen down GPIO\n");
omap_set_gpio_direction(OMAP3_EVM_TS_GPIO, 1); gpio_direction_input(OMAP3_EVM_TS_GPIO);
omap_set_gpio_debounce(OMAP3_EVM_TS_GPIO, 1); omap_set_gpio_debounce(OMAP3_EVM_TS_GPIO, 1);
omap_set_gpio_debounce_time(OMAP3_EVM_TS_GPIO, 0xa); omap_set_gpio_debounce_time(OMAP3_EVM_TS_GPIO, 0xa);
......
...@@ -286,7 +286,10 @@ static int __init new_switch(struct gpio_switch *sw) ...@@ -286,7 +286,10 @@ static int __init new_switch(struct gpio_switch *sw)
/* input: 1, output: 0 */ /* input: 1, output: 0 */
direction = !(sw->flags & OMAP_GPIO_SWITCH_FLAG_OUTPUT); direction = !(sw->flags & OMAP_GPIO_SWITCH_FLAG_OUTPUT);
omap_set_gpio_direction(sw->gpio, direction); if (direction)
gpio_direction_input(sw->gpio);
else
gpio_direction_output(sw->gpio, true);
sw->state = gpio_sw_get_state(sw); sw->state = gpio_sw_get_state(sw);
......
...@@ -945,7 +945,7 @@ static int __init brf6150_init(void) ...@@ -945,7 +945,7 @@ static int __init brf6150_init(void)
omap_set_gpio_direction(info->btinfo->reset_gpio, 0); omap_set_gpio_direction(info->btinfo->reset_gpio, 0);
omap_set_gpio_direction(info->btinfo->bt_wakeup_gpio, 0); omap_set_gpio_direction(info->btinfo->bt_wakeup_gpio, 0);
omap_set_gpio_direction(info->btinfo->host_wakeup_gpio, 1); gpio_direction_input(info->btinfo->host_wakeup_gpio);
set_irq_type(OMAP_GPIO_IRQ(info->btinfo->host_wakeup_gpio), IRQ_TYPE_NONE); set_irq_type(OMAP_GPIO_IRQ(info->btinfo->host_wakeup_gpio), IRQ_TYPE_NONE);
switch (info->btinfo->bt_uart) { switch (info->btinfo->bt_uart) {
......
...@@ -854,7 +854,7 @@ static int hci_h4p_probe(struct platform_device *pdev) ...@@ -854,7 +854,7 @@ static int hci_h4p_probe(struct platform_device *pdev)
omap_set_gpio_direction(info->reset_gpio, 0); omap_set_gpio_direction(info->reset_gpio, 0);
omap_set_gpio_direction(info->bt_wakeup_gpio, 0); omap_set_gpio_direction(info->bt_wakeup_gpio, 0);
omap_set_gpio_direction(info->host_wakeup_gpio, 1); gpio_direction_input(info->host_wakeup_gpio);
switch (bt_config->bt_uart) { switch (bt_config->bt_uart) {
case 1: case 1:
......
...@@ -112,7 +112,7 @@ static void _cbus_send_bit(struct cbus_host *host, int bit, int set_to_input) ...@@ -112,7 +112,7 @@ static void _cbus_send_bit(struct cbus_host *host, int bit, int set_to_input)
/* The data bit is read on the rising edge of CLK */ /* The data bit is read on the rising edge of CLK */
if (set_to_input) if (set_to_input)
omap_set_gpio_direction(host->dat_gpio, 1); gpio_direction_input(host->dat_gpio);
gpio_set_value(host->clk_gpio, 0); gpio_set_value(host->clk_gpio, 0);
} }
...@@ -264,7 +264,7 @@ int __init cbus_bus_init(void) ...@@ -264,7 +264,7 @@ int __init cbus_bus_init(void)
gpio_set_value(chost->sel_gpio, 1); gpio_set_value(chost->sel_gpio, 1);
omap_set_gpio_direction(chost->clk_gpio, 0); omap_set_gpio_direction(chost->clk_gpio, 0);
omap_set_gpio_direction(chost->dat_gpio, 1); gpio_direction_input(chost->dat_gpio);
omap_set_gpio_direction(chost->sel_gpio, 0); omap_set_gpio_direction(chost->sel_gpio, 0);
gpio_set_value(chost->clk_gpio, 1); gpio_set_value(chost->clk_gpio, 1);
......
...@@ -341,7 +341,7 @@ static int __devinit retu_probe(struct device *dev) ...@@ -341,7 +341,7 @@ static int __devinit retu_probe(struct device *dev)
} }
/* Set the pin as input */ /* Set the pin as input */
omap_set_gpio_direction(retu_irq_pin, 1); gpio_direction_input(retu_irq_pin);
/* Rising edge triggers the IRQ */ /* Rising edge triggers the IRQ */
set_irq_type(OMAP_GPIO_IRQ(retu_irq_pin), IRQ_TYPE_EDGE_RISING); set_irq_type(OMAP_GPIO_IRQ(retu_irq_pin), IRQ_TYPE_EDGE_RISING);
......
...@@ -328,7 +328,7 @@ static int __devinit tahvo_probe(struct device *dev) ...@@ -328,7 +328,7 @@ static int __devinit tahvo_probe(struct device *dev)
} }
/* Set the pin as input */ /* Set the pin as input */
omap_set_gpio_direction(tahvo_irq_pin, 1); gpio_direction_input(tahvo_irq_pin);
/* Rising edge triggers the IRQ */ /* Rising edge triggers the IRQ */
set_irq_type(OMAP_GPIO_IRQ(tahvo_irq_pin), IRQ_TYPE_EDGE_RISING); set_irq_type(OMAP_GPIO_IRQ(tahvo_irq_pin), IRQ_TYPE_EDGE_RISING);
......
...@@ -97,7 +97,7 @@ static int __init hx_ts_probe(struct omap_ts_t *ts) ...@@ -97,7 +97,7 @@ static int __init hx_ts_probe(struct omap_ts_t *ts)
return -EINVAL; return -EINVAL;
}; };
omap_set_gpio_direction(gpio, 1); gpio_direction_input(gpio);
ts->irq_type = IRQF_TRIGGER_FALLING; ts->irq_type = IRQF_TRIGGER_FALLING;
return 0; return 0;
} }
......
...@@ -540,7 +540,7 @@ static int __devinit tsc2005_ts_init(struct tsc2005 *ts, ...@@ -540,7 +540,7 @@ static int __devinit tsc2005_ts_init(struct tsc2005 *ts,
dev_err(&ts->spi->dev, "unable to get DAV GPIO"); dev_err(&ts->spi->dev, "unable to get DAV GPIO");
goto err1; goto err1;
} }
omap_set_gpio_direction(dav_gpio, 1); gpio_direction_input(dav_gpio);
ts->irq = OMAP_GPIO_IRQ(dav_gpio); ts->irq = OMAP_GPIO_IRQ(dav_gpio);
dev_dbg(&ts->spi->dev, "TSC2005: DAV IRQ = %d\n", ts->irq); dev_dbg(&ts->spi->dev, "TSC2005: DAV IRQ = %d\n", ts->irq);
#endif #endif
......
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