]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
use gpio_direction_input (OMAP tree only)
authorDavid Brownell <dbrownell@users.sourceforge.net>
Thu, 30 Oct 2008 03:41:17 +0000 (20:41 -0700)
committerTony Lindgren <tony@atomide.com>
Thu, 13 Nov 2008 21:12:33 +0000 (13:12 -0800)
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: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
13 files changed:
arch/arm/mach-omap2/board-2430sdp.c
arch/arm/mach-omap2/board-3430sdp.c
arch/arm/mach-omap2/board-apollon.c
arch/arm/mach-omap2/board-ldp.c
arch/arm/mach-omap2/board-omap3evm.c
arch/arm/plat-omap/gpio-switch.c
drivers/bluetooth/brf6150.c
drivers/bluetooth/hci_h4p/core.c
drivers/cbus/cbus.c
drivers/cbus/retu.c
drivers/cbus/tahvo.c
drivers/input/touchscreen/omap/ts_hx.c
drivers/input/touchscreen/tsc2005.c

index 0ca8875e8caebb676888553432cce8ed66454a50..f288941cd5516b423b7f88e75a710957a42b4d49 100644 (file)
@@ -219,7 +219,7 @@ static void ads7846_dev_init(void)
        if (omap_request_gpio(TS_GPIO) < 0)
                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_time(TS_GPIO, 0xa);
index eb53d56f0b96956a943ae346e53976189f9c7892..2ef8754d4771527eedc01177a0f451d3a7b5fa9b 100644 (file)
@@ -171,7 +171,7 @@ static void ads7846_dev_init(void)
                return;
        }
 
-       omap_set_gpio_direction(ts_gpio, 1);
+       gpio_direction_input(ts_gpio);
 
        omap_set_gpio_debounce(ts_gpio, 1);
        omap_set_gpio_debounce_time(ts_gpio, 0xa);
@@ -279,7 +279,7 @@ static inline void __init sdp3430_init_smc91x(void)
                        eth_gpio);
                return;
        }
-       omap_set_gpio_direction(eth_gpio, 1);
+       gpio_direction_input(eth_gpio);
 }
 
 static void __init omap_3430sdp_init_irq(void)
index 1f3af4825e7f1b85ea1ac9e59b41a34e3e644502..b8d5a537c3fb5b4fd47b2d6e540a884ab6ad0b6b 100644 (file)
@@ -314,7 +314,7 @@ static inline void __init apollon_init_smc91x(void)
                gpmc_cs_free(eth_cs);
                goto out;
        }
-       omap_set_gpio_direction(APOLLON_ETHR_GPIO_IRQ, 1);
+       gpio_direction_input(APOLLON_ETHR_GPIO_IRQ);
 
 out:
        clk_disable(gpmc_fck);
index b2574dfeb5226d54ac36b9df1b89a2219801aec4..42d57fa9a43c62320afdfa7fa74125ce70f3ac75 100644 (file)
@@ -102,7 +102,7 @@ static void ads7846_dev_init(void)
                return;
        }
 
-       omap_set_gpio_direction(ts_gpio, 1);
+       gpio_direction_input(ts_gpio);
 
        omap_set_gpio_debounce(ts_gpio, 1);
        omap_set_gpio_debounce_time(ts_gpio, 0xa);
index 03d900a7c7a918ec8927daa7eeae932afbb31164..bc44cb5a4e63a3581cbea2ef497980efd14c27d4 100644 (file)
@@ -83,7 +83,7 @@ static inline void __init omap3evm_init_smc911x(void)
                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 = {
@@ -176,7 +176,7 @@ static void ads7846_dev_init(void)
        if (omap_request_gpio(OMAP3_EVM_TS_GPIO) < 0)
                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_time(OMAP3_EVM_TS_GPIO, 0xa);
index f74d0cef8a9cd8f411754af4aaff1fddb3738ab8..89812ea3adfa1a68cc57a503dbb7de0d30d87a14 100644 (file)
@@ -286,7 +286,10 @@ static int __init new_switch(struct gpio_switch *sw)
 
        /* input: 1, output: 0 */
        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);
 
index b87955630b7ff4d3a97a154335ebaf4a2602f51d..baddb8a6357aa93dac278d2bc4f019bd20665d26 100644 (file)
@@ -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->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);
 
        switch (info->btinfo->bt_uart) {
index e0681d84d26aa92c9dc7ea7124a4965a6d10e8e7..4c97c76c61294927d74a46cc6230c8b3315f2576 100644 (file)
@@ -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->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) {
        case 1:
index de3440944a942fb59504a01726ee9e38ed6ba324..f373799135b5f2f658da1dc77653b2b6a87fc654 100644 (file)
@@ -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 */
        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);
 }
@@ -264,7 +264,7 @@ int __init cbus_bus_init(void)
        gpio_set_value(chost->sel_gpio, 1);
 
        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);
 
        gpio_set_value(chost->clk_gpio, 1);
index d94110b8a0bd68ff921481bf6709b00b258bad4b..981bbe1700303f4729536c000422f6fcb38e880a 100644 (file)
@@ -341,7 +341,7 @@ static int __devinit retu_probe(struct device *dev)
        }
 
        /* Set the pin as input */
-       omap_set_gpio_direction(retu_irq_pin, 1);
+       gpio_direction_input(retu_irq_pin);
 
        /* Rising edge triggers the IRQ */
        set_irq_type(OMAP_GPIO_IRQ(retu_irq_pin), IRQ_TYPE_EDGE_RISING);
index 5876b684662eda7bc5f53659fc12502e0a4ab305..68236d1d04dea569f80aacde04b20badfb686882 100644 (file)
@@ -328,7 +328,7 @@ static int __devinit tahvo_probe(struct device *dev)
        }
 
        /* Set the pin as input */
-       omap_set_gpio_direction(tahvo_irq_pin, 1);
+       gpio_direction_input(tahvo_irq_pin);
 
        /* Rising edge triggers the IRQ */
        set_irq_type(OMAP_GPIO_IRQ(tahvo_irq_pin), IRQ_TYPE_EDGE_RISING);
index 9f82f5afc21f74d3ced5492bf2212c08da21f8ba..a536e306efd2444c89fba1924602613e4601c403 100644 (file)
@@ -97,7 +97,7 @@ static int __init hx_ts_probe(struct omap_ts_t *ts)
                return -EINVAL;
        };
 
-       omap_set_gpio_direction(gpio, 1);
+       gpio_direction_input(gpio);
        ts->irq_type = IRQF_TRIGGER_FALLING;
        return 0;
 }
index 7fb107ec69ef305bbba86465bc27d106826ed1e4..69213a47188da981055fda97476c402068d76047 100644 (file)
@@ -540,7 +540,7 @@ static int __devinit tsc2005_ts_init(struct tsc2005 *ts,
                dev_err(&ts->spi->dev, "unable to get DAV GPIO");
                goto err1;
        }
-       omap_set_gpio_direction(dav_gpio, 1);
+       gpio_direction_input(dav_gpio);
        ts->irq = OMAP_GPIO_IRQ(dav_gpio);
        dev_dbg(&ts->spi->dev, "TSC2005: DAV IRQ = %d\n", ts->irq);
 #endif