* [PATCH 1/3] arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h
@ 2011-09-21 19:33 ` Stephen Warren
0 siblings, 0 replies; 31+ messages in thread
From: Stephen Warren @ 2011-09-21 19:33 UTC (permalink / raw)
To: Russell King
Cc: Colin Cross, Erik Gilling, Olof Johansson, Grant Likely,
Chris Ball, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA, Stephen Warren
This centralizes all GPIO naming in one header.
Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
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(-)
diff --git a/arch/arm/mach-tegra/board-harmony-pcie.c b/arch/arm/mach-tegra/board-harmony-pcie.c
index 9c27b95..6db7d69 100644
--- a/arch/arm/mach-tegra/board-harmony-pcie.c
+++ b/arch/arm/mach-tegra/board-harmony-pcie.c
@@ -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;
}
diff --git a/arch/arm/mach-tegra/board-harmony.h b/arch/arm/mach-tegra/board-harmony.h
index d85142e..280d203 100644
--- a/arch/arm/mach-tegra/board-harmony.h
+++ b/arch/arm/mach-tegra/board-harmony.h
@@ -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);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 1/3] arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h
@ 2011-09-21 19:33 ` Stephen Warren
0 siblings, 0 replies; 31+ messages in thread
From: Stephen Warren @ 2011-09-21 19:33 UTC (permalink / raw)
To: Russell King
Cc: Colin Cross, Erik Gilling, Olof Johansson, Grant Likely,
Chris Ball, linux-tegra, linux-arm-kernel, linux-kernel,
linux-mmc, Stephen Warren
This centralizes all GPIO naming in one header.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
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(-)
diff --git a/arch/arm/mach-tegra/board-harmony-pcie.c b/arch/arm/mach-tegra/board-harmony-pcie.c
index 9c27b95..6db7d69 100644
--- a/arch/arm/mach-tegra/board-harmony-pcie.c
+++ b/arch/arm/mach-tegra/board-harmony-pcie.c
@@ -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;
}
diff --git a/arch/arm/mach-tegra/board-harmony.h b/arch/arm/mach-tegra/board-harmony.h
index d85142e..280d203 100644
--- a/arch/arm/mach-tegra/board-harmony.h
+++ b/arch/arm/mach-tegra/board-harmony.h
@@ -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);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 1/3] arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h
@ 2011-09-21 19:33 ` Stephen Warren
0 siblings, 0 replies; 31+ messages in thread
From: Stephen Warren @ 2011-09-21 19:33 UTC (permalink / raw)
To: linux-arm-kernel
This centralizes all GPIO naming in one header.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
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(-)
diff --git a/arch/arm/mach-tegra/board-harmony-pcie.c b/arch/arm/mach-tegra/board-harmony-pcie.c
index 9c27b95..6db7d69 100644
--- a/arch/arm/mach-tegra/board-harmony-pcie.c
+++ b/arch/arm/mach-tegra/board-harmony-pcie.c
@@ -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;
}
diff --git a/arch/arm/mach-tegra/board-harmony.h b/arch/arm/mach-tegra/board-harmony.h
index d85142e..280d203 100644
--- a/arch/arm/mach-tegra/board-harmony.h
+++ b/arch/arm/mach-tegra/board-harmony.h
@@ -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);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 2/3] arm/tegra: Replace <mach/gpio.h> with <mach/gpio-tegra.h>
2011-09-21 19:33 ` Stephen Warren
@ 2011-09-21 19:33 ` Stephen Warren
-1 siblings, 0 replies; 31+ messages in thread
From: Stephen Warren @ 2011-09-21 19:33 UTC (permalink / raw)
To: Russell King
Cc: Colin Cross, Erik Gilling, Olof Johansson, Grant Likely,
Chris Ball, linux-tegra, linux-arm-kernel, linux-kernel,
linux-mmc, Stephen Warren
This will eventually allow <mach/gpio.h> to be deleted. This mirrors
LinusW's recent equivalent work on various other ARM platforms.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
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
diff --git a/arch/arm/mach-tegra/board-harmony.h b/arch/arm/mach-tegra/board-harmony.h
index 280d203..139d96c 100644
--- a/arch/arm/mach-tegra/board-harmony.h
+++ b/arch/arm/mach-tegra/board-harmony.h
@@ -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_))
diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h
index 86057c3..2dc1899 100644
--- a/arch/arm/mach-tegra/board-paz00.h
+++ b/arch/arm/mach-tegra/board-paz00.h
@@ -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
diff --git a/arch/arm/mach-tegra/board-seaboard.h b/arch/arm/mach-tegra/board-seaboard.h
index d06c334..4c45d4c 100644
--- a/arch/arm/mach-tegra/board-seaboard.h
+++ b/arch/arm/mach-tegra/board-seaboard.h
@@ -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_))
diff --git a/arch/arm/mach-tegra/board-trimslice.h b/arch/arm/mach-tegra/board-trimslice.h
index 7a7dee8..50f128d 100644
--- a/arch/arm/mach-tegra/board-trimslice.h
+++ b/arch/arm/mach-tegra/board-trimslice.h
@@ -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 */
diff --git a/arch/arm/mach-tegra/include/mach/gpio-tegra.h b/arch/arm/mach-tegra/include/mach/gpio-tegra.h
new file mode 100644
index 0000000..87d37fd
--- /dev/null
+++ b/arch/arm/mach-tegra/include/mach/gpio-tegra.h
@@ -0,0 +1,39 @@
+/*
+ * arch/arm/mach-tegra/include/mach/gpio.h
+ *
+ * Copyright (C) 2010 Google, Inc.
+ *
+ * Author:
+ * Erik Gilling <konkers@google.com>
+ *
+ * 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
diff --git a/arch/arm/mach-tegra/include/mach/gpio.h b/arch/arm/mach-tegra/include/mach/gpio.h
index 7910d26..e69de29 100644
--- a/arch/arm/mach-tegra/include/mach/gpio.h
+++ b/arch/arm/mach-tegra/include/mach/gpio.h
@@ -1,39 +0,0 @@
-/*
- * arch/arm/mach-tegra/include/mach/gpio.h
- *
- * Copyright (C) 2010 Google, Inc.
- *
- * Author:
- * Erik Gilling <konkers@google.com>
- *
- * 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
diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c
index 88081bb..37576a7 100644
--- a/arch/arm/mach-tegra/usb_phy.c
+++ b/arch/arm/mach-tegra/usb_phy.c
@@ -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>
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index df64536..6b65207 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -27,6 +27,7 @@
#include <asm/mach/irq.h>
+#include <mach/gpio-tegra.h>
#include <mach/iomap.h>
#include <mach/suspend.h>
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index 67176af..067a4cd 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -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"
--
1.7.0.4
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 2/3] arm/tegra: Replace <mach/gpio.h> with <mach/gpio-tegra.h>
@ 2011-09-21 19:33 ` Stephen Warren
0 siblings, 0 replies; 31+ messages in thread
From: Stephen Warren @ 2011-09-21 19:33 UTC (permalink / raw)
To: linux-arm-kernel
This will eventually allow <mach/gpio.h> to be deleted. This mirrors
LinusW's recent equivalent work on various other ARM platforms.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
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
diff --git a/arch/arm/mach-tegra/board-harmony.h b/arch/arm/mach-tegra/board-harmony.h
index 280d203..139d96c 100644
--- a/arch/arm/mach-tegra/board-harmony.h
+++ b/arch/arm/mach-tegra/board-harmony.h
@@ -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_))
diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h
index 86057c3..2dc1899 100644
--- a/arch/arm/mach-tegra/board-paz00.h
+++ b/arch/arm/mach-tegra/board-paz00.h
@@ -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
diff --git a/arch/arm/mach-tegra/board-seaboard.h b/arch/arm/mach-tegra/board-seaboard.h
index d06c334..4c45d4c 100644
--- a/arch/arm/mach-tegra/board-seaboard.h
+++ b/arch/arm/mach-tegra/board-seaboard.h
@@ -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_))
diff --git a/arch/arm/mach-tegra/board-trimslice.h b/arch/arm/mach-tegra/board-trimslice.h
index 7a7dee8..50f128d 100644
--- a/arch/arm/mach-tegra/board-trimslice.h
+++ b/arch/arm/mach-tegra/board-trimslice.h
@@ -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 */
diff --git a/arch/arm/mach-tegra/include/mach/gpio-tegra.h b/arch/arm/mach-tegra/include/mach/gpio-tegra.h
new file mode 100644
index 0000000..87d37fd
--- /dev/null
+++ b/arch/arm/mach-tegra/include/mach/gpio-tegra.h
@@ -0,0 +1,39 @@
+/*
+ * arch/arm/mach-tegra/include/mach/gpio.h
+ *
+ * Copyright (C) 2010 Google, Inc.
+ *
+ * Author:
+ * Erik Gilling <konkers@google.com>
+ *
+ * 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
diff --git a/arch/arm/mach-tegra/include/mach/gpio.h b/arch/arm/mach-tegra/include/mach/gpio.h
index 7910d26..e69de29 100644
--- a/arch/arm/mach-tegra/include/mach/gpio.h
+++ b/arch/arm/mach-tegra/include/mach/gpio.h
@@ -1,39 +0,0 @@
-/*
- * arch/arm/mach-tegra/include/mach/gpio.h
- *
- * Copyright (C) 2010 Google, Inc.
- *
- * Author:
- * Erik Gilling <konkers@google.com>
- *
- * 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
diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c
index 88081bb..37576a7 100644
--- a/arch/arm/mach-tegra/usb_phy.c
+++ b/arch/arm/mach-tegra/usb_phy.c
@@ -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>
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index df64536..6b65207 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -27,6 +27,7 @@
#include <asm/mach/irq.h>
+#include <mach/gpio-tegra.h>
#include <mach/iomap.h>
#include <mach/suspend.h>
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
index 67176af..067a4cd 100644
--- a/drivers/mmc/host/sdhci-tegra.c
+++ b/drivers/mmc/host/sdhci-tegra.c
@@ -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"
--
1.7.0.4
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 3/3] arm/tegra: Move "gpio-names.h" into <mach/gpio-tegra.h>
2011-09-21 19:33 ` Stephen Warren
@ 2011-09-21 19:33 ` Stephen Warren
-1 siblings, 0 replies; 31+ messages in thread
From: Stephen Warren @ 2011-09-21 19:33 UTC (permalink / raw)
To: Russell King
Cc: Colin Cross, Erik Gilling, Olof Johansson, Grant Likely,
Chris Ball, linux-tegra, linux-arm-kernel, linux-kernel,
linux-mmc, Stephen Warren
This centralizes all SoC-level GPIO-related definitions into a single
header file.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
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
diff --git a/arch/arm/mach-tegra/board-harmony-pinmux.c b/arch/arm/mach-tegra/board-harmony-pinmux.c
index 4d63e2e..4191a9f 100644
--- a/arch/arm/mach-tegra/board-harmony-pinmux.c
+++ b/arch/arm/mach-tegra/board-harmony-pinmux.c
@@ -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[] = {
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c
index 5835225..1e6a20f 100644
--- a/arch/arm/mach-tegra/board-harmony.c
+++ b/arch/arm/mach-tegra/board-harmony.c
@@ -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[] = {
{
diff --git a/arch/arm/mach-tegra/board-paz00-pinmux.c b/arch/arm/mach-tegra/board-paz00-pinmux.c
index 2225769..39a4858 100644
--- a/arch/arm/mach-tegra/board-paz00-pinmux.c
+++ b/arch/arm/mach-tegra/board-paz00-pinmux.c
@@ -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[] = {
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index c888b0e..ae94f79 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -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[] = {
{
diff --git a/arch/arm/mach-tegra/board-seaboard-pinmux.c b/arch/arm/mach-tegra/board-seaboard-pinmux.c
index 74f78b7..fbfeb9c 100644
--- a/arch/arm/mach-tegra/board-seaboard-pinmux.c
+++ b/arch/arm/mach-tegra/board-seaboard-pinmux.c
@@ -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) \
diff --git a/arch/arm/mach-tegra/board-seaboard.c b/arch/arm/mach-tegra/board-seaboard.c
index bf13ea3..53e6ce6 100644
--- a/arch/arm/mach-tegra/board-seaboard.c
+++ b/arch/arm/mach-tegra/board-seaboard.c
@@ -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[] = {
{
diff --git a/arch/arm/mach-tegra/board-trimslice-pinmux.c b/arch/arm/mach-tegra/board-trimslice-pinmux.c
index bcb1916..b358aac 100644
--- a/arch/arm/mach-tegra/board-trimslice-pinmux.c
+++ b/arch/arm/mach-tegra/board-trimslice-pinmux.c
@@ -19,7 +19,6 @@
#include <mach/pinmux.h>
-#include "gpio-names.h"
#include "board-trimslice.h"
static __initdata struct tegra_pingroup_config trimslice_pinmux[] = {
diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c
index e3ff88b..b0f77ea 100644
--- a/arch/arm/mach-tegra/board-trimslice.c
+++ b/arch/arm/mach-tegra/board-trimslice.c
@@ -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[] = {
diff --git a/arch/arm/mach-tegra/devices.c b/arch/arm/mach-tegra/devices.c
index 57e35d2..a5ea0ac 100644
--- a/arch/arm/mach-tegra/devices.c
+++ b/arch/arm/mach-tegra/devices.c
@@ -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] = {
diff --git a/arch/arm/mach-tegra/gpio-names.h b/arch/arm/mach-tegra/gpio-names.h
deleted file mode 100644
index f28220a..0000000
--- a/arch/arm/mach-tegra/gpio-names.h
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * arch/arm/mach-tegra/include/mach/gpio-names.h
- *
- * Copyright (c) 2010 Google, Inc
- *
- * Author:
- * Erik Gilling <konkers@google.com>
- *
- * 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_NAMES_H
-#define __MACH_TEGRA_GPIO_NAMES_H
-
-#define TEGRA_GPIO_PA0 0
-#define TEGRA_GPIO_PA1 1
-#define TEGRA_GPIO_PA2 2
-#define TEGRA_GPIO_PA3 3
-#define TEGRA_GPIO_PA4 4
-#define TEGRA_GPIO_PA5 5
-#define TEGRA_GPIO_PA6 6
-#define TEGRA_GPIO_PA7 7
-#define TEGRA_GPIO_PB0 8
-#define TEGRA_GPIO_PB1 9
-#define TEGRA_GPIO_PB2 10
-#define TEGRA_GPIO_PB3 11
-#define TEGRA_GPIO_PB4 12
-#define TEGRA_GPIO_PB5 13
-#define TEGRA_GPIO_PB6 14
-#define TEGRA_GPIO_PB7 15
-#define TEGRA_GPIO_PC0 16
-#define TEGRA_GPIO_PC1 17
-#define TEGRA_GPIO_PC2 18
-#define TEGRA_GPIO_PC3 19
-#define TEGRA_GPIO_PC4 20
-#define TEGRA_GPIO_PC5 21
-#define TEGRA_GPIO_PC6 22
-#define TEGRA_GPIO_PC7 23
-#define TEGRA_GPIO_PD0 24
-#define TEGRA_GPIO_PD1 25
-#define TEGRA_GPIO_PD2 26
-#define TEGRA_GPIO_PD3 27
-#define TEGRA_GPIO_PD4 28
-#define TEGRA_GPIO_PD5 29
-#define TEGRA_GPIO_PD6 30
-#define TEGRA_GPIO_PD7 31
-#define TEGRA_GPIO_PE0 32
-#define TEGRA_GPIO_PE1 33
-#define TEGRA_GPIO_PE2 34
-#define TEGRA_GPIO_PE3 35
-#define TEGRA_GPIO_PE4 36
-#define TEGRA_GPIO_PE5 37
-#define TEGRA_GPIO_PE6 38
-#define TEGRA_GPIO_PE7 39
-#define TEGRA_GPIO_PF0 40
-#define TEGRA_GPIO_PF1 41
-#define TEGRA_GPIO_PF2 42
-#define TEGRA_GPIO_PF3 43
-#define TEGRA_GPIO_PF4 44
-#define TEGRA_GPIO_PF5 45
-#define TEGRA_GPIO_PF6 46
-#define TEGRA_GPIO_PF7 47
-#define TEGRA_GPIO_PG0 48
-#define TEGRA_GPIO_PG1 49
-#define TEGRA_GPIO_PG2 50
-#define TEGRA_GPIO_PG3 51
-#define TEGRA_GPIO_PG4 52
-#define TEGRA_GPIO_PG5 53
-#define TEGRA_GPIO_PG6 54
-#define TEGRA_GPIO_PG7 55
-#define TEGRA_GPIO_PH0 56
-#define TEGRA_GPIO_PH1 57
-#define TEGRA_GPIO_PH2 58
-#define TEGRA_GPIO_PH3 59
-#define TEGRA_GPIO_PH4 60
-#define TEGRA_GPIO_PH5 61
-#define TEGRA_GPIO_PH6 62
-#define TEGRA_GPIO_PH7 63
-#define TEGRA_GPIO_PI0 64
-#define TEGRA_GPIO_PI1 65
-#define TEGRA_GPIO_PI2 66
-#define TEGRA_GPIO_PI3 67
-#define TEGRA_GPIO_PI4 68
-#define TEGRA_GPIO_PI5 69
-#define TEGRA_GPIO_PI6 70
-#define TEGRA_GPIO_PI7 71
-#define TEGRA_GPIO_PJ0 72
-#define TEGRA_GPIO_PJ1 73
-#define TEGRA_GPIO_PJ2 74
-#define TEGRA_GPIO_PJ3 75
-#define TEGRA_GPIO_PJ4 76
-#define TEGRA_GPIO_PJ5 77
-#define TEGRA_GPIO_PJ6 78
-#define TEGRA_GPIO_PJ7 79
-#define TEGRA_GPIO_PK0 80
-#define TEGRA_GPIO_PK1 81
-#define TEGRA_GPIO_PK2 82
-#define TEGRA_GPIO_PK3 83
-#define TEGRA_GPIO_PK4 84
-#define TEGRA_GPIO_PK5 85
-#define TEGRA_GPIO_PK6 86
-#define TEGRA_GPIO_PK7 87
-#define TEGRA_GPIO_PL0 88
-#define TEGRA_GPIO_PL1 89
-#define TEGRA_GPIO_PL2 90
-#define TEGRA_GPIO_PL3 91
-#define TEGRA_GPIO_PL4 92
-#define TEGRA_GPIO_PL5 93
-#define TEGRA_GPIO_PL6 94
-#define TEGRA_GPIO_PL7 95
-#define TEGRA_GPIO_PM0 96
-#define TEGRA_GPIO_PM1 97
-#define TEGRA_GPIO_PM2 98
-#define TEGRA_GPIO_PM3 99
-#define TEGRA_GPIO_PM4 100
-#define TEGRA_GPIO_PM5 101
-#define TEGRA_GPIO_PM6 102
-#define TEGRA_GPIO_PM7 103
-#define TEGRA_GPIO_PN0 104
-#define TEGRA_GPIO_PN1 105
-#define TEGRA_GPIO_PN2 106
-#define TEGRA_GPIO_PN3 107
-#define TEGRA_GPIO_PN4 108
-#define TEGRA_GPIO_PN5 109
-#define TEGRA_GPIO_PN6 110
-#define TEGRA_GPIO_PN7 111
-#define TEGRA_GPIO_PO0 112
-#define TEGRA_GPIO_PO1 113
-#define TEGRA_GPIO_PO2 114
-#define TEGRA_GPIO_PO3 115
-#define TEGRA_GPIO_PO4 116
-#define TEGRA_GPIO_PO5 117
-#define TEGRA_GPIO_PO6 118
-#define TEGRA_GPIO_PO7 119
-#define TEGRA_GPIO_PP0 120
-#define TEGRA_GPIO_PP1 121
-#define TEGRA_GPIO_PP2 122
-#define TEGRA_GPIO_PP3 123
-#define TEGRA_GPIO_PP4 124
-#define TEGRA_GPIO_PP5 125
-#define TEGRA_GPIO_PP6 126
-#define TEGRA_GPIO_PP7 127
-#define TEGRA_GPIO_PQ0 128
-#define TEGRA_GPIO_PQ1 129
-#define TEGRA_GPIO_PQ2 130
-#define TEGRA_GPIO_PQ3 131
-#define TEGRA_GPIO_PQ4 132
-#define TEGRA_GPIO_PQ5 133
-#define TEGRA_GPIO_PQ6 134
-#define TEGRA_GPIO_PQ7 135
-#define TEGRA_GPIO_PR0 136
-#define TEGRA_GPIO_PR1 137
-#define TEGRA_GPIO_PR2 138
-#define TEGRA_GPIO_PR3 139
-#define TEGRA_GPIO_PR4 140
-#define TEGRA_GPIO_PR5 141
-#define TEGRA_GPIO_PR6 142
-#define TEGRA_GPIO_PR7 143
-#define TEGRA_GPIO_PS0 144
-#define TEGRA_GPIO_PS1 145
-#define TEGRA_GPIO_PS2 146
-#define TEGRA_GPIO_PS3 147
-#define TEGRA_GPIO_PS4 148
-#define TEGRA_GPIO_PS5 149
-#define TEGRA_GPIO_PS6 150
-#define TEGRA_GPIO_PS7 151
-#define TEGRA_GPIO_PT0 152
-#define TEGRA_GPIO_PT1 153
-#define TEGRA_GPIO_PT2 154
-#define TEGRA_GPIO_PT3 155
-#define TEGRA_GPIO_PT4 156
-#define TEGRA_GPIO_PT5 157
-#define TEGRA_GPIO_PT6 158
-#define TEGRA_GPIO_PT7 159
-#define TEGRA_GPIO_PU0 160
-#define TEGRA_GPIO_PU1 161
-#define TEGRA_GPIO_PU2 162
-#define TEGRA_GPIO_PU3 163
-#define TEGRA_GPIO_PU4 164
-#define TEGRA_GPIO_PU5 165
-#define TEGRA_GPIO_PU6 166
-#define TEGRA_GPIO_PU7 167
-#define TEGRA_GPIO_PV0 168
-#define TEGRA_GPIO_PV1 169
-#define TEGRA_GPIO_PV2 170
-#define TEGRA_GPIO_PV3 171
-#define TEGRA_GPIO_PV4 172
-#define TEGRA_GPIO_PV5 173
-#define TEGRA_GPIO_PV6 174
-#define TEGRA_GPIO_PV7 175
-#define TEGRA_GPIO_PW0 176
-#define TEGRA_GPIO_PW1 177
-#define TEGRA_GPIO_PW2 178
-#define TEGRA_GPIO_PW3 179
-#define TEGRA_GPIO_PW4 180
-#define TEGRA_GPIO_PW5 181
-#define TEGRA_GPIO_PW6 182
-#define TEGRA_GPIO_PW7 183
-#define TEGRA_GPIO_PX0 184
-#define TEGRA_GPIO_PX1 185
-#define TEGRA_GPIO_PX2 186
-#define TEGRA_GPIO_PX3 187
-#define TEGRA_GPIO_PX4 188
-#define TEGRA_GPIO_PX5 189
-#define TEGRA_GPIO_PX6 190
-#define TEGRA_GPIO_PX7 191
-#define TEGRA_GPIO_PY0 192
-#define TEGRA_GPIO_PY1 193
-#define TEGRA_GPIO_PY2 194
-#define TEGRA_GPIO_PY3 195
-#define TEGRA_GPIO_PY4 196
-#define TEGRA_GPIO_PY5 197
-#define TEGRA_GPIO_PY6 198
-#define TEGRA_GPIO_PY7 199
-#define TEGRA_GPIO_PZ0 200
-#define TEGRA_GPIO_PZ1 201
-#define TEGRA_GPIO_PZ2 202
-#define TEGRA_GPIO_PZ3 203
-#define TEGRA_GPIO_PZ4 204
-#define TEGRA_GPIO_PZ5 205
-#define TEGRA_GPIO_PZ6 206
-#define TEGRA_GPIO_PZ7 207
-#define TEGRA_GPIO_PAA0 208
-#define TEGRA_GPIO_PAA1 209
-#define TEGRA_GPIO_PAA2 210
-#define TEGRA_GPIO_PAA3 211
-#define TEGRA_GPIO_PAA4 212
-#define TEGRA_GPIO_PAA5 213
-#define TEGRA_GPIO_PAA6 214
-#define TEGRA_GPIO_PAA7 215
-#define TEGRA_GPIO_PBB0 216
-#define TEGRA_GPIO_PBB1 217
-#define TEGRA_GPIO_PBB2 218
-#define TEGRA_GPIO_PBB3 219
-#define TEGRA_GPIO_PBB4 220
-#define TEGRA_GPIO_PBB5 221
-#define TEGRA_GPIO_PBB6 222
-#define TEGRA_GPIO_PBB7 223
-
-#endif
diff --git a/arch/arm/mach-tegra/include/mach/gpio-tegra.h b/arch/arm/mach-tegra/include/mach/gpio-tegra.h
index 87d37fd..b06b998 100644
--- a/arch/arm/mach-tegra/include/mach/gpio-tegra.h
+++ b/arch/arm/mach-tegra/include/mach/gpio-tegra.h
@@ -23,6 +23,231 @@
#include <linux/types.h>
#include <mach/irqs.h>
+#define TEGRA_GPIO_PA0 0
+#define TEGRA_GPIO_PA1 1
+#define TEGRA_GPIO_PA2 2
+#define TEGRA_GPIO_PA3 3
+#define TEGRA_GPIO_PA4 4
+#define TEGRA_GPIO_PA5 5
+#define TEGRA_GPIO_PA6 6
+#define TEGRA_GPIO_PA7 7
+#define TEGRA_GPIO_PB0 8
+#define TEGRA_GPIO_PB1 9
+#define TEGRA_GPIO_PB2 10
+#define TEGRA_GPIO_PB3 11
+#define TEGRA_GPIO_PB4 12
+#define TEGRA_GPIO_PB5 13
+#define TEGRA_GPIO_PB6 14
+#define TEGRA_GPIO_PB7 15
+#define TEGRA_GPIO_PC0 16
+#define TEGRA_GPIO_PC1 17
+#define TEGRA_GPIO_PC2 18
+#define TEGRA_GPIO_PC3 19
+#define TEGRA_GPIO_PC4 20
+#define TEGRA_GPIO_PC5 21
+#define TEGRA_GPIO_PC6 22
+#define TEGRA_GPIO_PC7 23
+#define TEGRA_GPIO_PD0 24
+#define TEGRA_GPIO_PD1 25
+#define TEGRA_GPIO_PD2 26
+#define TEGRA_GPIO_PD3 27
+#define TEGRA_GPIO_PD4 28
+#define TEGRA_GPIO_PD5 29
+#define TEGRA_GPIO_PD6 30
+#define TEGRA_GPIO_PD7 31
+#define TEGRA_GPIO_PE0 32
+#define TEGRA_GPIO_PE1 33
+#define TEGRA_GPIO_PE2 34
+#define TEGRA_GPIO_PE3 35
+#define TEGRA_GPIO_PE4 36
+#define TEGRA_GPIO_PE5 37
+#define TEGRA_GPIO_PE6 38
+#define TEGRA_GPIO_PE7 39
+#define TEGRA_GPIO_PF0 40
+#define TEGRA_GPIO_PF1 41
+#define TEGRA_GPIO_PF2 42
+#define TEGRA_GPIO_PF3 43
+#define TEGRA_GPIO_PF4 44
+#define TEGRA_GPIO_PF5 45
+#define TEGRA_GPIO_PF6 46
+#define TEGRA_GPIO_PF7 47
+#define TEGRA_GPIO_PG0 48
+#define TEGRA_GPIO_PG1 49
+#define TEGRA_GPIO_PG2 50
+#define TEGRA_GPIO_PG3 51
+#define TEGRA_GPIO_PG4 52
+#define TEGRA_GPIO_PG5 53
+#define TEGRA_GPIO_PG6 54
+#define TEGRA_GPIO_PG7 55
+#define TEGRA_GPIO_PH0 56
+#define TEGRA_GPIO_PH1 57
+#define TEGRA_GPIO_PH2 58
+#define TEGRA_GPIO_PH3 59
+#define TEGRA_GPIO_PH4 60
+#define TEGRA_GPIO_PH5 61
+#define TEGRA_GPIO_PH6 62
+#define TEGRA_GPIO_PH7 63
+#define TEGRA_GPIO_PI0 64
+#define TEGRA_GPIO_PI1 65
+#define TEGRA_GPIO_PI2 66
+#define TEGRA_GPIO_PI3 67
+#define TEGRA_GPIO_PI4 68
+#define TEGRA_GPIO_PI5 69
+#define TEGRA_GPIO_PI6 70
+#define TEGRA_GPIO_PI7 71
+#define TEGRA_GPIO_PJ0 72
+#define TEGRA_GPIO_PJ1 73
+#define TEGRA_GPIO_PJ2 74
+#define TEGRA_GPIO_PJ3 75
+#define TEGRA_GPIO_PJ4 76
+#define TEGRA_GPIO_PJ5 77
+#define TEGRA_GPIO_PJ6 78
+#define TEGRA_GPIO_PJ7 79
+#define TEGRA_GPIO_PK0 80
+#define TEGRA_GPIO_PK1 81
+#define TEGRA_GPIO_PK2 82
+#define TEGRA_GPIO_PK3 83
+#define TEGRA_GPIO_PK4 84
+#define TEGRA_GPIO_PK5 85
+#define TEGRA_GPIO_PK6 86
+#define TEGRA_GPIO_PK7 87
+#define TEGRA_GPIO_PL0 88
+#define TEGRA_GPIO_PL1 89
+#define TEGRA_GPIO_PL2 90
+#define TEGRA_GPIO_PL3 91
+#define TEGRA_GPIO_PL4 92
+#define TEGRA_GPIO_PL5 93
+#define TEGRA_GPIO_PL6 94
+#define TEGRA_GPIO_PL7 95
+#define TEGRA_GPIO_PM0 96
+#define TEGRA_GPIO_PM1 97
+#define TEGRA_GPIO_PM2 98
+#define TEGRA_GPIO_PM3 99
+#define TEGRA_GPIO_PM4 100
+#define TEGRA_GPIO_PM5 101
+#define TEGRA_GPIO_PM6 102
+#define TEGRA_GPIO_PM7 103
+#define TEGRA_GPIO_PN0 104
+#define TEGRA_GPIO_PN1 105
+#define TEGRA_GPIO_PN2 106
+#define TEGRA_GPIO_PN3 107
+#define TEGRA_GPIO_PN4 108
+#define TEGRA_GPIO_PN5 109
+#define TEGRA_GPIO_PN6 110
+#define TEGRA_GPIO_PN7 111
+#define TEGRA_GPIO_PO0 112
+#define TEGRA_GPIO_PO1 113
+#define TEGRA_GPIO_PO2 114
+#define TEGRA_GPIO_PO3 115
+#define TEGRA_GPIO_PO4 116
+#define TEGRA_GPIO_PO5 117
+#define TEGRA_GPIO_PO6 118
+#define TEGRA_GPIO_PO7 119
+#define TEGRA_GPIO_PP0 120
+#define TEGRA_GPIO_PP1 121
+#define TEGRA_GPIO_PP2 122
+#define TEGRA_GPIO_PP3 123
+#define TEGRA_GPIO_PP4 124
+#define TEGRA_GPIO_PP5 125
+#define TEGRA_GPIO_PP6 126
+#define TEGRA_GPIO_PP7 127
+#define TEGRA_GPIO_PQ0 128
+#define TEGRA_GPIO_PQ1 129
+#define TEGRA_GPIO_PQ2 130
+#define TEGRA_GPIO_PQ3 131
+#define TEGRA_GPIO_PQ4 132
+#define TEGRA_GPIO_PQ5 133
+#define TEGRA_GPIO_PQ6 134
+#define TEGRA_GPIO_PQ7 135
+#define TEGRA_GPIO_PR0 136
+#define TEGRA_GPIO_PR1 137
+#define TEGRA_GPIO_PR2 138
+#define TEGRA_GPIO_PR3 139
+#define TEGRA_GPIO_PR4 140
+#define TEGRA_GPIO_PR5 141
+#define TEGRA_GPIO_PR6 142
+#define TEGRA_GPIO_PR7 143
+#define TEGRA_GPIO_PS0 144
+#define TEGRA_GPIO_PS1 145
+#define TEGRA_GPIO_PS2 146
+#define TEGRA_GPIO_PS3 147
+#define TEGRA_GPIO_PS4 148
+#define TEGRA_GPIO_PS5 149
+#define TEGRA_GPIO_PS6 150
+#define TEGRA_GPIO_PS7 151
+#define TEGRA_GPIO_PT0 152
+#define TEGRA_GPIO_PT1 153
+#define TEGRA_GPIO_PT2 154
+#define TEGRA_GPIO_PT3 155
+#define TEGRA_GPIO_PT4 156
+#define TEGRA_GPIO_PT5 157
+#define TEGRA_GPIO_PT6 158
+#define TEGRA_GPIO_PT7 159
+#define TEGRA_GPIO_PU0 160
+#define TEGRA_GPIO_PU1 161
+#define TEGRA_GPIO_PU2 162
+#define TEGRA_GPIO_PU3 163
+#define TEGRA_GPIO_PU4 164
+#define TEGRA_GPIO_PU5 165
+#define TEGRA_GPIO_PU6 166
+#define TEGRA_GPIO_PU7 167
+#define TEGRA_GPIO_PV0 168
+#define TEGRA_GPIO_PV1 169
+#define TEGRA_GPIO_PV2 170
+#define TEGRA_GPIO_PV3 171
+#define TEGRA_GPIO_PV4 172
+#define TEGRA_GPIO_PV5 173
+#define TEGRA_GPIO_PV6 174
+#define TEGRA_GPIO_PV7 175
+#define TEGRA_GPIO_PW0 176
+#define TEGRA_GPIO_PW1 177
+#define TEGRA_GPIO_PW2 178
+#define TEGRA_GPIO_PW3 179
+#define TEGRA_GPIO_PW4 180
+#define TEGRA_GPIO_PW5 181
+#define TEGRA_GPIO_PW6 182
+#define TEGRA_GPIO_PW7 183
+#define TEGRA_GPIO_PX0 184
+#define TEGRA_GPIO_PX1 185
+#define TEGRA_GPIO_PX2 186
+#define TEGRA_GPIO_PX3 187
+#define TEGRA_GPIO_PX4 188
+#define TEGRA_GPIO_PX5 189
+#define TEGRA_GPIO_PX6 190
+#define TEGRA_GPIO_PX7 191
+#define TEGRA_GPIO_PY0 192
+#define TEGRA_GPIO_PY1 193
+#define TEGRA_GPIO_PY2 194
+#define TEGRA_GPIO_PY3 195
+#define TEGRA_GPIO_PY4 196
+#define TEGRA_GPIO_PY5 197
+#define TEGRA_GPIO_PY6 198
+#define TEGRA_GPIO_PY7 199
+#define TEGRA_GPIO_PZ0 200
+#define TEGRA_GPIO_PZ1 201
+#define TEGRA_GPIO_PZ2 202
+#define TEGRA_GPIO_PZ3 203
+#define TEGRA_GPIO_PZ4 204
+#define TEGRA_GPIO_PZ5 205
+#define TEGRA_GPIO_PZ6 206
+#define TEGRA_GPIO_PZ7 207
+#define TEGRA_GPIO_PAA0 208
+#define TEGRA_GPIO_PAA1 209
+#define TEGRA_GPIO_PAA2 210
+#define TEGRA_GPIO_PAA3 211
+#define TEGRA_GPIO_PAA4 212
+#define TEGRA_GPIO_PAA5 213
+#define TEGRA_GPIO_PAA6 214
+#define TEGRA_GPIO_PAA7 215
+#define TEGRA_GPIO_PBB0 216
+#define TEGRA_GPIO_PBB1 217
+#define TEGRA_GPIO_PBB2 218
+#define TEGRA_GPIO_PBB3 219
+#define TEGRA_GPIO_PBB4 220
+#define TEGRA_GPIO_PBB5 221
+#define TEGRA_GPIO_PBB6 222
+#define TEGRA_GPIO_PBB7 223
+
#define TEGRA_NR_GPIOS INT_GPIO_NR
#define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio))
--
1.7.0.4
^ permalink raw reply related [flat|nested] 31+ messages in thread
* [PATCH 3/3] arm/tegra: Move "gpio-names.h" into <mach/gpio-tegra.h>
@ 2011-09-21 19:33 ` Stephen Warren
0 siblings, 0 replies; 31+ messages in thread
From: Stephen Warren @ 2011-09-21 19:33 UTC (permalink / raw)
To: linux-arm-kernel
This centralizes all SoC-level GPIO-related definitions into a single
header file.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
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
diff --git a/arch/arm/mach-tegra/board-harmony-pinmux.c b/arch/arm/mach-tegra/board-harmony-pinmux.c
index 4d63e2e..4191a9f 100644
--- a/arch/arm/mach-tegra/board-harmony-pinmux.c
+++ b/arch/arm/mach-tegra/board-harmony-pinmux.c
@@ -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[] = {
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c
index 5835225..1e6a20f 100644
--- a/arch/arm/mach-tegra/board-harmony.c
+++ b/arch/arm/mach-tegra/board-harmony.c
@@ -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[] = {
{
diff --git a/arch/arm/mach-tegra/board-paz00-pinmux.c b/arch/arm/mach-tegra/board-paz00-pinmux.c
index 2225769..39a4858 100644
--- a/arch/arm/mach-tegra/board-paz00-pinmux.c
+++ b/arch/arm/mach-tegra/board-paz00-pinmux.c
@@ -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[] = {
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index c888b0e..ae94f79 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -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[] = {
{
diff --git a/arch/arm/mach-tegra/board-seaboard-pinmux.c b/arch/arm/mach-tegra/board-seaboard-pinmux.c
index 74f78b7..fbfeb9c 100644
--- a/arch/arm/mach-tegra/board-seaboard-pinmux.c
+++ b/arch/arm/mach-tegra/board-seaboard-pinmux.c
@@ -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) \
diff --git a/arch/arm/mach-tegra/board-seaboard.c b/arch/arm/mach-tegra/board-seaboard.c
index bf13ea3..53e6ce6 100644
--- a/arch/arm/mach-tegra/board-seaboard.c
+++ b/arch/arm/mach-tegra/board-seaboard.c
@@ -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[] = {
{
diff --git a/arch/arm/mach-tegra/board-trimslice-pinmux.c b/arch/arm/mach-tegra/board-trimslice-pinmux.c
index bcb1916..b358aac 100644
--- a/arch/arm/mach-tegra/board-trimslice-pinmux.c
+++ b/arch/arm/mach-tegra/board-trimslice-pinmux.c
@@ -19,7 +19,6 @@
#include <mach/pinmux.h>
-#include "gpio-names.h"
#include "board-trimslice.h"
static __initdata struct tegra_pingroup_config trimslice_pinmux[] = {
diff --git a/arch/arm/mach-tegra/board-trimslice.c b/arch/arm/mach-tegra/board-trimslice.c
index e3ff88b..b0f77ea 100644
--- a/arch/arm/mach-tegra/board-trimslice.c
+++ b/arch/arm/mach-tegra/board-trimslice.c
@@ -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[] = {
diff --git a/arch/arm/mach-tegra/devices.c b/arch/arm/mach-tegra/devices.c
index 57e35d2..a5ea0ac 100644
--- a/arch/arm/mach-tegra/devices.c
+++ b/arch/arm/mach-tegra/devices.c
@@ -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] = {
diff --git a/arch/arm/mach-tegra/gpio-names.h b/arch/arm/mach-tegra/gpio-names.h
deleted file mode 100644
index f28220a..0000000
--- a/arch/arm/mach-tegra/gpio-names.h
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * arch/arm/mach-tegra/include/mach/gpio-names.h
- *
- * Copyright (c) 2010 Google, Inc
- *
- * Author:
- * Erik Gilling <konkers@google.com>
- *
- * 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_NAMES_H
-#define __MACH_TEGRA_GPIO_NAMES_H
-
-#define TEGRA_GPIO_PA0 0
-#define TEGRA_GPIO_PA1 1
-#define TEGRA_GPIO_PA2 2
-#define TEGRA_GPIO_PA3 3
-#define TEGRA_GPIO_PA4 4
-#define TEGRA_GPIO_PA5 5
-#define TEGRA_GPIO_PA6 6
-#define TEGRA_GPIO_PA7 7
-#define TEGRA_GPIO_PB0 8
-#define TEGRA_GPIO_PB1 9
-#define TEGRA_GPIO_PB2 10
-#define TEGRA_GPIO_PB3 11
-#define TEGRA_GPIO_PB4 12
-#define TEGRA_GPIO_PB5 13
-#define TEGRA_GPIO_PB6 14
-#define TEGRA_GPIO_PB7 15
-#define TEGRA_GPIO_PC0 16
-#define TEGRA_GPIO_PC1 17
-#define TEGRA_GPIO_PC2 18
-#define TEGRA_GPIO_PC3 19
-#define TEGRA_GPIO_PC4 20
-#define TEGRA_GPIO_PC5 21
-#define TEGRA_GPIO_PC6 22
-#define TEGRA_GPIO_PC7 23
-#define TEGRA_GPIO_PD0 24
-#define TEGRA_GPIO_PD1 25
-#define TEGRA_GPIO_PD2 26
-#define TEGRA_GPIO_PD3 27
-#define TEGRA_GPIO_PD4 28
-#define TEGRA_GPIO_PD5 29
-#define TEGRA_GPIO_PD6 30
-#define TEGRA_GPIO_PD7 31
-#define TEGRA_GPIO_PE0 32
-#define TEGRA_GPIO_PE1 33
-#define TEGRA_GPIO_PE2 34
-#define TEGRA_GPIO_PE3 35
-#define TEGRA_GPIO_PE4 36
-#define TEGRA_GPIO_PE5 37
-#define TEGRA_GPIO_PE6 38
-#define TEGRA_GPIO_PE7 39
-#define TEGRA_GPIO_PF0 40
-#define TEGRA_GPIO_PF1 41
-#define TEGRA_GPIO_PF2 42
-#define TEGRA_GPIO_PF3 43
-#define TEGRA_GPIO_PF4 44
-#define TEGRA_GPIO_PF5 45
-#define TEGRA_GPIO_PF6 46
-#define TEGRA_GPIO_PF7 47
-#define TEGRA_GPIO_PG0 48
-#define TEGRA_GPIO_PG1 49
-#define TEGRA_GPIO_PG2 50
-#define TEGRA_GPIO_PG3 51
-#define TEGRA_GPIO_PG4 52
-#define TEGRA_GPIO_PG5 53
-#define TEGRA_GPIO_PG6 54
-#define TEGRA_GPIO_PG7 55
-#define TEGRA_GPIO_PH0 56
-#define TEGRA_GPIO_PH1 57
-#define TEGRA_GPIO_PH2 58
-#define TEGRA_GPIO_PH3 59
-#define TEGRA_GPIO_PH4 60
-#define TEGRA_GPIO_PH5 61
-#define TEGRA_GPIO_PH6 62
-#define TEGRA_GPIO_PH7 63
-#define TEGRA_GPIO_PI0 64
-#define TEGRA_GPIO_PI1 65
-#define TEGRA_GPIO_PI2 66
-#define TEGRA_GPIO_PI3 67
-#define TEGRA_GPIO_PI4 68
-#define TEGRA_GPIO_PI5 69
-#define TEGRA_GPIO_PI6 70
-#define TEGRA_GPIO_PI7 71
-#define TEGRA_GPIO_PJ0 72
-#define TEGRA_GPIO_PJ1 73
-#define TEGRA_GPIO_PJ2 74
-#define TEGRA_GPIO_PJ3 75
-#define TEGRA_GPIO_PJ4 76
-#define TEGRA_GPIO_PJ5 77
-#define TEGRA_GPIO_PJ6 78
-#define TEGRA_GPIO_PJ7 79
-#define TEGRA_GPIO_PK0 80
-#define TEGRA_GPIO_PK1 81
-#define TEGRA_GPIO_PK2 82
-#define TEGRA_GPIO_PK3 83
-#define TEGRA_GPIO_PK4 84
-#define TEGRA_GPIO_PK5 85
-#define TEGRA_GPIO_PK6 86
-#define TEGRA_GPIO_PK7 87
-#define TEGRA_GPIO_PL0 88
-#define TEGRA_GPIO_PL1 89
-#define TEGRA_GPIO_PL2 90
-#define TEGRA_GPIO_PL3 91
-#define TEGRA_GPIO_PL4 92
-#define TEGRA_GPIO_PL5 93
-#define TEGRA_GPIO_PL6 94
-#define TEGRA_GPIO_PL7 95
-#define TEGRA_GPIO_PM0 96
-#define TEGRA_GPIO_PM1 97
-#define TEGRA_GPIO_PM2 98
-#define TEGRA_GPIO_PM3 99
-#define TEGRA_GPIO_PM4 100
-#define TEGRA_GPIO_PM5 101
-#define TEGRA_GPIO_PM6 102
-#define TEGRA_GPIO_PM7 103
-#define TEGRA_GPIO_PN0 104
-#define TEGRA_GPIO_PN1 105
-#define TEGRA_GPIO_PN2 106
-#define TEGRA_GPIO_PN3 107
-#define TEGRA_GPIO_PN4 108
-#define TEGRA_GPIO_PN5 109
-#define TEGRA_GPIO_PN6 110
-#define TEGRA_GPIO_PN7 111
-#define TEGRA_GPIO_PO0 112
-#define TEGRA_GPIO_PO1 113
-#define TEGRA_GPIO_PO2 114
-#define TEGRA_GPIO_PO3 115
-#define TEGRA_GPIO_PO4 116
-#define TEGRA_GPIO_PO5 117
-#define TEGRA_GPIO_PO6 118
-#define TEGRA_GPIO_PO7 119
-#define TEGRA_GPIO_PP0 120
-#define TEGRA_GPIO_PP1 121
-#define TEGRA_GPIO_PP2 122
-#define TEGRA_GPIO_PP3 123
-#define TEGRA_GPIO_PP4 124
-#define TEGRA_GPIO_PP5 125
-#define TEGRA_GPIO_PP6 126
-#define TEGRA_GPIO_PP7 127
-#define TEGRA_GPIO_PQ0 128
-#define TEGRA_GPIO_PQ1 129
-#define TEGRA_GPIO_PQ2 130
-#define TEGRA_GPIO_PQ3 131
-#define TEGRA_GPIO_PQ4 132
-#define TEGRA_GPIO_PQ5 133
-#define TEGRA_GPIO_PQ6 134
-#define TEGRA_GPIO_PQ7 135
-#define TEGRA_GPIO_PR0 136
-#define TEGRA_GPIO_PR1 137
-#define TEGRA_GPIO_PR2 138
-#define TEGRA_GPIO_PR3 139
-#define TEGRA_GPIO_PR4 140
-#define TEGRA_GPIO_PR5 141
-#define TEGRA_GPIO_PR6 142
-#define TEGRA_GPIO_PR7 143
-#define TEGRA_GPIO_PS0 144
-#define TEGRA_GPIO_PS1 145
-#define TEGRA_GPIO_PS2 146
-#define TEGRA_GPIO_PS3 147
-#define TEGRA_GPIO_PS4 148
-#define TEGRA_GPIO_PS5 149
-#define TEGRA_GPIO_PS6 150
-#define TEGRA_GPIO_PS7 151
-#define TEGRA_GPIO_PT0 152
-#define TEGRA_GPIO_PT1 153
-#define TEGRA_GPIO_PT2 154
-#define TEGRA_GPIO_PT3 155
-#define TEGRA_GPIO_PT4 156
-#define TEGRA_GPIO_PT5 157
-#define TEGRA_GPIO_PT6 158
-#define TEGRA_GPIO_PT7 159
-#define TEGRA_GPIO_PU0 160
-#define TEGRA_GPIO_PU1 161
-#define TEGRA_GPIO_PU2 162
-#define TEGRA_GPIO_PU3 163
-#define TEGRA_GPIO_PU4 164
-#define TEGRA_GPIO_PU5 165
-#define TEGRA_GPIO_PU6 166
-#define TEGRA_GPIO_PU7 167
-#define TEGRA_GPIO_PV0 168
-#define TEGRA_GPIO_PV1 169
-#define TEGRA_GPIO_PV2 170
-#define TEGRA_GPIO_PV3 171
-#define TEGRA_GPIO_PV4 172
-#define TEGRA_GPIO_PV5 173
-#define TEGRA_GPIO_PV6 174
-#define TEGRA_GPIO_PV7 175
-#define TEGRA_GPIO_PW0 176
-#define TEGRA_GPIO_PW1 177
-#define TEGRA_GPIO_PW2 178
-#define TEGRA_GPIO_PW3 179
-#define TEGRA_GPIO_PW4 180
-#define TEGRA_GPIO_PW5 181
-#define TEGRA_GPIO_PW6 182
-#define TEGRA_GPIO_PW7 183
-#define TEGRA_GPIO_PX0 184
-#define TEGRA_GPIO_PX1 185
-#define TEGRA_GPIO_PX2 186
-#define TEGRA_GPIO_PX3 187
-#define TEGRA_GPIO_PX4 188
-#define TEGRA_GPIO_PX5 189
-#define TEGRA_GPIO_PX6 190
-#define TEGRA_GPIO_PX7 191
-#define TEGRA_GPIO_PY0 192
-#define TEGRA_GPIO_PY1 193
-#define TEGRA_GPIO_PY2 194
-#define TEGRA_GPIO_PY3 195
-#define TEGRA_GPIO_PY4 196
-#define TEGRA_GPIO_PY5 197
-#define TEGRA_GPIO_PY6 198
-#define TEGRA_GPIO_PY7 199
-#define TEGRA_GPIO_PZ0 200
-#define TEGRA_GPIO_PZ1 201
-#define TEGRA_GPIO_PZ2 202
-#define TEGRA_GPIO_PZ3 203
-#define TEGRA_GPIO_PZ4 204
-#define TEGRA_GPIO_PZ5 205
-#define TEGRA_GPIO_PZ6 206
-#define TEGRA_GPIO_PZ7 207
-#define TEGRA_GPIO_PAA0 208
-#define TEGRA_GPIO_PAA1 209
-#define TEGRA_GPIO_PAA2 210
-#define TEGRA_GPIO_PAA3 211
-#define TEGRA_GPIO_PAA4 212
-#define TEGRA_GPIO_PAA5 213
-#define TEGRA_GPIO_PAA6 214
-#define TEGRA_GPIO_PAA7 215
-#define TEGRA_GPIO_PBB0 216
-#define TEGRA_GPIO_PBB1 217
-#define TEGRA_GPIO_PBB2 218
-#define TEGRA_GPIO_PBB3 219
-#define TEGRA_GPIO_PBB4 220
-#define TEGRA_GPIO_PBB5 221
-#define TEGRA_GPIO_PBB6 222
-#define TEGRA_GPIO_PBB7 223
-
-#endif
diff --git a/arch/arm/mach-tegra/include/mach/gpio-tegra.h b/arch/arm/mach-tegra/include/mach/gpio-tegra.h
index 87d37fd..b06b998 100644
--- a/arch/arm/mach-tegra/include/mach/gpio-tegra.h
+++ b/arch/arm/mach-tegra/include/mach/gpio-tegra.h
@@ -23,6 +23,231 @@
#include <linux/types.h>
#include <mach/irqs.h>
+#define TEGRA_GPIO_PA0 0
+#define TEGRA_GPIO_PA1 1
+#define TEGRA_GPIO_PA2 2
+#define TEGRA_GPIO_PA3 3
+#define TEGRA_GPIO_PA4 4
+#define TEGRA_GPIO_PA5 5
+#define TEGRA_GPIO_PA6 6
+#define TEGRA_GPIO_PA7 7
+#define TEGRA_GPIO_PB0 8
+#define TEGRA_GPIO_PB1 9
+#define TEGRA_GPIO_PB2 10
+#define TEGRA_GPIO_PB3 11
+#define TEGRA_GPIO_PB4 12
+#define TEGRA_GPIO_PB5 13
+#define TEGRA_GPIO_PB6 14
+#define TEGRA_GPIO_PB7 15
+#define TEGRA_GPIO_PC0 16
+#define TEGRA_GPIO_PC1 17
+#define TEGRA_GPIO_PC2 18
+#define TEGRA_GPIO_PC3 19
+#define TEGRA_GPIO_PC4 20
+#define TEGRA_GPIO_PC5 21
+#define TEGRA_GPIO_PC6 22
+#define TEGRA_GPIO_PC7 23
+#define TEGRA_GPIO_PD0 24
+#define TEGRA_GPIO_PD1 25
+#define TEGRA_GPIO_PD2 26
+#define TEGRA_GPIO_PD3 27
+#define TEGRA_GPIO_PD4 28
+#define TEGRA_GPIO_PD5 29
+#define TEGRA_GPIO_PD6 30
+#define TEGRA_GPIO_PD7 31
+#define TEGRA_GPIO_PE0 32
+#define TEGRA_GPIO_PE1 33
+#define TEGRA_GPIO_PE2 34
+#define TEGRA_GPIO_PE3 35
+#define TEGRA_GPIO_PE4 36
+#define TEGRA_GPIO_PE5 37
+#define TEGRA_GPIO_PE6 38
+#define TEGRA_GPIO_PE7 39
+#define TEGRA_GPIO_PF0 40
+#define TEGRA_GPIO_PF1 41
+#define TEGRA_GPIO_PF2 42
+#define TEGRA_GPIO_PF3 43
+#define TEGRA_GPIO_PF4 44
+#define TEGRA_GPIO_PF5 45
+#define TEGRA_GPIO_PF6 46
+#define TEGRA_GPIO_PF7 47
+#define TEGRA_GPIO_PG0 48
+#define TEGRA_GPIO_PG1 49
+#define TEGRA_GPIO_PG2 50
+#define TEGRA_GPIO_PG3 51
+#define TEGRA_GPIO_PG4 52
+#define TEGRA_GPIO_PG5 53
+#define TEGRA_GPIO_PG6 54
+#define TEGRA_GPIO_PG7 55
+#define TEGRA_GPIO_PH0 56
+#define TEGRA_GPIO_PH1 57
+#define TEGRA_GPIO_PH2 58
+#define TEGRA_GPIO_PH3 59
+#define TEGRA_GPIO_PH4 60
+#define TEGRA_GPIO_PH5 61
+#define TEGRA_GPIO_PH6 62
+#define TEGRA_GPIO_PH7 63
+#define TEGRA_GPIO_PI0 64
+#define TEGRA_GPIO_PI1 65
+#define TEGRA_GPIO_PI2 66
+#define TEGRA_GPIO_PI3 67
+#define TEGRA_GPIO_PI4 68
+#define TEGRA_GPIO_PI5 69
+#define TEGRA_GPIO_PI6 70
+#define TEGRA_GPIO_PI7 71
+#define TEGRA_GPIO_PJ0 72
+#define TEGRA_GPIO_PJ1 73
+#define TEGRA_GPIO_PJ2 74
+#define TEGRA_GPIO_PJ3 75
+#define TEGRA_GPIO_PJ4 76
+#define TEGRA_GPIO_PJ5 77
+#define TEGRA_GPIO_PJ6 78
+#define TEGRA_GPIO_PJ7 79
+#define TEGRA_GPIO_PK0 80
+#define TEGRA_GPIO_PK1 81
+#define TEGRA_GPIO_PK2 82
+#define TEGRA_GPIO_PK3 83
+#define TEGRA_GPIO_PK4 84
+#define TEGRA_GPIO_PK5 85
+#define TEGRA_GPIO_PK6 86
+#define TEGRA_GPIO_PK7 87
+#define TEGRA_GPIO_PL0 88
+#define TEGRA_GPIO_PL1 89
+#define TEGRA_GPIO_PL2 90
+#define TEGRA_GPIO_PL3 91
+#define TEGRA_GPIO_PL4 92
+#define TEGRA_GPIO_PL5 93
+#define TEGRA_GPIO_PL6 94
+#define TEGRA_GPIO_PL7 95
+#define TEGRA_GPIO_PM0 96
+#define TEGRA_GPIO_PM1 97
+#define TEGRA_GPIO_PM2 98
+#define TEGRA_GPIO_PM3 99
+#define TEGRA_GPIO_PM4 100
+#define TEGRA_GPIO_PM5 101
+#define TEGRA_GPIO_PM6 102
+#define TEGRA_GPIO_PM7 103
+#define TEGRA_GPIO_PN0 104
+#define TEGRA_GPIO_PN1 105
+#define TEGRA_GPIO_PN2 106
+#define TEGRA_GPIO_PN3 107
+#define TEGRA_GPIO_PN4 108
+#define TEGRA_GPIO_PN5 109
+#define TEGRA_GPIO_PN6 110
+#define TEGRA_GPIO_PN7 111
+#define TEGRA_GPIO_PO0 112
+#define TEGRA_GPIO_PO1 113
+#define TEGRA_GPIO_PO2 114
+#define TEGRA_GPIO_PO3 115
+#define TEGRA_GPIO_PO4 116
+#define TEGRA_GPIO_PO5 117
+#define TEGRA_GPIO_PO6 118
+#define TEGRA_GPIO_PO7 119
+#define TEGRA_GPIO_PP0 120
+#define TEGRA_GPIO_PP1 121
+#define TEGRA_GPIO_PP2 122
+#define TEGRA_GPIO_PP3 123
+#define TEGRA_GPIO_PP4 124
+#define TEGRA_GPIO_PP5 125
+#define TEGRA_GPIO_PP6 126
+#define TEGRA_GPIO_PP7 127
+#define TEGRA_GPIO_PQ0 128
+#define TEGRA_GPIO_PQ1 129
+#define TEGRA_GPIO_PQ2 130
+#define TEGRA_GPIO_PQ3 131
+#define TEGRA_GPIO_PQ4 132
+#define TEGRA_GPIO_PQ5 133
+#define TEGRA_GPIO_PQ6 134
+#define TEGRA_GPIO_PQ7 135
+#define TEGRA_GPIO_PR0 136
+#define TEGRA_GPIO_PR1 137
+#define TEGRA_GPIO_PR2 138
+#define TEGRA_GPIO_PR3 139
+#define TEGRA_GPIO_PR4 140
+#define TEGRA_GPIO_PR5 141
+#define TEGRA_GPIO_PR6 142
+#define TEGRA_GPIO_PR7 143
+#define TEGRA_GPIO_PS0 144
+#define TEGRA_GPIO_PS1 145
+#define TEGRA_GPIO_PS2 146
+#define TEGRA_GPIO_PS3 147
+#define TEGRA_GPIO_PS4 148
+#define TEGRA_GPIO_PS5 149
+#define TEGRA_GPIO_PS6 150
+#define TEGRA_GPIO_PS7 151
+#define TEGRA_GPIO_PT0 152
+#define TEGRA_GPIO_PT1 153
+#define TEGRA_GPIO_PT2 154
+#define TEGRA_GPIO_PT3 155
+#define TEGRA_GPIO_PT4 156
+#define TEGRA_GPIO_PT5 157
+#define TEGRA_GPIO_PT6 158
+#define TEGRA_GPIO_PT7 159
+#define TEGRA_GPIO_PU0 160
+#define TEGRA_GPIO_PU1 161
+#define TEGRA_GPIO_PU2 162
+#define TEGRA_GPIO_PU3 163
+#define TEGRA_GPIO_PU4 164
+#define TEGRA_GPIO_PU5 165
+#define TEGRA_GPIO_PU6 166
+#define TEGRA_GPIO_PU7 167
+#define TEGRA_GPIO_PV0 168
+#define TEGRA_GPIO_PV1 169
+#define TEGRA_GPIO_PV2 170
+#define TEGRA_GPIO_PV3 171
+#define TEGRA_GPIO_PV4 172
+#define TEGRA_GPIO_PV5 173
+#define TEGRA_GPIO_PV6 174
+#define TEGRA_GPIO_PV7 175
+#define TEGRA_GPIO_PW0 176
+#define TEGRA_GPIO_PW1 177
+#define TEGRA_GPIO_PW2 178
+#define TEGRA_GPIO_PW3 179
+#define TEGRA_GPIO_PW4 180
+#define TEGRA_GPIO_PW5 181
+#define TEGRA_GPIO_PW6 182
+#define TEGRA_GPIO_PW7 183
+#define TEGRA_GPIO_PX0 184
+#define TEGRA_GPIO_PX1 185
+#define TEGRA_GPIO_PX2 186
+#define TEGRA_GPIO_PX3 187
+#define TEGRA_GPIO_PX4 188
+#define TEGRA_GPIO_PX5 189
+#define TEGRA_GPIO_PX6 190
+#define TEGRA_GPIO_PX7 191
+#define TEGRA_GPIO_PY0 192
+#define TEGRA_GPIO_PY1 193
+#define TEGRA_GPIO_PY2 194
+#define TEGRA_GPIO_PY3 195
+#define TEGRA_GPIO_PY4 196
+#define TEGRA_GPIO_PY5 197
+#define TEGRA_GPIO_PY6 198
+#define TEGRA_GPIO_PY7 199
+#define TEGRA_GPIO_PZ0 200
+#define TEGRA_GPIO_PZ1 201
+#define TEGRA_GPIO_PZ2 202
+#define TEGRA_GPIO_PZ3 203
+#define TEGRA_GPIO_PZ4 204
+#define TEGRA_GPIO_PZ5 205
+#define TEGRA_GPIO_PZ6 206
+#define TEGRA_GPIO_PZ7 207
+#define TEGRA_GPIO_PAA0 208
+#define TEGRA_GPIO_PAA1 209
+#define TEGRA_GPIO_PAA2 210
+#define TEGRA_GPIO_PAA3 211
+#define TEGRA_GPIO_PAA4 212
+#define TEGRA_GPIO_PAA5 213
+#define TEGRA_GPIO_PAA6 214
+#define TEGRA_GPIO_PAA7 215
+#define TEGRA_GPIO_PBB0 216
+#define TEGRA_GPIO_PBB1 217
+#define TEGRA_GPIO_PBB2 218
+#define TEGRA_GPIO_PBB3 219
+#define TEGRA_GPIO_PBB4 220
+#define TEGRA_GPIO_PBB5 221
+#define TEGRA_GPIO_PBB6 222
+#define TEGRA_GPIO_PBB7 223
+
#define TEGRA_NR_GPIOS INT_GPIO_NR
#define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio))
--
1.7.0.4
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: [PATCH 3/3] arm/tegra: Move "gpio-names.h" into <mach/gpio-tegra.h>
2011-09-21 19:33 ` Stephen Warren
@ 2011-09-21 20:14 ` Olof Johansson
-1 siblings, 0 replies; 31+ messages in thread
From: Olof Johansson @ 2011-09-21 20:14 UTC (permalink / raw)
To: Stephen Warren
Cc: Russell King, Colin Cross, Erik Gilling, Grant Likely,
Chris Ball, linux-tegra, linux-arm-kernel, linux-kernel,
linux-mmc
Hi,
On Wed, Sep 21, 2011 at 12:33 PM, Stephen Warren <swarren@nvidia.com> wrote:
> This centralizes all SoC-level GPIO-related definitions into a single
> header file.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
>
> 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
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 3/3] arm/tegra: Move "gpio-names.h" into <mach/gpio-tegra.h>
@ 2011-09-21 20:14 ` Olof Johansson
0 siblings, 0 replies; 31+ messages in thread
From: Olof Johansson @ 2011-09-21 20:14 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Wed, Sep 21, 2011 at 12:33 PM, Stephen Warren <swarren@nvidia.com> wrote:
> This centralizes all SoC-level GPIO-related definitions into a single
> header file.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
>
> ?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
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 1/3] arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h
2011-09-21 19:33 ` Stephen Warren
@ 2011-09-21 20:16 ` Olof Johansson
-1 siblings, 0 replies; 31+ messages in thread
From: Olof Johansson @ 2011-09-21 20:16 UTC (permalink / raw)
To: Stephen Warren
Cc: Russell King, Colin Cross, Erik Gilling, Grant Likely,
Chris Ball, linux-tegra, linux-arm-kernel, linux-kernel,
linux-mmc
On Wed, Sep 21, 2011 at 12:33 PM, Stephen Warren <swarren@nvidia.com> wrote:
> This centralizes all GPIO naming in one header.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Olof Johansson <olof@lixom.net>
> ---
> 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
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 1/3] arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h
@ 2011-09-21 20:16 ` Olof Johansson
0 siblings, 0 replies; 31+ messages in thread
From: Olof Johansson @ 2011-09-21 20:16 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Sep 21, 2011 at 12:33 PM, Stephen Warren <swarren@nvidia.com> wrote:
> This centralizes all GPIO naming in one header.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Olof Johansson <olof@lixom.net>
> ---
> 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
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 2/3] arm/tegra: Replace <mach/gpio.h> with <mach/gpio-tegra.h>
2011-09-21 19:33 ` Stephen Warren
@ 2011-09-21 20:17 ` Olof Johansson
-1 siblings, 0 replies; 31+ messages in thread
From: Olof Johansson @ 2011-09-21 20:17 UTC (permalink / raw)
To: Stephen Warren
Cc: Russell King, Colin Cross, Erik Gilling, Grant Likely,
Chris Ball, linux-tegra, linux-arm-kernel, linux-kernel,
linux-mmc
On Wed, Sep 21, 2011 at 12:33 PM, Stephen Warren <swarren@nvidia.com> wrote:
> This will eventually allow <mach/gpio.h> to be deleted. This mirrors
> LinusW's recent equivalent work on various other ARM platforms.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Olof Johansson <olof@lixom.net>
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 2/3] arm/tegra: Replace <mach/gpio.h> with <mach/gpio-tegra.h>
@ 2011-09-21 20:17 ` Olof Johansson
0 siblings, 0 replies; 31+ messages in thread
From: Olof Johansson @ 2011-09-21 20:17 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Sep 21, 2011 at 12:33 PM, Stephen Warren <swarren@nvidia.com> wrote:
> This will eventually allow <mach/gpio.h> to be deleted. This mirrors
> LinusW's recent equivalent work on various other ARM platforms.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Olof Johansson <olof@lixom.net>
^ permalink raw reply [flat|nested] 31+ messages in thread
* RE: [PATCH 3/3] arm/tegra: Move "gpio-names.h" into <mach/gpio-tegra.h>
2011-09-21 20:14 ` Olof Johansson
(?)
@ 2011-09-21 20:29 ` Stephen Warren
-1 siblings, 0 replies; 31+ messages in thread
From: Stephen Warren @ 2011-09-21 20:29 UTC (permalink / raw)
To: Olof Johansson
Cc: Russell King, Colin Cross, Erik Gilling, Grant Likely,
Chris Ball, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA
Olof Johansson wrote at Wednesday, September 21, 2011 2:15 PM:
> On Wed, Sep 21, 2011 at 12:33 PM, Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
> > This centralizes all SoC-level GPIO-related definitions into a single
> > header file.
> >
> > Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> >
> > 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?
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.
--
nvpublic
^ permalink raw reply [flat|nested] 31+ messages in thread
* RE: [PATCH 3/3] arm/tegra: Move "gpio-names.h" into <mach/gpio-tegra.h>
@ 2011-09-21 20:29 ` Stephen Warren
0 siblings, 0 replies; 31+ messages in thread
From: Stephen Warren @ 2011-09-21 20:29 UTC (permalink / raw)
To: Olof Johansson
Cc: Russell King, Colin Cross, Erik Gilling, Grant Likely,
Chris Ball, linux-tegra, linux-arm-kernel, linux-kernel,
linux-mmc
Olof Johansson wrote at Wednesday, September 21, 2011 2:15 PM:
> On Wed, Sep 21, 2011 at 12:33 PM, Stephen Warren <swarren@nvidia.com> wrote:
> > This centralizes all SoC-level GPIO-related definitions into a single
> > header file.
> >
> > Signed-off-by: Stephen Warren <swarren@nvidia.com>
> >
> > 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?
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.
--
nvpublic
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 3/3] arm/tegra: Move "gpio-names.h" into <mach/gpio-tegra.h>
@ 2011-09-21 20:29 ` Stephen Warren
0 siblings, 0 replies; 31+ messages in thread
From: Stephen Warren @ 2011-09-21 20:29 UTC (permalink / raw)
To: linux-arm-kernel
Olof Johansson wrote at Wednesday, September 21, 2011 2:15 PM:
> On Wed, Sep 21, 2011 at 12:33 PM, Stephen Warren <swarren@nvidia.com> wrote:
> > This centralizes all SoC-level GPIO-related definitions into a single
> > header file.
> >
> > Signed-off-by: Stephen Warren <swarren@nvidia.com>
> >
> > ?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?
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.
--
nvpublic
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 1/3] arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h
2011-09-21 20:16 ` Olof Johansson
(?)
@ 2011-09-22 8:11 ` Russell King - ARM Linux
-1 siblings, 0 replies; 31+ messages in thread
From: Russell King - ARM Linux @ 2011-09-22 8:11 UTC (permalink / raw)
To: Olof Johansson
Cc: Stephen Warren, Colin Cross, Erik Gilling, Grant Likely,
Chris Ball, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA
On Wed, Sep 21, 2011 at 01:16:49PM -0700, Olof Johansson wrote:
> 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.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 1/3] arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h
@ 2011-09-22 8:11 ` Russell King - ARM Linux
0 siblings, 0 replies; 31+ messages in thread
From: Russell King - ARM Linux @ 2011-09-22 8:11 UTC (permalink / raw)
To: Olof Johansson
Cc: Stephen Warren, Colin Cross, Erik Gilling, Grant Likely,
Chris Ball, linux-tegra, linux-arm-kernel, linux-kernel,
linux-mmc
On Wed, Sep 21, 2011 at 01:16:49PM -0700, Olof Johansson wrote:
> 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.
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 1/3] arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h
@ 2011-09-22 8:11 ` Russell King - ARM Linux
0 siblings, 0 replies; 31+ messages in thread
From: Russell King - ARM Linux @ 2011-09-22 8:11 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Sep 21, 2011 at 01:16:49PM -0700, Olof Johansson wrote:
> 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.
^ permalink raw reply [flat|nested] 31+ messages in thread
* RE: [PATCH 1/3] arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h
2011-09-22 8:11 ` Russell King - ARM Linux
(?)
@ 2011-09-22 16:31 ` Stephen Warren
-1 siblings, 0 replies; 31+ messages in thread
From: Stephen Warren @ 2011-09-22 16:31 UTC (permalink / raw)
To: Russell King - ARM Linux, Olof Johansson
Cc: Colin Cross, Erik Gilling, Grant Likely, Chris Ball, linux-tegra,
linux-arm-kernel, linux-kernel, linux-mmc
Russell King - ARM Linux wrote at Thursday, September 22, 2011 2:12 AM:
> On Wed, Sep 21, 2011 at 01:16:49PM -0700, Olof Johansson wrote:
> > 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.
> 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.
--
nvpupblic
^ permalink raw reply [flat|nested] 31+ messages in thread
* RE: [PATCH 1/3] arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h
@ 2011-09-22 16:31 ` Stephen Warren
0 siblings, 0 replies; 31+ messages in thread
From: Stephen Warren @ 2011-09-22 16:31 UTC (permalink / raw)
To: Russell King - ARM Linux, Olof Johansson
Cc: Colin Cross, Erik Gilling, Grant Likely, Chris Ball, linux-tegra,
linux-arm-kernel, linux-kernel, linux-mmc
Russell King - ARM Linux wrote at Thursday, September 22, 2011 2:12 AM:
> On Wed, Sep 21, 2011 at 01:16:49PM -0700, Olof Johansson wrote:
> > 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.
> 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.
--
nvpupblic
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 1/3] arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h
@ 2011-09-22 16:31 ` Stephen Warren
0 siblings, 0 replies; 31+ messages in thread
From: Stephen Warren @ 2011-09-22 16:31 UTC (permalink / raw)
To: linux-arm-kernel
Russell King - ARM Linux wrote at Thursday, September 22, 2011 2:12 AM:
> On Wed, Sep 21, 2011 at 01:16:49PM -0700, Olof Johansson wrote:
> > 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.
> 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.
--
nvpupblic
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 1/3] arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h
2011-09-22 16:31 ` Stephen Warren
(?)
@ 2011-09-22 16:32 ` Russell King - ARM Linux
-1 siblings, 0 replies; 31+ messages in thread
From: Russell King - ARM Linux @ 2011-09-22 16:32 UTC (permalink / raw)
To: Stephen Warren
Cc: Olof Johansson, Colin Cross, Erik Gilling, Grant Likely,
Chris Ball, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA
On Thu, Sep 22, 2011 at 09:31:48AM -0700, Stephen Warren wrote:
> Russell King - ARM Linux wrote at Thursday, September 22, 2011 2:12 AM:
> > On Wed, Sep 21, 2011 at 01:16:49PM -0700, Olof Johansson wrote:
> > > 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.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 1/3] arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h
@ 2011-09-22 16:32 ` Russell King - ARM Linux
0 siblings, 0 replies; 31+ messages in thread
From: Russell King - ARM Linux @ 2011-09-22 16:32 UTC (permalink / raw)
To: Stephen Warren
Cc: Olof Johansson, Colin Cross, Erik Gilling, Grant Likely,
Chris Ball, linux-tegra, linux-arm-kernel, linux-kernel,
linux-mmc
On Thu, Sep 22, 2011 at 09:31:48AM -0700, Stephen Warren wrote:
> Russell King - ARM Linux wrote at Thursday, September 22, 2011 2:12 AM:
> > On Wed, Sep 21, 2011 at 01:16:49PM -0700, Olof Johansson wrote:
> > > 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.
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 1/3] arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h
@ 2011-09-22 16:32 ` Russell King - ARM Linux
0 siblings, 0 replies; 31+ messages in thread
From: Russell King - ARM Linux @ 2011-09-22 16:32 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Sep 22, 2011 at 09:31:48AM -0700, Stephen Warren wrote:
> Russell King - ARM Linux wrote at Thursday, September 22, 2011 2:12 AM:
> > On Wed, Sep 21, 2011 at 01:16:49PM -0700, Olof Johansson wrote:
> > > 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.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 1/3] arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h
2011-09-22 16:32 ` Russell King - ARM Linux
(?)
@ 2011-09-22 17:25 ` Grant Likely
-1 siblings, 0 replies; 31+ messages in thread
From: Grant Likely @ 2011-09-22 17:25 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: Stephen Warren, Olof Johansson, Colin Cross, Erik Gilling,
Chris Ball, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA
On Thu, Sep 22, 2011 at 05:32:58PM +0100, Russell King - ARM Linux wrote:
> On Thu, Sep 22, 2011 at 09:31:48AM -0700, Stephen Warren wrote:
> > Russell King - ARM Linux wrote at Thursday, September 22, 2011 2:12 AM:
> > > On Wed, Sep 21, 2011 at 01:16:49PM -0700, Olof Johansson wrote:
> > > > 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.
Yes, I'm comfortable with patches going in via other trees when there
are dependencies.
g.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 1/3] arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h
@ 2011-09-22 17:25 ` Grant Likely
0 siblings, 0 replies; 31+ messages in thread
From: Grant Likely @ 2011-09-22 17:25 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: Stephen Warren, Olof Johansson, Colin Cross, Erik Gilling,
Chris Ball, linux-tegra, linux-arm-kernel, linux-kernel,
linux-mmc
On Thu, Sep 22, 2011 at 05:32:58PM +0100, Russell King - ARM Linux wrote:
> On Thu, Sep 22, 2011 at 09:31:48AM -0700, Stephen Warren wrote:
> > Russell King - ARM Linux wrote at Thursday, September 22, 2011 2:12 AM:
> > > On Wed, Sep 21, 2011 at 01:16:49PM -0700, Olof Johansson wrote:
> > > > 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.
Yes, I'm comfortable with patches going in via other trees when there
are dependencies.
g.
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 1/3] arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h
@ 2011-09-22 17:25 ` Grant Likely
0 siblings, 0 replies; 31+ messages in thread
From: Grant Likely @ 2011-09-22 17:25 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Sep 22, 2011 at 05:32:58PM +0100, Russell King - ARM Linux wrote:
> On Thu, Sep 22, 2011 at 09:31:48AM -0700, Stephen Warren wrote:
> > Russell King - ARM Linux wrote at Thursday, September 22, 2011 2:12 AM:
> > > On Wed, Sep 21, 2011 at 01:16:49PM -0700, Olof Johansson wrote:
> > > > 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.
Yes, I'm comfortable with patches going in via other trees when there
are dependencies.
g.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 2/3] arm/tegra: Replace <mach/gpio.h> with <mach/gpio-tegra.h>
2011-09-21 19:33 ` Stephen Warren
(?)
@ 2011-09-22 17:26 ` Grant Likely
-1 siblings, 0 replies; 31+ messages in thread
From: Grant Likely @ 2011-09-22 17:26 UTC (permalink / raw)
To: Stephen Warren
Cc: Russell King, Colin Cross, Erik Gilling, Olof Johansson,
Chris Ball, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-mmc-u79uwXL29TY76Z2rM5mHXA
On Wed, Sep 21, 2011 at 01:33:39PM -0600, Stephen Warren wrote:
> This will eventually allow <mach/gpio.h> to be deleted. This mirrors
> LinusW's recent equivalent work on various other ARM platforms.
>
> Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Acked-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
> ---
> 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
>
> diff --git a/arch/arm/mach-tegra/board-harmony.h b/arch/arm/mach-tegra/board-harmony.h
> index 280d203..139d96c 100644
> --- a/arch/arm/mach-tegra/board-harmony.h
> +++ b/arch/arm/mach-tegra/board-harmony.h
> @@ -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_))
>
> diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h
> index 86057c3..2dc1899 100644
> --- a/arch/arm/mach-tegra/board-paz00.h
> +++ b/arch/arm/mach-tegra/board-paz00.h
> @@ -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
> diff --git a/arch/arm/mach-tegra/board-seaboard.h b/arch/arm/mach-tegra/board-seaboard.h
> index d06c334..4c45d4c 100644
> --- a/arch/arm/mach-tegra/board-seaboard.h
> +++ b/arch/arm/mach-tegra/board-seaboard.h
> @@ -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_))
>
> diff --git a/arch/arm/mach-tegra/board-trimslice.h b/arch/arm/mach-tegra/board-trimslice.h
> index 7a7dee8..50f128d 100644
> --- a/arch/arm/mach-tegra/board-trimslice.h
> +++ b/arch/arm/mach-tegra/board-trimslice.h
> @@ -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 */
>
> diff --git a/arch/arm/mach-tegra/include/mach/gpio-tegra.h b/arch/arm/mach-tegra/include/mach/gpio-tegra.h
> new file mode 100644
> index 0000000..87d37fd
> --- /dev/null
> +++ b/arch/arm/mach-tegra/include/mach/gpio-tegra.h
> @@ -0,0 +1,39 @@
> +/*
> + * arch/arm/mach-tegra/include/mach/gpio.h
> + *
> + * Copyright (C) 2010 Google, Inc.
> + *
> + * Author:
> + * Erik Gilling <konkers-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
> + *
> + * 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
> diff --git a/arch/arm/mach-tegra/include/mach/gpio.h b/arch/arm/mach-tegra/include/mach/gpio.h
> index 7910d26..e69de29 100644
> --- a/arch/arm/mach-tegra/include/mach/gpio.h
> +++ b/arch/arm/mach-tegra/include/mach/gpio.h
> @@ -1,39 +0,0 @@
> -/*
> - * arch/arm/mach-tegra/include/mach/gpio.h
> - *
> - * Copyright (C) 2010 Google, Inc.
> - *
> - * Author:
> - * Erik Gilling <konkers-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
> - *
> - * 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
> diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c
> index 88081bb..37576a7 100644
> --- a/arch/arm/mach-tegra/usb_phy.c
> +++ b/arch/arm/mach-tegra/usb_phy.c
> @@ -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>
>
> diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
> index df64536..6b65207 100644
> --- a/drivers/gpio/gpio-tegra.c
> +++ b/drivers/gpio/gpio-tegra.c
> @@ -27,6 +27,7 @@
>
> #include <asm/mach/irq.h>
>
> +#include <mach/gpio-tegra.h>
> #include <mach/iomap.h>
> #include <mach/suspend.h>
>
> diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
> index 67176af..067a4cd 100644
> --- a/drivers/mmc/host/sdhci-tegra.c
> +++ b/drivers/mmc/host/sdhci-tegra.c
> @@ -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"
> --
> 1.7.0.4
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: [PATCH 2/3] arm/tegra: Replace <mach/gpio.h> with <mach/gpio-tegra.h>
@ 2011-09-22 17:26 ` Grant Likely
0 siblings, 0 replies; 31+ messages in thread
From: Grant Likely @ 2011-09-22 17:26 UTC (permalink / raw)
To: Stephen Warren
Cc: Russell King, Colin Cross, Erik Gilling, Olof Johansson,
Chris Ball, linux-tegra, linux-arm-kernel, linux-kernel,
linux-mmc
On Wed, Sep 21, 2011 at 01:33:39PM -0600, Stephen Warren wrote:
> This will eventually allow <mach/gpio.h> to be deleted. This mirrors
> LinusW's recent equivalent work on various other ARM platforms.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> 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
>
> diff --git a/arch/arm/mach-tegra/board-harmony.h b/arch/arm/mach-tegra/board-harmony.h
> index 280d203..139d96c 100644
> --- a/arch/arm/mach-tegra/board-harmony.h
> +++ b/arch/arm/mach-tegra/board-harmony.h
> @@ -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_))
>
> diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h
> index 86057c3..2dc1899 100644
> --- a/arch/arm/mach-tegra/board-paz00.h
> +++ b/arch/arm/mach-tegra/board-paz00.h
> @@ -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
> diff --git a/arch/arm/mach-tegra/board-seaboard.h b/arch/arm/mach-tegra/board-seaboard.h
> index d06c334..4c45d4c 100644
> --- a/arch/arm/mach-tegra/board-seaboard.h
> +++ b/arch/arm/mach-tegra/board-seaboard.h
> @@ -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_))
>
> diff --git a/arch/arm/mach-tegra/board-trimslice.h b/arch/arm/mach-tegra/board-trimslice.h
> index 7a7dee8..50f128d 100644
> --- a/arch/arm/mach-tegra/board-trimslice.h
> +++ b/arch/arm/mach-tegra/board-trimslice.h
> @@ -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 */
>
> diff --git a/arch/arm/mach-tegra/include/mach/gpio-tegra.h b/arch/arm/mach-tegra/include/mach/gpio-tegra.h
> new file mode 100644
> index 0000000..87d37fd
> --- /dev/null
> +++ b/arch/arm/mach-tegra/include/mach/gpio-tegra.h
> @@ -0,0 +1,39 @@
> +/*
> + * arch/arm/mach-tegra/include/mach/gpio.h
> + *
> + * Copyright (C) 2010 Google, Inc.
> + *
> + * Author:
> + * Erik Gilling <konkers@google.com>
> + *
> + * 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
> diff --git a/arch/arm/mach-tegra/include/mach/gpio.h b/arch/arm/mach-tegra/include/mach/gpio.h
> index 7910d26..e69de29 100644
> --- a/arch/arm/mach-tegra/include/mach/gpio.h
> +++ b/arch/arm/mach-tegra/include/mach/gpio.h
> @@ -1,39 +0,0 @@
> -/*
> - * arch/arm/mach-tegra/include/mach/gpio.h
> - *
> - * Copyright (C) 2010 Google, Inc.
> - *
> - * Author:
> - * Erik Gilling <konkers@google.com>
> - *
> - * 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
> diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c
> index 88081bb..37576a7 100644
> --- a/arch/arm/mach-tegra/usb_phy.c
> +++ b/arch/arm/mach-tegra/usb_phy.c
> @@ -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>
>
> diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
> index df64536..6b65207 100644
> --- a/drivers/gpio/gpio-tegra.c
> +++ b/drivers/gpio/gpio-tegra.c
> @@ -27,6 +27,7 @@
>
> #include <asm/mach/irq.h>
>
> +#include <mach/gpio-tegra.h>
> #include <mach/iomap.h>
> #include <mach/suspend.h>
>
> diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
> index 67176af..067a4cd 100644
> --- a/drivers/mmc/host/sdhci-tegra.c
> +++ b/drivers/mmc/host/sdhci-tegra.c
> @@ -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"
> --
> 1.7.0.4
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* [PATCH 2/3] arm/tegra: Replace <mach/gpio.h> with <mach/gpio-tegra.h>
@ 2011-09-22 17:26 ` Grant Likely
0 siblings, 0 replies; 31+ messages in thread
From: Grant Likely @ 2011-09-22 17:26 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Sep 21, 2011 at 01:33:39PM -0600, Stephen Warren wrote:
> This will eventually allow <mach/gpio.h> to be deleted. This mirrors
> LinusW's recent equivalent work on various other ARM platforms.
>
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> 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
>
> diff --git a/arch/arm/mach-tegra/board-harmony.h b/arch/arm/mach-tegra/board-harmony.h
> index 280d203..139d96c 100644
> --- a/arch/arm/mach-tegra/board-harmony.h
> +++ b/arch/arm/mach-tegra/board-harmony.h
> @@ -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_))
>
> diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h
> index 86057c3..2dc1899 100644
> --- a/arch/arm/mach-tegra/board-paz00.h
> +++ b/arch/arm/mach-tegra/board-paz00.h
> @@ -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
> diff --git a/arch/arm/mach-tegra/board-seaboard.h b/arch/arm/mach-tegra/board-seaboard.h
> index d06c334..4c45d4c 100644
> --- a/arch/arm/mach-tegra/board-seaboard.h
> +++ b/arch/arm/mach-tegra/board-seaboard.h
> @@ -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_))
>
> diff --git a/arch/arm/mach-tegra/board-trimslice.h b/arch/arm/mach-tegra/board-trimslice.h
> index 7a7dee8..50f128d 100644
> --- a/arch/arm/mach-tegra/board-trimslice.h
> +++ b/arch/arm/mach-tegra/board-trimslice.h
> @@ -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 */
>
> diff --git a/arch/arm/mach-tegra/include/mach/gpio-tegra.h b/arch/arm/mach-tegra/include/mach/gpio-tegra.h
> new file mode 100644
> index 0000000..87d37fd
> --- /dev/null
> +++ b/arch/arm/mach-tegra/include/mach/gpio-tegra.h
> @@ -0,0 +1,39 @@
> +/*
> + * arch/arm/mach-tegra/include/mach/gpio.h
> + *
> + * Copyright (C) 2010 Google, Inc.
> + *
> + * Author:
> + * Erik Gilling <konkers@google.com>
> + *
> + * 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
> diff --git a/arch/arm/mach-tegra/include/mach/gpio.h b/arch/arm/mach-tegra/include/mach/gpio.h
> index 7910d26..e69de29 100644
> --- a/arch/arm/mach-tegra/include/mach/gpio.h
> +++ b/arch/arm/mach-tegra/include/mach/gpio.h
> @@ -1,39 +0,0 @@
> -/*
> - * arch/arm/mach-tegra/include/mach/gpio.h
> - *
> - * Copyright (C) 2010 Google, Inc.
> - *
> - * Author:
> - * Erik Gilling <konkers@google.com>
> - *
> - * 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
> diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c
> index 88081bb..37576a7 100644
> --- a/arch/arm/mach-tegra/usb_phy.c
> +++ b/arch/arm/mach-tegra/usb_phy.c
> @@ -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>
>
> diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
> index df64536..6b65207 100644
> --- a/drivers/gpio/gpio-tegra.c
> +++ b/drivers/gpio/gpio-tegra.c
> @@ -27,6 +27,7 @@
>
> #include <asm/mach/irq.h>
>
> +#include <mach/gpio-tegra.h>
> #include <mach/iomap.h>
> #include <mach/suspend.h>
>
> diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c
> index 67176af..067a4cd 100644
> --- a/drivers/mmc/host/sdhci-tegra.c
> +++ b/drivers/mmc/host/sdhci-tegra.c
> @@ -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"
> --
> 1.7.0.4
>
^ permalink raw reply [flat|nested] 31+ messages in thread
end of thread, other threads:[~2011-09-22 17:26 UTC | newest]
Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-21 19:33 [PATCH 1/3] arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h Stephen Warren
2011-09-21 19:33 ` Stephen Warren
2011-09-21 19:33 ` Stephen Warren
2011-09-21 19:33 ` [PATCH 2/3] arm/tegra: Replace <mach/gpio.h> with <mach/gpio-tegra.h> Stephen Warren
2011-09-21 19:33 ` Stephen Warren
2011-09-21 20:17 ` Olof Johansson
2011-09-21 20:17 ` Olof Johansson
[not found] ` <1316633620-13184-2-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-09-22 17:26 ` Grant Likely
2011-09-22 17:26 ` Grant Likely
2011-09-22 17:26 ` Grant Likely
2011-09-21 19:33 ` [PATCH 3/3] arm/tegra: Move "gpio-names.h" into <mach/gpio-tegra.h> Stephen Warren
2011-09-21 19:33 ` Stephen Warren
2011-09-21 20:14 ` Olof Johansson
2011-09-21 20:14 ` Olof Johansson
2011-09-21 20:29 ` Stephen Warren
2011-09-21 20:29 ` Stephen Warren
2011-09-21 20:29 ` Stephen Warren
2011-09-21 20:16 ` [PATCH 1/3] arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h Olof Johansson
2011-09-21 20:16 ` Olof Johansson
[not found] ` <CAOesGMisOtEQpcS-hHi-3brpYzJr-UiB6b71c+bwkesPDk9iuA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-09-22 8:11 ` Russell King - ARM Linux
2011-09-22 8:11 ` Russell King - ARM Linux
2011-09-22 8:11 ` Russell King - ARM Linux
2011-09-22 16:31 ` Stephen Warren
2011-09-22 16:31 ` Stephen Warren
2011-09-22 16:31 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF1739554CBD-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-09-22 16:32 ` Russell King - ARM Linux
2011-09-22 16:32 ` Russell King - ARM Linux
2011-09-22 16:32 ` Russell King - ARM Linux
[not found] ` <20110922163258.GD8072-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2011-09-22 17:25 ` Grant Likely
2011-09-22 17:25 ` Grant Likely
2011-09-22 17:25 ` Grant Likely
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.