X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Farm%2Fmach-pxa%2Fpalmte2.c;h=d823b09801df5865c1b279233fc2d04a0ee49b43;hb=b7c142dbf1e7422d0be7f7faa3f1163ad9da9788;hp=43fcf2e868875cd17bb738f1df1ca0a6a6ea9813;hpb=b97bedcdedb4ae95b2128a4770dfc160e113b174;p=pandora-kernel.git 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 @@ #include #include #include +#include #include #include @@ -37,6 +38,7 @@ #include #include #include +#include #include "generic.h" #include "devices.h" @@ -107,6 +109,7 @@ static unsigned long palmte2_pin_config[] __initdata = { GPIO1_RST, /* reset */ GPIO4_GPIO, /* Hotsync button */ GPIO9_GPIO, /* power detect */ + GPIO15_GPIO, /* earphone detect */ GPIO37_GPIO, /* LCD power */ GPIO56_GPIO, /* Backlight power */ }; @@ -318,11 +321,18 @@ static struct pxaficp_platform_data palmte2_ficp_platform_data = { /****************************************************************************** * UDC ******************************************************************************/ -static struct pxa2xx_udc_mach_info palmte2_udc_info __initdata = { +static struct gpio_vbus_mach_info palmte2_udc_info = { .gpio_vbus = GPIO_NR_PALMTE2_USB_DETECT_N, .gpio_vbus_inverted = 1, .gpio_pullup = GPIO_NR_PALMTE2_USB_PULLUP, - .gpio_pullup_inverted = 0, +}; + +static struct platform_device palmte2_gpio_vbus = { + .name = "gpio-vbus", + .id = -1, + .dev = { + .platform_data = &palmte2_udc_info, + }, }; /****************************************************************************** @@ -394,6 +404,21 @@ static struct wm97xx_batt_info wm97xx_batt_pdata = { .batt_name = "main-batt", }; +/****************************************************************************** + * aSoC audio + ******************************************************************************/ +static struct palm27x_asoc_info palmte2_asoc_pdata = { + .jack_gpio = GPIO_NR_PALMTE2_EARPHONE_DETECT, +}; + +static struct platform_device palmte2_asoc = { + .name = "palm27x-asoc", + .id = -1, + .dev = { + .platform_data = &palmte2_asoc_pdata, + }, +}; + /****************************************************************************** * Framebuffer ******************************************************************************/ @@ -429,6 +454,8 @@ static struct platform_device *devices[] __initdata = { #endif &palmte2_backlight, &power_supply, + &palmte2_asoc, + &palmte2_gpio_vbus, }; /* setup udc GPIOs initial state */ @@ -447,7 +474,6 @@ static void __init palmte2_init(void) set_pxa_fb_info(&palmte2_lcd_screen); pxa_set_mci_info(&palmte2_mci_platform_data); palmte2_udc_init(); - pxa_set_udc_info(&palmte2_udc_info); pxa_set_ac97_info(NULL); pxa_set_ficp_info(&palmte2_ficp_platform_data); wm97xx_bat_set_pdata(&wm97xx_batt_pdata);