Skip to contentSkip to conversation

arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h

PATCH In review Stephen Warren 4 participants 12 messages Sep 21, 2011 – Sep 22, 2011

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

PATCH 1/3 arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h

This centralizes all GPIO naming in one header.

---
This patch series relies on various previous changes to the Tegra GPIO driver that were made in Russell's GPIO tree. I assume this series will go in through that tree.

This first patch is cleanup which makes the second slightly cleaner (no need to edit board-harmony-pcie.c in patch 2). Usually, it would go in through the Tegra tree, but I think it makes sense to merge these 3 patches all together in one place.

 arch/arm/mach-tegra/board-harmony-pcie.c |   10 ++++------
 arch/arm/mach-tegra/board-harmony.h      |    1 +
 2 files changed, 5 insertions(+), 6 deletions(-)
arch/arm/mach-tegra/board-harmony-pcie.c +4 -6
index 9c27b95..6db7d69 100644
@@ -24,12 +24,10 @@
 
 #include <mach/pinmux.h>
 #include "board.h"
+#include "board-harmony.h"
 
 #ifdef CONFIG_TEGRA_PCI
 
-/* GPIO 3 of the PMIC */
-#define EN_VDD_1V05_GPIO	(TEGRA_NR_GPIOS + 2)
-
 static int __init harmony_pcie_init(void)
 {
 	struct regulator *regulator = NULL;
@@ -38,11 +36,11 @@ static int __init harmony_pcie_init(void)
 	if (!machine_is_harmony())
 		return 0;
 
-	err = gpio_request(EN_VDD_1V05_GPIO, "EN_VDD_1V05");
+	err = gpio_request(TEGRA_GPIO_EN_VDD_1V05_GPIO, "EN_VDD_1V05");
 	if (err)
 		return err;
 
-	gpio_direction_output(EN_VDD_1V05_GPIO, 1);
+	gpio_direction_output(TEGRA_GPIO_EN_VDD_1V05_GPIO, 1);
 
 	regulator = regulator_get(NULL, "pex_clk");
 	if (IS_ERR_OR_NULL(regulator))
@@ -68,7 +66,7 @@ err_pcie:
 	regulator_disable(regulator);
 	regulator_put(regulator);
 err_reg:
-	gpio_free(EN_VDD_1V05_GPIO);
+	gpio_free(TEGRA_GPIO_EN_VDD_1V05_GPIO);
 
 	return err;
 }
arch/arm/mach-tegra/board-harmony.h +1 -0
index d85142e..280d203 100644
@@ -31,6 +31,7 @@
 #define TEGRA_GPIO_HP_DET		TEGRA_GPIO_PW2
 #define TEGRA_GPIO_INT_MIC_EN		TEGRA_GPIO_PX0
 #define TEGRA_GPIO_EXT_MIC_EN		TEGRA_GPIO_PX1
+#define TEGRA_GPIO_EN_VDD_1V05_GPIO	HARMONY_GPIO_TPS6586X(2)
 
 void harmony_pinmux_init(void);
 int harmony_regulator_init(void);
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 2/3 arm/tegra: Replace <mach/gpio.h> with <mach/gpio-tegra.h>

This will eventually allow <mach/gpio.h> to be deleted. This mirrors LinusW's recent equivalent work on various other ARM platforms.

---
 arch/arm/mach-tegra/board-harmony.h           |    2 +
 arch/arm/mach-tegra/board-paz00.h             |    2 +
 arch/arm/mach-tegra/board-seaboard.h          |    2 +
 arch/arm/mach-tegra/board-trimslice.h         |    2 +
 arch/arm/mach-tegra/include/mach/gpio-tegra.h |   39 +++++++++++++++++++++++++
 arch/arm/mach-tegra/include/mach/gpio.h       |   39 -------------------------
 arch/arm/mach-tegra/usb_phy.c                 |    1 +
 drivers/gpio/gpio-tegra.c                     |    1 +
 drivers/mmc/host/sdhci-tegra.c                |    2 +
 9 files changed, 51 insertions(+), 39 deletions(-)
 create mode 100644 arch/arm/mach-tegra/include/mach/gpio-tegra.h
