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.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c
index b58043644a6f..75e32d35afd9 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;
@@ -316,7 +316,6 @@ static void palmte_get_power_status(struct apm_power_info *info, int *battery)
316 316
317static struct omap_board_config_kernel palmte_config[] __initdata = { 317static struct omap_board_config_kernel palmte_config[] __initdata = {
318 { OMAP_TAG_USB, &palmte_usb_config }, 318 { OMAP_TAG_USB, &palmte_usb_config },
319 { OMAP_TAG_MMC, &palmte_mmc_config },
320 { OMAP_TAG_LCD, &palmte_lcd_config }, 319 { OMAP_TAG_LCD, &palmte_lcd_config },
321 { OMAP_TAG_UART, &palmte_uart_config }, 320 { OMAP_TAG_UART, &palmte_uart_config },
322}; 321};
@@ -335,11 +334,11 @@ static void palmte_headphones_detect(void *data, int state)
335{ 334{
336 if (state) { 335 if (state) {
337 /* Headphones connected, disable speaker */ 336 /* Headphones connected, disable speaker */
338 omap_set_gpio_dataout(PALMTE_SPEAKER_GPIO, 0); 337 gpio_set_value(PALMTE_SPEAKER_GPIO, 0);
339 printk(KERN_INFO "PM: speaker off\n"); 338 printk(KERN_INFO "PM: speaker off\n");
340 } else { 339 } else {
341 /* Headphones unplugged, re-enable speaker */ 340 /* Headphones unplugged, re-enable speaker */
342 omap_set_gpio_dataout(PALMTE_SPEAKER_GPIO, 1); 341 gpio_set_value(PALMTE_SPEAKER_GPIO, 1);
343 printk(KERN_INFO "PM: speaker on\n"); 342 printk(KERN_INFO "PM: speaker on\n");
344 } 343 }
345} 344}
@@ -347,18 +346,18 @@ static void palmte_headphones_detect(void *data, int state)
347static void __init palmte_misc_gpio_setup(void) 346static void __init palmte_misc_gpio_setup(void)
348{ 347{
349 /* Set TSC2102 PINTDAV pin as input (used by TSC2102 driver) */ 348 /* Set TSC2102 PINTDAV pin as input (used by TSC2102 driver) */
350 if (omap_request_gpio(PALMTE_PINTDAV_GPIO)) { 349 if (gpio_request(PALMTE_PINTDAV_GPIO, "TSC2102 PINTDAV") < 0) {
351 printk(KERN_ERR "Could not reserve PINTDAV GPIO!\n"); 350 printk(KERN_ERR "Could not reserve PINTDAV GPIO!\n");
352 return; 351 return;
353 } 352 }
354 omap_set_gpio_direction(PALMTE_PINTDAV_GPIO, 1); 353 gpio_direction_input(PALMTE_PINTDAV_GPIO);
355 354
356 /* Set USB-or-DC-IN pin as input (unused) */ 355 /* Set USB-or-DC-IN pin as input (unused) */
357 if (omap_request_gpio(PALMTE_USB_OR_DC_GPIO)) { 356 if (gpio_request(PALMTE_USB_OR_DC_GPIO, "USB/DC-IN") < 0) {
358 printk(KERN_ERR "Could not reserve cable signal GPIO!\n"); 357 printk(KERN_ERR "Could not reserve cable signal GPIO!\n");
359 return; 358 return;
360 } 359 }
361 omap_set_gpio_direction(PALMTE_USB_OR_DC_GPIO, 1); 360 gpio_direction_input(PALMTE_USB_OR_DC_GPIO);
362} 361}
363 362
364static void __init omap_palmte_init(void) 363static void __init omap_palmte_init(void)