Skip to content

Commit f2a4d8a

Browse files
nvswarrencolincross
authored andcommitted
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 board-harmony-power.c use this define, instead of directly referencing TEGRA_NR_GPIOS. This fixes a regression introduced by commit 6f168f2. ARM: tegra: harmony: initialize the TPS65862 PMIC Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Colin Cross <ccross@android.com>
1 parent 55922c9 commit f2a4d8a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

arch/arm/mach-tegra/board-harmony-power.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
#include <mach/irqs.h>
2626

27+
#include "board-harmony.h"
28+
2729
#define PMC_CTRL 0x0
2830
#define PMC_CTRL_INTR_LOW (1 << 17)
2931

@@ -98,7 +100,7 @@ static struct tps6586x_platform_data tps_platform = {
98100
.irq_base = TEGRA_NR_IRQS,
99101
.num_subdevs = ARRAY_SIZE(tps_devs),
100102
.subdevs = tps_devs,
101-
.gpio_base = TEGRA_NR_GPIOS,
103+
.gpio_base = HARMONY_GPIO_TPS6586X(0),
102104
};
103105

104106
static struct i2c_board_info __initdata harmony_regulators[] = {

arch/arm/mach-tegra/board-harmony.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
#ifndef _MACH_TEGRA_BOARD_HARMONY_H
1818
#define _MACH_TEGRA_BOARD_HARMONY_H
1919

20-
#define HARMONY_GPIO_WM8903(_x_) (TEGRA_NR_GPIOS + (_x_))
20+
#define HARMONY_GPIO_TPS6586X(_x_) (TEGRA_NR_GPIOS + (_x_))
21+
#define HARMONY_GPIO_WM8903(_x_) (HARMONY_GPIO_TPS6586X(4) + (_x_))
2122

2223
#define TEGRA_GPIO_SD2_CD TEGRA_GPIO_PI5
2324
#define TEGRA_GPIO_SD2_WP TEGRA_GPIO_PH1

0 commit comments

Comments
 (0)