arch/arm/mach-tegra/board-harmony.h +2 -0
index 280d203..139d96c 100644
@@ -17,6 +17,8 @@
 #ifndef _MACH_TEGRA_BOARD_HARMONY_H
 #define _MACH_TEGRA_BOARD_HARMONY_H
 
+#include <mach/gpio-tegra.h>
+
 #define HARMONY_GPIO_TPS6586X(_x_)	(TEGRA_NR_GPIOS + (_x_))
 #define HARMONY_GPIO_WM8903(_x_)	(HARMONY_GPIO_TPS6586X(4) + (_x_))
 
arch/arm/mach-tegra/board-paz00.h +2 -0
index 86057c3..2dc1899 100644
@@ -17,6 +17,8 @@
 #ifndef _MACH_TEGRA_BOARD_PAZ00_H
 #define _MACH_TEGRA_BOARD_PAZ00_H
 
+#include <mach/gpio-tegra.h>
+
 /* SDCARD */
 #define TEGRA_GPIO_SD1_CD	TEGRA_GPIO_PV5
 #define TEGRA_GPIO_SD1_WP	TEGRA_GPIO_PH1
arch/arm/mach-tegra/board-seaboard.h +2 -0
index d06c334..4c45d4c 100644
@@ -17,6 +17,8 @@
 #ifndef _MACH_TEGRA_BOARD_SEABOARD_H
 #define _MACH_TEGRA_BOARD_SEABOARD_H
 
+#include <mach/gpio-tegra.h>
+
 #define SEABOARD_GPIO_TPS6586X(_x_)	(TEGRA_NR_GPIOS + (_x_))
 #define SEABOARD_GPIO_WM8903(_x_)	(SEABOARD_GPIO_TPS6586X(4) + (_x_))
 
arch/arm/mach-tegra/board-trimslice.h +2 -0
index 7a7dee8..50f128d 100644
@@ -17,6 +17,8 @@
 #ifndef _MACH_TEGRA_BOARD_TRIMSLICE_H
 #define _MACH_TEGRA_BOARD_TRIMSLICE_H
 
+#include <mach/gpio-tegra.h>
+
 #define TRIMSLICE_GPIO_SD4_CD	TEGRA_GPIO_PP1	/* mmc4 cd */
 #define TRIMSLICE_GPIO_SD4_WP	TEGRA_GPIO_PP2	/* mmc4 wp */
 
arch/arm/mach-tegra/include/mach/gpio-tegra.h new file +39 -0
new file mode 100644
index 0000000..87d37fd
@@ -0,0 +1,39 @@
+/*
+ * arch/arm/mach-tegra/include/mach/gpio.h
+ *
+ * Copyright (C) 2010 Google, Inc.
+ *
+ * Author:
+ *	Erik Gilling <[email protected]>
+ *
+ * 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.
+ *
+ */
+
+#ifndef __MACH_TEGRA_GPIO_TEGRA_H
+#define __MACH_TEGRA_GPIO_TEGRA_H
+
+#include <linux/types.h>
+#include <mach/irqs.h>
+
+#define TEGRA_NR_GPIOS		INT_GPIO_NR
+
+#define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio))
+
+struct tegra_gpio_table {
+	int	gpio;	/* GPIO number */
+	bool	enable;	/* Enable for GPIO at init? */
+};
+
+void tegra_gpio_config(struct tegra_gpio_table *table, int num);
+void tegra_gpio_enable(int gpio);
+void tegra_gpio_disable(int gpio);
+
+#endif
arch/arm/mach-tegra/include/mach/gpio.h +0 -39
index 7910d26..e69de29 100644
@@ -1,39 +0,0 @@
-/*
- * arch/arm/mach-tegra/include/mach/gpio.h
- *
- * Copyright (C) 2010 Google, Inc.
- *
- * Author:
- *	Erik Gilling <[email protected]>
- *
- * 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.
- *
- */
-
-#ifndef __MACH_TEGRA_GPIO_H
-#define __MACH_TEGRA_GPIO_H
-
-#include <linux/types.h>
-#include <mach/irqs.h>
-
-#define TEGRA_NR_GPIOS		INT_GPIO_NR
-
-#define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio))
-
-struct tegra_gpio_table {
-	int	gpio;	/* GPIO number */
-	bool	enable;	/* Enable for GPIO at init? */
-};
-
-void tegra_gpio_config(struct tegra_gpio_table *table, int num);
-void tegra_gpio_enable(int gpio);
-void tegra_gpio_disable(int gpio);
-
-#endif
arch/arm/mach-tegra/usb_phy.c +1 -0
index 88081bb..37576a7 100644
@@ -28,6 +28,7 @@
 #include <linux/usb/otg.h>
 #include <linux/usb/ulpi.h>
 #include <asm/mach-types.h>
