Skip to contentSkip to conversation

ARM: tegra: Enable the headphone detection gpio on PAZ00 board.

PATCH In review Leon Romanovsky 3 participants 3 messages Jan 25, 2012 – Jan 26, 2012 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 2/3 ARM: tegra: Enable the headphone detection gpio on PAZ00 board.

---
 arch/arm/mach-tegra/board-paz00-pinmux.c |    1 +
 arch/arm/mach-tegra/board-paz00.h        |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)
arch/arm/mach-tegra/board-paz00-pinmux.c +1 -0
index c775572..4e261d3 100644
@@ -152,6 +152,7 @@ static struct tegra_gpio_table gpio_table[] = {
 	{ .gpio = TEGRA_WIFI_PWRN,	.enable = true },
 	{ .gpio = TEGRA_WIFI_RST,	.enable = true },
 	{ .gpio = TEGRA_WIFI_LED,	.enable = true },
+	{ .gpio = TEGRA_HP_DET,		.enable = true },
 };
 
 static struct tegra_board_pinmux_conf conf = {
arch/arm/mach-tegra/board-paz00.h +3 -0
index ffa83f5..77c8d83 100644
@@ -32,6 +32,9 @@
 #define TEGRA_WIFI_RST			TEGRA_GPIO_PD1
 #define TEGRA_WIFI_LED			TEGRA_GPIO_PD0
 
+/* Audio */
+#define TEGRA_HP_DET           TEGRA_GPIO_PW2
+
 /* WakeUp */
 #define TEGRA_GPIO_POWERKEY	TEGRA_GPIO_PJ7
 
Signature · 1 line
1.7.3.4
#1 lore raw

Leon Romanovsky wrote at Wednesday, January 25, 2012 11:50 AM:

Quoted 3 lines
arch/arm/mach-tegra/board-paz00-pinmux.c +0 -0

...

Quoted 1 line
arch/arm/mach-tegra/board-paz00-pinmux.c +0 -0
@@ -152,6 +152,7 @@ static struct tegra_gpio_table gpio_table[] = {

...

arch/arm/mach-tegra/board-paz00-pinmux.c static struct tegra_gpio_table gpio_table[] = { · line 155

Quoted 1 line
arch/arm/mach-tegra/board-paz00-pinmux.c +1 -0
+	{ .gpio = TEGRA_HP_DET,		.enable = true },

There's no need to do this at all if you're only supporting audio when booting use device tree. If you intend for audio to work when booting using a board file, then the previous patch needs a bunch of rework to make some of the code conditional on device tree; the same structure as tegra_wm8903.c uses.

Talking of which, in the previous patch, you can remove a number of things from tegra_alc5632.c if you are only supporting device tree, like the DAPM route map, since that's parsed from device tree now.

Signature · 1 line
nvpublic

A message that is not in the archive (sent off-list or not yet received): 74CDBE0F657A3D45AFBB94109FB122FF178CB821B4-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org

#3 lore raw
Quoted 15 lines · Stephen Warren

Leon Romanovsky wrote at Wednesday, January 25, 2012 11:50 AM:

Quoted 3 lines
arch/arm/mach-tegra/board-paz00-pinmux.c +0 -0

...

Quoted 1 line
arch/arm/mach-tegra/board-paz00-pinmux.c +0 -0
@@ -152,6 +152,7 @@ static struct tegra_gpio_table gpio_table[] = {

...

Quoted 1 line

+     { .gpio = TEGRA_HP_DET,         .enable = true },

There's no need to do this at all if you're only supporting audio when booting use device tree. If you intend for audio to work when booting using a board file, then the previous patch needs a bunch of rework to make some of the code conditional on device tree; the same structure as tegra_wm8903.c uses.

Quoted 3 lines

Talking of which, in the previous patch, you can remove a number of things from tegra_alc5632.c if you are only supporting device tree, like the DAPM route map, since that's parsed from device tree now.

Thanks for the input
As you mentioned we are going support only device tree.

Quoted 4 lines

--
nvpublic

Signature · 2 lines
Leon Romanovsky | Independent Linux Consultant
        www.leon.nu | leon-2ukJVAZIZ/[email protected]