From 4651d5566840e911b14a5052f18ed39558677937 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Tue, 12 Apr 2011 11:28:59 -0600 Subject: ARM: Tegra: Rename harmony_audio.h -> tegra_wm8903_pdata.h The audio driver will soon support more than just the Tegra Harmony board. Rename the platform data header file and data type to reflect this. Signed-off-by: Stephen Warren Signed-off-by: Mark Brown --- arch/arm/mach-tegra/board-harmony.c | 4 ++-- arch/arm/mach-tegra/include/mach/harmony_audio.h | 22 ---------------------- .../mach-tegra/include/mach/tegra_wm8903_pdata.h | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+), 24 deletions(-) delete mode 100644 arch/arm/mach-tegra/include/mach/harmony_audio.h create mode 100644 arch/arm/mach-tegra/include/mach/tegra_wm8903_pdata.h (limited to 'arch') diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c index 75c918a86a31..3c6bba25a1e4 100644 --- a/arch/arm/mach-tegra/board-harmony.c +++ b/arch/arm/mach-tegra/board-harmony.c @@ -34,7 +34,7 @@ #include #include -#include +#include #include #include #include @@ -67,7 +67,7 @@ static struct platform_device debug_uart = { }, }; -static struct harmony_audio_platform_data harmony_audio_pdata = { +static struct tegra_wm8903_platform_data harmony_audio_pdata = { .gpio_spkr_en = TEGRA_GPIO_SPKR_EN, .gpio_hp_det = TEGRA_GPIO_HP_DET, .gpio_int_mic_en = TEGRA_GPIO_INT_MIC_EN, diff --git a/arch/arm/mach-tegra/include/mach/harmony_audio.h b/arch/arm/mach-tegra/include/mach/harmony_audio.h deleted file mode 100644 index af086500ab7d..000000000000 --- a/arch/arm/mach-tegra/include/mach/harmony_audio.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * arch/arm/mach-tegra/include/mach/harmony_audio.h - * - * Copyright 2011 NVIDIA, Inc. - * - * This software is licensed under the terms of the GNU General Public - * License version 2, as published by the Free Software Foundation, and - * may be copied, distributed, and modified under those terms. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -struct harmony_audio_platform_data { - int gpio_spkr_en; - int gpio_hp_det; - int gpio_int_mic_en; - int gpio_ext_mic_en; -}; diff --git a/arch/arm/mach-tegra/include/mach/tegra_wm8903_pdata.h b/arch/arm/mach-tegra/include/mach/tegra_wm8903_pdata.h new file mode 100644 index 000000000000..c34bd5eb204e --- /dev/null +++ b/arch/arm/mach-tegra/include/mach/tegra_wm8903_pdata.h @@ -0,0 +1,22 @@ +/* + * arch/arm/mach-tegra/include/mach/tegra_wm8903_pdata.h + * + * Copyright 2011 NVIDIA, Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +struct tegra_wm8903_platform_data { + int gpio_spkr_en; + int gpio_hp_det; + int gpio_int_mic_en; + int gpio_ext_mic_en; +}; -- cgit v1.2.3 From 7b33af252fbbf3beb694448da3ba6687022fd602 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Tue, 12 Apr 2011 11:29:00 -0600 Subject: ASoC: Tegra: Rename pdev tegra-snd-harmony to tegra-snd-wm8903 Soon, this machine driver will be updated to handle a number of Tegra boards using the WM8903 codec. Rename the platform device in advance to reflect this. Signed-off-by: Stephen Warren Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- arch/arm/mach-tegra/board-harmony.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c index 3c6bba25a1e4..987c5e46d581 100644 --- a/arch/arm/mach-tegra/board-harmony.c +++ b/arch/arm/mach-tegra/board-harmony.c @@ -75,7 +75,7 @@ static struct tegra_wm8903_platform_data harmony_audio_pdata = { }; static struct platform_device harmony_audio_device = { - .name = "tegra-snd-harmony", + .name = "tegra-snd-wm8903", .id = 0, .dev = { .platform_data = &harmony_audio_pdata, -- cgit v1.2.3 From 61a6d0764be43e014d265128c2af1b41e0fc96b0 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Tue, 12 Apr 2011 11:29:01 -0600 Subject: ARM: Tegra: Add to tegra_wm8903_platform_data Seaboard derivate Kaen has a GPIO to mute the headphone output. Add a field to tegra_wm8903_platform_data so the board files can pass the GPIO number for that to the ASoC machine driver. Also, initialize this new field to a "not present" value for Harmony. Signed-off-by: Stephen Warren Signed-off-by: Mark Brown --- arch/arm/mach-tegra/board-harmony.c | 1 + arch/arm/mach-tegra/include/mach/tegra_wm8903_pdata.h | 1 + 2 files changed, 2 insertions(+) (limited to 'arch') diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c index 987c5e46d581..30e18bc60647 100644 --- a/arch/arm/mach-tegra/board-harmony.c +++ b/arch/arm/mach-tegra/board-harmony.c @@ -70,6 +70,7 @@ static struct platform_device debug_uart = { static struct tegra_wm8903_platform_data harmony_audio_pdata = { .gpio_spkr_en = TEGRA_GPIO_SPKR_EN, .gpio_hp_det = TEGRA_GPIO_HP_DET, + .gpio_hp_mute = -1, .gpio_int_mic_en = TEGRA_GPIO_INT_MIC_EN, .gpio_ext_mic_en = TEGRA_GPIO_EXT_MIC_EN, }; diff --git a/arch/arm/mach-tegra/include/mach/tegra_wm8903_pdata.h b/arch/arm/mach-tegra/include/mach/tegra_wm8903_pdata.h index c34bd5eb204e..9d293344a7ff 100644 --- a/arch/arm/mach-tegra/include/mach/tegra_wm8903_pdata.h +++ b/arch/arm/mach-tegra/include/mach/tegra_wm8903_pdata.h @@ -17,6 +17,7 @@ struct tegra_wm8903_platform_data { int gpio_spkr_en; int gpio_hp_det; + int gpio_hp_mute; int gpio_int_mic_en; int gpio_ext_mic_en; }; -- cgit v1.2.3 From 47912a657ec2aa52c7af5f5e2ecc4efe41094d44 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Tue, 19 Apr 2011 10:18:01 -0600 Subject: ARM: Tegra: select MACH_HAS_SND_SOC_TEGRA_WM8903 CONFIG_SND_SOC_TEGRA_WM8903 is useful for many Tegra boards. To avoid the ASoC tegra/Kconfig enumerating them all, instead have the Tegra machine Kconfig select MACH_HAS_SND_SOC_TEGRA_WM8903 where appropriate, and have SND_SOC_TEGRA_WM8903 depend on this. [Redid ASoC diff so it applies. -- broonie] Signed-off-by: Stephen Warren Acked-by: Olof Johansson Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- arch/arm/mach-tegra/Kconfig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch') diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig index 3cdeffc97b44..5ec1846aa1d0 100644 --- a/arch/arm/mach-tegra/Kconfig +++ b/arch/arm/mach-tegra/Kconfig @@ -27,12 +27,14 @@ comment "Tegra board type" config MACH_HARMONY bool "Harmony board" + select MACH_HAS_SND_SOC_TEGRA_WM8903 help Support for nVidia Harmony development platform config MACH_KAEN bool "Kaen board" select MACH_SEABOARD + select MACH_HAS_SND_SOC_TEGRA_WM8903 help Support for the Kaen version of Seaboard @@ -43,6 +45,7 @@ config MACH_PAZ00 config MACH_SEABOARD bool "Seaboard board" + select MACH_HAS_SND_SOC_TEGRA_WM8903 help Support for nVidia Seaboard development platform. It will also be included for some of the derivative boards that -- cgit v1.2.3