linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
	Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: [PATCH 1/9] arm/tegra: Split Seaboard GPIO table to allow for Ventana
Date: Fri, 16 Dec 2011 15:12:24 -0700	[thread overview]
Message-ID: <1324073552-15542-2-git-send-email-swarren@nvidia.com> (raw)
In-Reply-To: <1324073552-15542-1-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Seaboard and Ventana share some GPIOs, but others are different. Split the
GPIO table into common, seaboard-specific, and ventana-specific tables, so
that only the correct ones are enabled for each board. Add a few missing
audio-related GPIOs for Ventana.

Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/mach-tegra/board-seaboard-pinmux.c |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-tegra/board-seaboard-pinmux.c b/arch/arm/mach-tegra/board-seaboard-pinmux.c
index b1c2972..cb5b2e9 100644
--- a/arch/arm/mach-tegra/board-seaboard-pinmux.c
+++ b/arch/arm/mach-tegra/board-seaboard-pinmux.c
@@ -190,14 +190,26 @@ static struct tegra_gpio_table common_gpio_table[] = {
 	{ .gpio = TEGRA_GPIO_SD2_CD,		.enable = true },
 	{ .gpio = TEGRA_GPIO_SD2_WP,		.enable = true },
 	{ .gpio = TEGRA_GPIO_SD2_POWER,		.enable = true },
+	{ .gpio = TEGRA_GPIO_CDC_IRQ,		.enable = true },
+};
+
+static struct tegra_gpio_table seaboard_gpio_table[] = {
 	{ .gpio = TEGRA_GPIO_LIDSWITCH,		.enable = true },
 	{ .gpio = TEGRA_GPIO_POWERKEY,		.enable = true },
 	{ .gpio = TEGRA_GPIO_HP_DET,		.enable = true },
 	{ .gpio = TEGRA_GPIO_ISL29018_IRQ,	.enable = true },
-	{ .gpio = TEGRA_GPIO_CDC_IRQ,		.enable = true },
 	{ .gpio = TEGRA_GPIO_USB1,		.enable = true },
 };
 
+static struct tegra_gpio_table ventana_gpio_table[] = {
+	/* hp_det */
+	{ .gpio = TEGRA_GPIO_PW2,		.enable = true },
+	/* int_mic_en */
+	{ .gpio = TEGRA_GPIO_PX0,		.enable = true },
+	/* ext_mic_en */
+	{ .gpio = TEGRA_GPIO_PX1,		.enable = true },
+};
+
 static void __init update_pinmux(struct tegra_pingroup_config *newtbl, int size)
 {
 	int i, j;
@@ -235,11 +247,13 @@ void __init seaboard_common_pinmux_init(void)
 void __init seaboard_pinmux_init(void)
 {
 	seaboard_common_pinmux_init();
+	tegra_gpio_config(seaboard_gpio_table, ARRAY_SIZE(seaboard_gpio_table));
 }
 
 void __init ventana_pinmux_init(void)
 {
 	update_pinmux(ventana_pinmux, ARRAY_SIZE(ventana_pinmux));
 	seaboard_common_pinmux_init();
+	tegra_gpio_config(ventana_gpio_table, ARRAY_SIZE(ventana_gpio_table));
 }
 
-- 
1.7.0.4

  parent reply	other threads:[~2011-12-16 22:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-16 22:12 [PATCH 0/9] arm/tegra: Various pinmux-related cleanups Stephen Warren
     [not found] ` <1324073552-15542-1-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2011-12-16 22:12   ` Stephen Warren [this message]
2011-12-16 22:12   ` [PATCH 2/9] arm/tegra: Add AUXDATA for tegra-pinmux and tegra-gpio Stephen Warren
2011-12-16 22:12   ` [PATCH 3/9] arm/tegra: Harmony PCIe: Don't touch pinmux Stephen Warren
2011-12-16 22:12   ` [PATCH 4/9] arm/tegra: PCIe: Remove include of mach/pinmux.h Stephen Warren
2011-12-16 22:12   ` [PATCH 5/9] arm/tegra: Remove useless entries from ventana_pinmux[] Stephen Warren
2011-12-16 22:12   ` [PATCH 6/9] arm/tegra: Rework Seaboard-vs-Ventana pinmux table Stephen Warren
2011-12-16 22:12   ` [PATCH 7/9] arm/tegra: Fix mistake in Trimslice's pinmux Stephen Warren
2011-12-16 22:12   ` [PATCH 8/9] arm/tegra: Refactor board-*-pinmux.c to share code Stephen Warren
2011-12-16 22:12   ` [PATCH 9/9] arm/tegra: Use bus notifiers to trigger pinmux setup Stephen Warren
2011-12-18  0:57   ` [PATCH 0/9] arm/tegra: Various pinmux-related cleanups Olof Johansson
     [not found]     ` <20111218005702.GA4336-O5ziIzlqnXUVNXGz7ipsyg@public.gmane.org>
2011-12-19 17:49       ` Stephen Warren
     [not found]         ` <74CDBE0F657A3D45AFBB94109FB122FF176BE92A4A-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-12-20  2:03           ` Olof Johansson

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=1324073552-15542-2-git-send-email-swarren@nvidia.com \
    --to=swarren-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
    --cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.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).