Skip to contentSkip to conversation

ARM: Tegra: Harmony: Fix conflicting GPIO numbering

PATCH Superseded Stephen Warren 2 participants 2 messages Apr 11, 2011 – Apr 12, 2011

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: Tegra: Harmony: Fix conflicting GPIO numbering

Currently, both the WM8903 and TPS6586x chips attempt to register with gpiolib using the same GPIO numbers. This causes the audio driver to fail to initialize.

To solve this, add a define to board-harmony.h for the TPS6586x, and make oard-harmony-power.c use this define, instead of directly referencing TEGRA_NR_GPIOS.

This fixes a regression introduced by commit
6f168f2fa60f87e85e0df25e87e2372f22f5eb7c.

---
 arch/arm/mach-tegra/board-harmony-power.c |    4 +++-
 arch/arm/mach-tegra/board-harmony.h       |    3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)
arch/arm/mach-tegra/board-harmony-power.c +3 -1
index c84442c..5ad8b2f 100644
@@ -24,6 +24,8 @@
 
 #include <mach/irqs.h>
 
+#include "board-harmony.h"
+
 #define PMC_CTRL		0x0
 #define PMC_CTRL_INTR_LOW	(1 << 17)
 
@@ -98,7 +100,7 @@ static struct tps6586x_platform_data tps_platform = {
 	.irq_base	= TEGRA_NR_IRQS,
 	.num_subdevs	= ARRAY_SIZE(tps_devs),
 	.subdevs	= tps_devs,
-	.gpio_base	= TEGRA_NR_GPIOS,
+	.gpio_base	= HARMONY_GPIO_TPS6586X(0),
 };
 
 static struct i2c_board_info __initdata harmony_regulators[] = {
arch/arm/mach-tegra/board-harmony.h +2 -1
index 1e57b07..d85142e 100644
@@ -17,7 +17,8 @@
 #ifndef _MACH_TEGRA_BOARD_HARMONY_H
 #define _MACH_TEGRA_BOARD_HARMONY_H
 
-#define HARMONY_GPIO_WM8903(_x_)	(TEGRA_NR_GPIOS + (_x_))
+#define HARMONY_GPIO_TPS6586X(_x_)	(TEGRA_NR_GPIOS + (_x_))
+#define HARMONY_GPIO_WM8903(_x_)	(HARMONY_GPIO_TPS6586X(4) + (_x_))
 
 #define TEGRA_GPIO_SD2_CD		TEGRA_GPIO_PI5
 #define TEGRA_GPIO_SD2_WP		TEGRA_GPIO_PH1
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 ARM: Tegra: Harmony: Fix conflicting GPIO numbering

Hello.

Quoted 10 lines · Stephen Warren

Currently, both the WM8903 and TPS6586x chips attempt to register with gpiolib using the same GPIO numbers. This causes the audio driver to fail to initialize.

To solve this, add a define to board-harmony.h for the TPS6586x, and make oard-harmony-power.c use this define, instead of directly referencing TEGRA_NR_GPIOS.

This fixes a regression introduced by commit
6f168f2fa60f87e85e0df25e87e2372f22f5eb7c.

Please specify the commit's summary in parens -- for the human readers.

Quoted 1 line

WBR, Sergei