aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/spitz.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/spitz.c')
-rw-r--r--arch/arm/mach-pxa/spitz.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 8c61ddac119e..5a45fe340a10 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -299,12 +299,22 @@ static struct pxa2xx_spi_master spitz_spi_info = {
299 .num_chipselect = 3, 299 .num_chipselect = 3,
300}; 300};
301 301
302static void spitz_wait_for_hsync(void)
303{
304 while (gpio_get_value(SPITZ_GPIO_HSYNC))
305 cpu_relax();
306
307 while (!gpio_get_value(SPITZ_GPIO_HSYNC))
308 cpu_relax();
309}
310
302static struct ads7846_platform_data spitz_ads7846_info = { 311static struct ads7846_platform_data spitz_ads7846_info = {
303 .model = 7846, 312 .model = 7846,
304 .vref_delay_usecs = 100, 313 .vref_delay_usecs = 100,
305 .x_plate_ohms = 419, 314 .x_plate_ohms = 419,
306 .y_plate_ohms = 486, 315 .y_plate_ohms = 486,
307 .gpio_pendown = SPITZ_GPIO_TP_INT, 316 .gpio_pendown = SPITZ_GPIO_TP_INT,
317 .wait_for_sync = spitz_wait_for_hsync,
308}; 318};
309 319
310static void spitz_ads7846_cs(u32 command) 320static void spitz_ads7846_cs(u32 command)
@@ -521,9 +531,15 @@ static int spitz_ohci_init(struct device *dev)
521 return gpio_direction_output(SPITZ_GPIO_USB_HOST, 1); 531 return gpio_direction_output(SPITZ_GPIO_USB_HOST, 1);
522} 532}
523 533
534static void spitz_ohci_exit(struct device *dev)
535{
536 gpio_free(SPITZ_GPIO_USB_HOST);
537}
538
524static struct pxaohci_platform_data spitz_ohci_platform_data = { 539static struct pxaohci_platform_data spitz_ohci_platform_data = {
525 .port_mode = PMM_NPS_MODE, 540 .port_mode = PMM_NPS_MODE,
526 .init = spitz_ohci_init, 541 .init = spitz_ohci_init,
542 .exit = spitz_ohci_exit,
527 .flags = ENABLE_PORT_ALL | NO_OC_PROTECTION, 543 .flags = ENABLE_PORT_ALL | NO_OC_PROTECTION,
528 .power_budget = 150, 544 .power_budget = 150,
529}; 545};
@@ -721,7 +737,7 @@ static void spitz_restart(char mode, const char *cmd)
721 737
722static void __init common_init(void) 738static void __init common_init(void)
723{ 739{
724 init_gpio_reset(SPITZ_GPIO_ON_RESET, 1); 740 init_gpio_reset(SPITZ_GPIO_ON_RESET, 1, 0);
725 pm_power_off = spitz_poweroff; 741 pm_power_off = spitz_poweroff;
726 arm_pm_restart = spitz_restart; 742 arm_pm_restart = spitz_restart;
727 743