aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/board-nokia770.c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2008-12-10 20:35:25 -0500
committerTony Lindgren <tony@atomide.com>2008-12-10 20:35:25 -0500
commit0b84b5ca43a9c86cfad848c135fdbf7c72af68fa (patch)
tree9eb6f9cfb74c245bdb68be9c8814778ddc2ff1f4 /arch/arm/mach-omap1/board-nokia770.c
parenta007b7096feea2d865ad3e7177eb8be34041bef9 (diff)
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>
Diffstat (limited to 'arch/arm/mach-omap1/board-nokia770.c')
-rw-r--r--arch/arm/mach-omap1/board-nokia770.c10
1 files changed, 5 insertions, 5 deletions
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 */