ARM: OMAP: switch to standard gpio get/set calls

This patch replaces some legacy OMAP GPIO calls with the "new" (not
really, any more!) calls that work on most platforms.

The calls addressed by this patch are the simple ones to get and set
values ... for code that's in mainline, including the implementations
of those calls.

Except for the declarations and definitions of those calls, all of
these changes were performed by a simple SED script.  Plus, a few
"if() set() else set()" branches were merged by hand.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
David Brownell
2008-12-10 17:35:25 -08:00
gecommit door Tony Lindgren
bovenliggende a007b7096f
commit 0b84b5ca43
17 gewijzigde bestanden met toevoegingen van 48 en 68 verwijderingen

Bestand weergeven

@@ -239,7 +239,7 @@ static struct platform_device *devices[] __initdata = {
static int
palmz71_get_pendown_state(void)
{
return !omap_get_gpio_datain(PALMZ71_PENIRQ_GPIO);
return !gpio_get_value(PALMZ71_PENIRQ_GPIO);
}
static const struct ads7846_platform_data palmz71_ts_info = {
@@ -295,7 +295,7 @@ static struct omap_board_config_kernel palmz71_config[] __initdata = {
static irqreturn_t
palmz71_powercable(int irq, void *dev_id)
{
if (omap_get_gpio_datain(PALMZ71_USBDETECT_GPIO)) {
if (gpio_get_value(PALMZ71_USBDETECT_GPIO)) {
printk(KERN_INFO "PM: Power cable connected\n");
set_irq_type(OMAP_GPIO_IRQ(PALMZ71_USBDETECT_GPIO),
IRQ_TYPE_EDGE_FALLING);
@@ -323,7 +323,7 @@ palmz71_gpio_setup(int early)
{
if (early) {
/* Only set GPIO1 so we have a working serial */
omap_set_gpio_dataout(1, 1);
gpio_set_value(1, 1);
omap_set_gpio_direction(1, 0);
} else {
/* Set MMC/SD host WP pin as input */