aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/board-palmte.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap1/board-palmte.c')
-rw-r--r--arch/arm/mach-omap1/board-palmte.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c
index b58043644a6..4141e3917d7 100644
--- a/arch/arm/mach-omap1/board-palmte.c
+++ b/arch/arm/mach-omap1/board-palmte.c
@@ -255,7 +255,7 @@ static void palmte_get_power_status(struct apm_power_info *info, int *battery)
255{ 255{
256 int charging, batt, hi, lo, mid; 256 int charging, batt, hi, lo, mid;
257 257
258 charging = !omap_get_gpio_datain(PALMTE_DC_GPIO); 258 charging = !gpio_get_value(PALMTE_DC_GPIO);
259 batt = battery[0]; 259 batt = battery[0];
260 if (charging) 260 if (charging)
261 batt -= 60; 261 batt -= 60;
@@ -335,11 +335,11 @@ static void palmte_headphones_detect(void *data, int state)
335{ 335{
336 if (state) { 336 if (state) {
337 /* Headphones connected, disable speaker */ 337 /* Headphones connected, disable speaker */
338 omap_set_gpio_dataout(PALMTE_SPEAKER_GPIO, 0); 338 gpio_set_value(PALMTE_SPEAKER_GPIO, 0);
339 printk(KERN_INFO "PM: speaker off\n"); 339 printk(KERN_INFO "PM: speaker off\n");
340 } else { 340 } else {
341 /* Headphones unplugged, re-enable speaker */ 341 /* Headphones unplugged, re-enable speaker */
342 omap_set_gpio_dataout(PALMTE_SPEAKER_GPIO, 1); 342 gpio_set_value(PALMTE_SPEAKER_GPIO, 1);
343 printk(KERN_INFO "PM: speaker on\n"); 343 printk(KERN_INFO "PM: speaker on\n");
344 } 344 }
345} 345}
@@ -347,18 +347,18 @@ static void palmte_headphones_detect(void *data, int state)
347static void __init palmte_misc_gpio_setup(void) 347static void __init palmte_misc_gpio_setup(void)
348{ 348{
349 /* Set TSC2102 PINTDAV pin as input (used by TSC2102 driver) */ 349 /* Set TSC2102 PINTDAV pin as input (used by TSC2102 driver) */
350 if (omap_request_gpio(PALMTE_PINTDAV_GPIO)) { 350 if (gpio_request(PALMTE_PINTDAV_GPIO, "TSC2102 PINTDAV") < 0) {
351 printk(KERN_ERR "Could not reserve PINTDAV GPIO!\n"); 351 printk(KERN_ERR "Could not reserve PINTDAV GPIO!\n");
352 return; 352 return;
353 } 353 }
354 omap_set_gpio_direction(PALMTE_PINTDAV_GPIO, 1); 354 gpio_direction_input(PALMTE_PINTDAV_GPIO);
355 355
356 /* Set USB-or-DC-IN pin as input (unused) */ 356 /* Set USB-or-DC-IN pin as input (unused) */
357 if (omap_request_gpio(PALMTE_USB_OR_DC_GPIO)) { 357 if (gpio_request(PALMTE_USB_OR_DC_GPIO, "USB/DC-IN") < 0) {
358 printk(KERN_ERR "Could not reserve cable signal GPIO!\n"); 358 printk(KERN_ERR "Could not reserve cable signal GPIO!\n");
359 return; 359 return;
360 } 360 }
361 omap_set_gpio_direction(PALMTE_USB_OR_DC_GPIO, 1); 361 gpio_direction_input(PALMTE_USB_OR_DC_GPIO);
362} 362}
363 363
364static void __init omap_palmte_init(void) 364static void __init omap_palmte_init(void)