+#include <mach/gpio-tegra.h>
 #include <mach/usb_phy.h>
 #include <mach/iomap.h>
 
drivers/gpio/gpio-tegra.c +1 -0
index df64536..6b65207 100644
@@ -27,6 +27,7 @@
 
 #include <asm/mach/irq.h>
 
+#include <mach/gpio-tegra.h>
 #include <mach/iomap.h>
 #include <mach/suspend.h>
 
drivers/mmc/host/sdhci-tegra.c +2 -0
index 67176af..067a4cd 100644
@@ -25,6 +25,8 @@
 #include <linux/module.h>
 
 #include <asm/gpio.h>
+
+#include <mach/gpio-tegra.h>
 #include <mach/sdhci.h>
 
 #include "sdhci-pltfm.h"
Signature · 1 line
1.7.0.4
#4 lore raw

PATCH 3/3 arm/tegra: Move "gpio-names.h" into <mach/gpio-tegra.h>

In reply to Stephen Warren

This centralizes all SoC-level GPIO-related definitions into a single header file.

---
 arch/arm/mach-tegra/board-harmony-pinmux.c    |    1 -
 arch/arm/mach-tegra/board-harmony.c           |    1 -
 arch/arm/mach-tegra/board-paz00-pinmux.c      |    1 -
 arch/arm/mach-tegra/board-paz00.c             |    1 -
 arch/arm/mach-tegra/board-seaboard-pinmux.c   |    1 -
 arch/arm/mach-tegra/board-seaboard.c          |    1 -
 arch/arm/mach-tegra/board-trimslice-pinmux.c  |    1 -
 arch/arm/mach-tegra/board-trimslice.c         |    2 -
 arch/arm/mach-tegra/devices.c                 |    2 +-
 arch/arm/mach-tegra/gpio-names.h              |  247 -------------------------
 arch/arm/mach-tegra/include/mach/gpio-tegra.h |  225 ++++++++++++++++++++++
 11 files changed, 226 insertions(+), 257 deletions(-)
 delete mode 100644 arch/arm/mach-tegra/gpio-names.h
arch/arm/mach-tegra/board-harmony-pinmux.c +0 -1
index 4d63e2e..4191a9f 100644
@@ -18,7 +18,6 @@
 #include <linux/gpio.h>
 #include <mach/pinmux.h>
 
