Skip to content

Commit

Permalink
ARM: OMAP: sdp3430: Audio support via the common omap-twl4030 machine…
Browse files Browse the repository at this point in the history
… driver

Use the common omap-twl4030 ASoC machine driver for audio.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
  • Loading branch information
Peter Ujfalusi committed Jan 22, 2013
1 parent c591393 commit 77f8614
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions arch/arm/mach-omap2/board-3430sdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <linux/gpio.h>
#include <linux/mmc/host.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
#include <linux/platform_data/omap-twl4030.h>

#include <asm/mach-types.h>
#include <asm/mach/arch.h>
Expand Down Expand Up @@ -209,6 +210,19 @@ static struct omap2_hsmmc_info mmc[] = {
{} /* Terminator */
};

static struct omap_tw4030_pdata omap_twl4030_audio_data = {
.voice_connected = true,
.custom_routing = true,

.has_hs = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT,
.has_hf = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT,

.has_mainmic = true,
.has_submic = true,
.has_hsmic = true,
.has_linein = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT,
};

static int sdp3430_twl_gpio_setup(struct device *dev,
unsigned gpio, unsigned ngpio)
{
Expand All @@ -225,6 +239,9 @@ static int sdp3430_twl_gpio_setup(struct device *dev,
/* gpio + 15 is "sub_lcd_nRST" (output) */
gpio_request_one(gpio + 15, GPIOF_OUT_INIT_LOW, "sub_lcd_nRST");

omap_twl4030_audio_data.jack_detect = gpio + 2;
omap_twl4030_audio_init("SDP3430", &omap_twl4030_audio_data);

return 0;
}

Expand Down

0 comments on commit 77f8614

Please sign in to comment.