linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: swarren@nvidia.com (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/5] ARM: tegra: Harmony: I2C-related portions of audio support
Date: Fri,  4 Mar 2011 22:42:31 -0700	[thread overview]
Message-ID: <1299303752-7779-5-git-send-email-swarren@nvidia.com> (raw)
In-Reply-To: <1299303752-7779-1-git-send-email-swarren@nvidia.com>

This patch is the portion of the audio-related setup that relies additionally
on the latest Tegra I2C driver being merged.

* Define platform data for WM8903 audio codec
* Register WM8903 as an I2C device

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 arch/arm/mach-tegra/board-harmony.c |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c
index 17262b4..d002d16 100644
--- a/arch/arm/mach-tegra/board-harmony.c
+++ b/arch/arm/mach-tegra/board-harmony.c
@@ -27,6 +27,8 @@
 #include <linux/i2c-tegra.h>
 #include <linux/gpio.h>
 
+#include <sound/wm8903.h>
+
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/time.h>
@@ -81,6 +83,25 @@ static struct tegra_i2c_platform_data harmony_dvc_platform_data = {
 	.bus_clk_rate   = 400000,
 };
 
+static struct wm8903_platform_data harmony_wm8903_pdata = {
+	.irq_active_low = 0,
+	.micdet_cfg = 0,
+	.micdet_delay = 100,
+	.gpio_cfg = {
+		WM8903_GPIO_NO_CONFIG,
+		WM8903_GPIO_NO_CONFIG,
+		0,
+		WM8903_GPIO_NO_CONFIG,
+		WM8903_GPIO_NO_CONFIG,
+	},
+};
+
+static struct i2c_board_info __initdata wm8903_board_info = {
+	I2C_BOARD_INFO("wm8903", 0x1a),
+	.platform_data = &harmony_wm8903_pdata,
+	.irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_CDC_IRQ),
+};
+
 static void harmony_i2c_init(void)
 {
 	tegra_i2c_device1.dev.platform_data = &harmony_i2c1_platform_data;
@@ -92,6 +113,8 @@ static void harmony_i2c_init(void)
 	platform_device_register(&tegra_i2c_device2);
 	platform_device_register(&tegra_i2c_device3);
 	platform_device_register(&tegra_i2c_device4);
+
+	i2c_register_board_info(0, &wm8903_board_info, 1);
 }
 
 static struct harmony_audio_platform_data harmony_audio_pdata = {
-- 
1.7.1

  parent reply	other threads:[~2011-03-05  5:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-05  5:42 [PATCH 0/5] ARM: Tegra: Enable audio (boards-for-next-i2c) Stephen Warren
2011-03-05  5:42 ` [PATCH 1/5] ARM: Tegra: Add devices.c entries for audio Stephen Warren
2011-03-05  5:42 ` [PATCH 2/5] ARM: Tegra: Create defines for SD-related GPIO names Stephen Warren
2011-03-05  5:42 ` [PATCH 3/5] ARM: tegra: Harmony: Beginnings of audio support Stephen Warren
2011-03-05  5:42 ` Stephen Warren [this message]
2011-03-05  5:42 ` [PATCH 5/5] ARM: tegra: Harmony: Set WM8903 gpio_base Stephen Warren

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=1299303752-7779-5-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).