| Index: arch/arm/mach-tegra/board-harmony.c
|
| diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c
|
| index ecf065fa2680d16e317fe652ec2875626b60e9c6..d764b9435fea10da5fdb6b79b8cfbec27e418f85 100644
|
| --- a/arch/arm/mach-tegra/board-harmony.c
|
| +++ b/arch/arm/mach-tegra/board-harmony.c
|
| @@ -29,15 +29,19 @@
|
| #include <linux/delay.h>
|
| #include <linux/tegra_usb.h>
|
|
|
| +#include <sound/wm8903.h>
|
| +
|
| #include <asm/mach-types.h>
|
| #include <asm/mach/arch.h>
|
| #include <asm/mach/time.h>
|
| #include <asm/setup.h>
|
|
|
| +#include <mach/harmony_audio.h>
|
| #include <mach/iomap.h>
|
| #include <mach/irqs.h>
|
| #include <mach/nand.h>
|
| #include <mach/clk.h>
|
| +#include <mach/gpio.h>
|
| #include <mach/usb_phy.h>
|
| #include <mach/suspend.h>
|
|
|
| @@ -45,6 +49,7 @@
|
| #include "board.h"
|
| #include "board-harmony.h"
|
| #include "devices.h"
|
| +#include "gpio-names.h"
|
|
|
| /* NVidia bootloader tags */
|
| #define ATAG_NVIDIA 0x41000801
|
| @@ -220,9 +225,25 @@ static struct tegra_i2c_platform_data harmony_dvc_platform_data = {
|
| .is_dvc = true,
|
| };
|
|
|
| +static struct wm8903_platform_data wm8903_pdata = {
|
| + .irq_active_low = 0,
|
| + .micdet_cfg = 0,
|
| + .micdet_delay = 100,
|
| + .gpio_base = GPIO_WM8903(0),
|
| + .gpio_cfg = {
|
| + WM8903_GPIO_NO_CONFIG,
|
| + WM8903_GPIO_NO_CONFIG,
|
| + 0,
|
| + WM8903_GPIO_NO_CONFIG,
|
| + WM8903_GPIO_NO_CONFIG,
|
| + },
|
| +};
|
| +
|
| static struct i2c_board_info __initdata harmony_i2c_bus1_board_info[] = {
|
| {
|
| I2C_BOARD_INFO("wm8903", 0x1a),
|
| + .platform_data = &wm8903_pdata,
|
| + .irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_PX3),
|
| },
|
| };
|
|
|
| @@ -242,6 +263,21 @@ static void harmony_i2c_init(void)
|
| ARRAY_SIZE(harmony_i2c_bus1_board_info));
|
| }
|
|
|
| +static struct harmony_audio_platform_data audio_pdata = {
|
| + .gpio_spkr_en = GPIO_WM8903(2),
|
| + .gpio_hp_det = TEGRA_GPIO_PW2,
|
| + .gpio_int_mic_en = TEGRA_GPIO_PX0,
|
| + .gpio_ext_mic_en = TEGRA_GPIO_PX1,
|
| +};
|
| +
|
| +static struct platform_device audio_device = {
|
| + .name = "tegra-snd-harmony",
|
| + .id = 0,
|
| + .dev = {
|
| + .platform_data = &audio_pdata,
|
| + },
|
| +};
|
| +
|
| static struct platform_device *harmony_devices[] __initdata = {
|
| &debug_uart,
|
| &pmu_device,
|
| @@ -257,6 +293,7 @@ static struct platform_device *harmony_devices[] __initdata = {
|
| &tegra_i2s_device1,
|
| &tegra_das_device,
|
| &tegra_pcm_device,
|
| + &audio_device,
|
| &tegra_avp_device,
|
| };
|
|
|
| @@ -384,6 +421,11 @@ static void __init tegra_harmony_init(void)
|
|
|
| tegra_ehci3_device.dev.platform_data = &tegra_ehci_pdata;
|
|
|
| + tegra_gpio_enable(audio_pdata.gpio_hp_det);
|
| + tegra_gpio_enable(audio_pdata.gpio_int_mic_en);
|
| + tegra_gpio_enable(audio_pdata.gpio_ext_mic_en);
|
| + tegra_gpio_enable(TEGRA_IRQ_TO_GPIO(harmony_i2c_bus1_board_info[0].irq));
|
| +
|
| platform_add_devices(harmony_devices, ARRAY_SIZE(harmony_devices));
|
|
|
| harmony_panel_init();
|
|
|