-#include "gpio-names.h"
 #include "board-harmony.h"
 
 static struct tegra_pingroup_config harmony_pinmux[] = {
arch/arm/mach-tegra/board-harmony.c +0 -1
index 5835225..1e6a20f 100644
@@ -42,7 +42,6 @@
 #include "board-harmony.h"
 #include "clock.h"
 #include "devices.h"
-#include "gpio-names.h"
 
 static struct plat_serial8250_port debug_uart_platform_data[] = {
 	{
arch/arm/mach-tegra/board-paz00-pinmux.c +0 -1
index 2225769..39a4858 100644
@@ -18,7 +18,6 @@
 #include <linux/gpio.h>
 #include <mach/pinmux.h>
 
-#include "gpio-names.h"
 #include "board-paz00.h"
 
 static struct tegra_pingroup_config paz00_pinmux[] = {
arch/arm/mach-tegra/board-paz00.c +0 -1
index c888b0e..ae94f79 100644
@@ -42,7 +42,6 @@
 #include "board-paz00.h"
 #include "clock.h"
 #include "devices.h"
-#include "gpio-names.h"
 
 static struct plat_serial8250_port debug_uart_platform_data[] = {
 	{
arch/arm/mach-tegra/board-seaboard-pinmux.c +0 -1
index 74f78b7..fbfeb9c 100644
@@ -19,7 +19,6 @@
 #include <mach/pinmux.h>
 #include <mach/pinmux-t2.h>
 
-#include "gpio-names.h"
 #include "board-seaboard.h"
 
 #define DEFAULT_DRIVE(_name)					\
arch/arm/mach-tegra/board-seaboard.c +0 -1
index bf13ea3..53e6ce6 100644
@@ -39,7 +39,6 @@
 #include "board-seaboard.h"
 #include "clock.h"
 #include "devices.h"
-#include "gpio-names.h"
 
 static struct plat_serial8250_port debug_uart_platform_data[] = {
 	{
arch/arm/mach-tegra/board-trimslice-pinmux.c +0 -1
index bcb1916..b358aac 100644
@@ -19,7 +19,6 @@
 
 #include <mach/pinmux.h>
 
-#include "gpio-names.h"
 #include "board-trimslice.h"
 
 static __initdata struct tegra_pingroup_config trimslice_pinmux[] = {
arch/arm/mach-tegra/board-trimslice.c +0 -2
index e3ff88b..b0f77ea 100644
@@ -37,8 +37,6 @@
 #include "board.h"
 #include "clock.h"
 #include "devices.h"
-#include "gpio-names.h"
-
 #include "board-trimslice.h"
 
 static struct plat_serial8250_port debug_uart_platform_data[] = {
arch/arm/mach-tegra/devices.c +1 -1
index 57e35d2..a5ea0ac 100644
@@ -25,11 +25,11 @@
 #include <linux/i2c-tegra.h>
 #include <linux/platform_data/tegra_usb.h>
 #include <asm/pmu.h>
+#include <mach/gpio-tegra.h>
 #include <mach/irqs.h>
 #include <mach/iomap.h>
 #include <mach/dma.h>
 #include <mach/usb_phy.h>
-#include "gpio-names.h"
 
 static struct resource i2c_resource1[] = {
 	[0] = {
arch/arm/mach-tegra/gpio-names.h deleted +0 -247

247 lines not on this page · raw message

arch/arm/mach-tegra/include/mach/gpio-tegra.h +225 -0

231 lines not on this page · raw message

Signature · 1 line
1.7.0.4
#5 lore raw

Re: [PATCH 3/3] arm/tegra: Move "gpio-names.h" into <mach/gpio-tegra.h>

Hi,

Quoted 9 lines · Stephen Warren

This centralizes all SoC-level GPIO-related definitions into a single header file.

?arch/arm/mach-tegra/gpio-names.h ? ? ? ? ? ? ?| ?247 ------------------------- ?arch/arm/mach-tegra/include/mach/gpio-tegra.h | ?225 ++++++++++++++++++++++ ?11 files changed, 226 insertions(+), 257 deletions(-)
?delete mode 100644 arch/arm/mach-tegra/gpio-names.h

The main reason that gpio-names.h was only in the mach directory and not under include in the first place, is to discourage use outside of the base platform code and board definitions.

There should be no need for drivers and non-mach-tegra code to use the file, so doing a current-directory include of it should be OK. Or do you have other plans for it?

-Olof

Acked-by on v1 1/3
#7 lore raw
In reply to Stephen Warren
Quoted 3 lines · Stephen Warren

This centralizes all GPIO naming in one header.

Quoted 9 lines

---
This patch series relies on various previous changes to the Tegra GPIO driver that were made in Russell's GPIO tree. I assume this series will go in through that tree.

This first patch is cleanup which makes the second slightly cleaner (no need to edit board-harmony-pcie.c in patch 2). Usually, it would go in through the Tegra tree, but I think it makes sense to merge these 3 patches all together in one place.

Works for me. Or I could stage it in a topic branch that would be merged after Russell's GPIO tree.

Russell, Arnd, got any preferences for one or the other?

-Olof

#6 lore raw

RE: [PATCH 3/3] arm/tegra: Move "gpio-names.h" into <mach/gpio-tegra.h>

In reply to Olof Johansson

Olof Johansson wrote at Wednesday, September 21, 2011 2:15 PM:

Quoted 11 lines · Stephen Warren
Quoted 9 lines

This centralizes all SoC-level GPIO-related definitions into a single header file.

?arch/arm/mach-tegra/gpio-names.h ? ? ? ? ? ? ?| ?247 ------------------------- ?arch/arm/mach-tegra/include/mach/gpio-tegra.h | ?225 ++++++++++++++++++++++ ?11 files changed, 226 insertions(+), 257 deletions(-)
?delete mode 100644 arch/arm/mach-tegra/gpio-names.h

Quoted 7 lines

The main reason that gpio-names.h was only in the mach directory and not under include in the first place, is to discourage use outside of the base platform code and board definitions.

There should be no need for drivers and non-mach-tegra code to use the file, so doing a current-directory include of it should be OK. Or do you have other plans for it?

My primary motivation was to bring Tegra into line with what appears to be common practice amongst other ARM sub-architectures; many of mach-$x/include/mach/gpio-$x.h define the GPIO names there.

Still, your argument is valid; I don't foresee a need to anything other than mach-tegra/*.c to need the GPIO names file.

So, feel free to take/drop this patch as you desire.

Signature · 1 line
nvpublic
#8 lore raw
In reply to Olof Johansson
Quoted 2 lines · Olof Johansson

Works for me. Or I could stage it in a topic branch that would be merged after Russell's GPIO tree.

Holding stuff off from being merged doesn't work. If you have the following commit structure:

A---...-----M1-B-C-M2

+---A1-B1-C1'     /
+-A2-B2-C2-------'

Now, lets say A2 depends on C1. Merely delaying the stuff so that M2 happens after M1 is insufficient to ensure git state doesn't break. When bisecting, its entirely possible that the bisect algorithm may chose B2 as a potential test candidate. At that point you end up with A2, but without C1.

The only way to solve this is to have A2 following on from C1 - which of course requires A1..C1 to be declared stable and either pulled into your local tree or for A2..C2 to be submitted to the same tree which A1..C1 are already in.

#9 lore raw

Russell King - ARM Linux wrote at Thursday, September 22, 2011 2:12 AM:

Quoted 5 lines · Olof Johansson
Quoted 2 lines

Works for me. Or I could stage it in a topic branch that would be merged after Russell's GPIO tree.

Holding stuff off from being merged doesn't work.

Russell,

So I take it I should add the two ack'd patches to the ARM patch system, and have you pick them up?

Thanks.

Quoted 16 lines

If you have the following commit structure:

A---...-----M1-B-C-M2

+---A1-B1-C1'     /
+-A2-B2-C2-------'

Now, lets say A2 depends on C1. Merely delaying the stuff so that M2 happens after M1 is insufficient to ensure git state doesn't break. When bisecting, its entirely possible that the bisect algorithm may chose B2 as a potential test candidate. At that point you end up with A2, but without C1.

The only way to solve this is to have A2 following on from C1 - which of course requires A1..C1 to be declared stable and either pulled into your local tree or for A2..C2 to be submitted to the same tree which A1..C1 are already in.

Signature · 1 line
nvpupblic
#10 lore raw
Quoted 11 lines · Stephen Warren

Russell King - ARM Linux wrote at Thursday, September 22, 2011 2:12 AM:

Quoted 5 lines · Olof Johansson
Quoted 2 lines

Works for me. Or I could stage it in a topic branch that would be merged after Russell's GPIO tree.

Holding stuff off from being merged doesn't work.

Russell,

So I take it I should add the two ack'd patches to the ARM patch system, and have you pick them up?

That's a workable solution, yes. I've done that with various other gpio patches from people, and Grant seems happy with that.

#11 lore raw
Quoted 8 lines · Russell King - ARM Linux
Quoted 7 lines · Stephen Warren

Russell King - ARM Linux wrote at Thursday, September 22, 2011 2:12 AM:

Quoted 5 lines · Olof Johansson
Quoted 2 lines

Works for me. Or I could stage it in a topic branch that would be merged after Russell's GPIO tree.

Holding stuff off from being merged doesn't work.

Quoted 7 lines
Quoted 4 lines

Russell,

So I take it I should add the two ack'd patches to the ARM patch system, and have you pick them up?

That's a workable solution, yes. I've done that with various other gpio patches from people, and Grant seems happy with that.

Yes, I'm comfortable with patches going in via other trees when there are dependencies.

g.

Acked-by on v1 2/3
#3 lore raw

Re: [PATCH 2/3] arm/tegra: Replace <mach/gpio.h> with <mach/gpio-tegra.h>

In reply to Stephen Warren
Quoted 4 lines · Stephen Warren

This will eventually allow <mach/gpio.h> to be deleted. This mirrors LinusW's recent equivalent work on various other ARM platforms.

Quoted 194 lines
---
 arch/arm/mach-tegra/board-harmony.h           |    2 +
 arch/arm/mach-tegra/board-paz00.h             |    2 +
 arch/arm/mach-tegra/board-seaboard.h          |    2 +
 arch/arm/mach-tegra/board-trimslice.h         |    2 +
 arch/arm/mach-tegra/include/mach/gpio-tegra.h |   39 +++++++++++++++++++++++++
 arch/arm/mach-tegra/include/mach/gpio.h       |   39 -------------------------
 arch/arm/mach-tegra/usb_phy.c                 |    1 +
 drivers/gpio/gpio-tegra.c                     |    1 +
 drivers/mmc/host/sdhci-tegra.c                |    2 +
 9 files changed, 51 insertions(+), 39 deletions(-)
 create mode 100644 arch/arm/mach-tegra/include/mach/gpio-tegra.h
arch/arm/mach-tegra/board-harmony.h +2 -0
index 280d203..139d96c 100644
@@ -17,6 +17,8 @@
 #ifndef _MACH_TEGRA_BOARD_HARMONY_H
 #define _MACH_TEGRA_BOARD_HARMONY_H
 
+#include <mach/gpio-tegra.h>
+
 #define HARMONY_GPIO_TPS6586X(_x_)	(TEGRA_NR_GPIOS + (_x_))
 #define HARMONY_GPIO_WM8903(_x_)	(HARMONY_GPIO_TPS6586X(4) + (_x_))
 
arch/arm/mach-tegra/board-paz00.h +2 -0
index 86057c3..2dc1899 100644
@@ -17,6 +17,8 @@
 #ifndef _MACH_TEGRA_BOARD_PAZ00_H
 #define _MACH_TEGRA_BOARD_PAZ00_H
 
+#include <mach/gpio-tegra.h>
+
 /* SDCARD */
 #define TEGRA_GPIO_SD1_CD	TEGRA_GPIO_PV5
 #define TEGRA_GPIO_SD1_WP	TEGRA_GPIO_PH1
arch/arm/mach-tegra/board-seaboard.h +2 -0
index d06c334..4c45d4c 100644
@@ -17,6 +17,8 @@
 #ifndef _MACH_TEGRA_BOARD_SEABOARD_H
 #define _MACH_TEGRA_BOARD_SEABOARD_H
 
+#include <mach/gpio-tegra.h>
+
 #define SEABOARD_GPIO_TPS6586X(_x_)	(TEGRA_NR_GPIOS + (_x_))
 #define SEABOARD_GPIO_WM8903(_x_)	(SEABOARD_GPIO_TPS6586X(4) + (_x_))
 
arch/arm/mach-tegra/board-trimslice.h +2 -0
index 7a7dee8..50f128d 100644
@@ -17,6 +17,8 @@
 #ifndef _MACH_TEGRA_BOARD_TRIMSLICE_H
 #define _MACH_TEGRA_BOARD_TRIMSLICE_H
 
+#include <mach/gpio-tegra.h>
+
 #define TRIMSLICE_GPIO_SD4_CD	TEGRA_GPIO_PP1	/* mmc4 cd */
 #define TRIMSLICE_GPIO_SD4_WP	TEGRA_GPIO_PP2	/* mmc4 wp */
 
arch/arm/mach-tegra/include/mach/gpio-tegra.h new file +39 -0
new file mode 100644
index 0000000..87d37fd
@@ -0,0 +1,39 @@
+/*
+ * arch/arm/mach-tegra/include/mach/gpio.h
+ *
+ * Copyright (C) 2010 Google, Inc.
+ *
+ * Author:
+ *	Erik Gilling <[email protected]>
+ *
+ * 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.
+ *
+ */
+
+#ifndef __MACH_TEGRA_GPIO_TEGRA_H
+#define __MACH_TEGRA_GPIO_TEGRA_H
+
+#include <linux/types.h>
+#include <mach/irqs.h>
+
+#define TEGRA_NR_GPIOS		INT_GPIO_NR
+
+#define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio))
+
+struct tegra_gpio_table {
+	int	gpio;	/* GPIO number */
+	bool	enable;	/* Enable for GPIO at init? */
+};
+
+void tegra_gpio_config(struct tegra_gpio_table *table, int num);
+void tegra_gpio_enable(int gpio);
+void tegra_gpio_disable(int gpio);
+
+#endif
arch/arm/mach-tegra/include/mach/gpio.h +0 -39
index 7910d26..e69de29 100644
@@ -1,39 +0,0 @@
-/*
- * arch/arm/mach-tegra/include/mach/gpio.h
- *
- * Copyright (C) 2010 Google, Inc.
- *
- * Author:
- *	Erik Gilling <[email protected]>
- *
- * 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.
- *
- */
-
-#ifndef __MACH_TEGRA_GPIO_H
-#define __MACH_TEGRA_GPIO_H
-
-#include <linux/types.h>
-#include <mach/irqs.h>
-
-#define TEGRA_NR_GPIOS		INT_GPIO_NR
-
-#define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio))
-
-struct tegra_gpio_table {
-	int	gpio;	/* GPIO number */
-	bool	enable;	/* Enable for GPIO at init? */
-};
-
-void tegra_gpio_config(struct tegra_gpio_table *table, int num);
-void tegra_gpio_enable(int gpio);
-void tegra_gpio_disable(int gpio);
-
-#endif
arch/arm/mach-tegra/usb_phy.c +1 -0
index 88081bb..37576a7 100644
@@ -28,6 +28,7 @@
 #include <linux/usb/otg.h>
 #include <linux/usb/ulpi.h>
 #include <asm/mach-types.h>
+#include <mach/gpio-tegra.h>
 #include <mach/usb_phy.h>
 #include <mach/iomap.h>
 
drivers/gpio/gpio-tegra.c +1 -0
index df64536..6b65207 100644
@@ -27,6 +27,7 @@
 
 #include <asm/mach/irq.h>
 
+#include <mach/gpio-tegra.h>
 #include <mach/iomap.h>
 #include <mach/suspend.h>
 
drivers/mmc/host/sdhci-tegra.c +2 -0
index 67176af..067a4cd 100644
@@ -25,6 +25,8 @@
 #include <linux/module.h>
 
 #include <asm/gpio.h>
+
+#include <mach/gpio-tegra.h>
 #include <mach/sdhci.h>
 
 #include "sdhci-pltfm.h"
Signature · 1 line
1.7.0.4