From: swarren@nvidia.com (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h
Date: Wed, 21 Sep 2011 13:33:38 -0600 [thread overview]
Message-ID: <1316633620-13184-1-git-send-email-swarren@nvidia.com> (raw)
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
next reply other threads:[~2011-09-21 19:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-21 19:33 Stephen Warren [this message]
2011-09-21 19:33 ` [PATCH 2/3] arm/tegra: Replace <mach/gpio.h> with <mach/gpio-tegra.h> Stephen Warren
2011-09-21 20:17 ` Olof Johansson
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 20:14 ` Olof Johansson
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-22 8:11 ` Russell King - ARM Linux
2011-09-22 16:31 ` Stephen Warren
2011-09-22 16:32 ` Russell King - ARM Linux
2011-09-22 17:25 ` Grant Likely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1316633620-13184-1-git-send-email-swarren@nvidia.com \
--to=swarren@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).