aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/palmte2.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa/palmte2.c')
-rw-r--r--arch/arm/mach-pxa/palmte2.c32
1 files changed, 29 insertions, 3 deletions
diff --git a/arch/arm/mach-pxa/palmte2.c b/arch/arm/mach-pxa/palmte2.c
index 43fcf2e86887..d823b09801df 100644
--- a/arch/arm/mach-pxa/palmte2.c
+++ b/arch/arm/mach-pxa/palmte2.c
@@ -25,6 +25,7 @@
25#include <linux/gpio.h> 25#include <linux/gpio.h>
26#include <linux/wm97xx_batt.h> 26#include <linux/wm97xx_batt.h>
27#include <linux/power_supply.h> 27#include <linux/power_supply.h>
28#include <linux/usb/gpio_vbus.h>
28 29
29#include <asm/mach-types.h> 30#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
@@ -37,6 +38,7 @@
37#include <mach/mfp-pxa25x.h> 38#include <mach/mfp-pxa25x.h>
38#include <mach/irda.h> 39#include <mach/irda.h>
39#include <mach/udc.h> 40#include <mach/udc.h>
41#include <mach/palmasoc.h>
40 42
41#include "generic.h" 43#include "generic.h"
42#include "devices.h" 44#include "devices.h"
@@ -107,6 +109,7 @@ static unsigned long palmte2_pin_config[] __initdata = {
107 GPIO1_RST, /* reset */ 109 GPIO1_RST, /* reset */
108 GPIO4_GPIO, /* Hotsync button */ 110 GPIO4_GPIO, /* Hotsync button */
109 GPIO9_GPIO, /* power detect */ 111 GPIO9_GPIO, /* power detect */
112 GPIO15_GPIO, /* earphone detect */
110 GPIO37_GPIO, /* LCD power */ 113 GPIO37_GPIO, /* LCD power */
111 GPIO56_GPIO, /* Backlight power */ 114 GPIO56_GPIO, /* Backlight power */
112}; 115};
@@ -318,11 +321,18 @@ static struct pxaficp_platform_data palmte2_ficp_platform_data = {
318/****************************************************************************** 321/******************************************************************************
319 * UDC 322 * UDC
320 ******************************************************************************/ 323 ******************************************************************************/
321static struct pxa2xx_udc_mach_info palmte2_udc_info __initdata = { 324static struct gpio_vbus_mach_info palmte2_udc_info = {
322 .gpio_vbus = GPIO_NR_PALMTE2_USB_DETECT_N, 325 .gpio_vbus = GPIO_NR_PALMTE2_USB_DETECT_N,
323 .gpio_vbus_inverted = 1, 326 .gpio_vbus_inverted = 1,
324 .gpio_pullup = GPIO_NR_PALMTE2_USB_PULLUP, 327 .gpio_pullup = GPIO_NR_PALMTE2_USB_PULLUP,
325 .gpio_pullup_inverted = 0, 328};
329
330static struct platform_device palmte2_gpio_vbus = {
331 .name = "gpio-vbus",
332 .id = -1,
333 .dev = {
334 .platform_data = &palmte2_udc_info,
335 },
326}; 336};
327 337
328/****************************************************************************** 338/******************************************************************************
@@ -395,6 +405,21 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = {
395}; 405};
396 406
397/****************************************************************************** 407/******************************************************************************
408 * aSoC audio
409 ******************************************************************************/
410static struct palm27x_asoc_info palmte2_asoc_pdata = {
411 .jack_gpio = GPIO_NR_PALMTE2_EARPHONE_DETECT,
412};
413
414static struct platform_device palmte2_asoc = {
415 .name = "palm27x-asoc",
416 .id = -1,
417 .dev = {
418 .platform_data = &palmte2_asoc_pdata,
419 },
420};
421
422/******************************************************************************
398 * Framebuffer 423 * Framebuffer
399 ******************************************************************************/ 424 ******************************************************************************/
400static struct pxafb_mode_info palmte2_lcd_modes[] = { 425static struct pxafb_mode_info palmte2_lcd_modes[] = {
@@ -429,6 +454,8 @@ static struct platform_device *devices[] __initdata = {
429#endif 454#endif
430 &palmte2_backlight, 455 &palmte2_backlight,
431 &power_supply, 456 &power_supply,
457 &palmte2_asoc,
458 &palmte2_gpio_vbus,
432}; 459};
433 460
434/* setup udc GPIOs initial state */ 461/* setup udc GPIOs initial state */
@@ -447,7 +474,6 @@ static void __init palmte2_init(void)
447 set_pxa_fb_info(&palmte2_lcd_screen); 474 set_pxa_fb_info(&palmte2_lcd_screen);
448 pxa_set_mci_info(&palmte2_mci_platform_data); 475 pxa_set_mci_info(&palmte2_mci_platform_data);
449 palmte2_udc_init(); 476 palmte2_udc_init();
450 pxa_set_udc_info(&palmte2_udc_info);
451 pxa_set_ac97_info(NULL); 477 pxa_set_ac97_info(NULL);
452 pxa_set_ficp_info(&palmte2_ficp_platform_data); 478 pxa_set_ficp_info(&palmte2_ficp_platform_data);
453 wm97xx_bat_set_pdata(&wm97xx_batt_pdata); 479 wm97xx_bat_set_pdata(&wm97xx_batt_pdata);