From patchwork Thu May 19 12:08:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Dietrich X-Patchwork-Id: 797172 Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4JCAP7H026596 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 19 May 2011 12:10:46 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by bombadil.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QN22H-0001FK-NO; Thu, 19 May 2011 12:09:01 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QN22F-0003Y9-SM; Thu, 19 May 2011 12:08:59 +0000 Received: from mailout-de.gmx.net ([213.165.64.23]) by canuck.infradead.org with smtp (Exim 4.76 #1 (Red Hat Linux)) id 1QN21q-0003VM-68 for linux-arm-kernel@lists.infradead.org; Thu, 19 May 2011 12:08:36 +0000 Received: (qmail invoked by alias); 19 May 2011 12:08:33 -0000 Received: from fb07-iapwap2.physik.uni-giessen.de (EHLO localhost.localdomain) [134.176.19.122] by mail.gmx.net (mp049) with SMTP; 19 May 2011 14:08:33 +0200 X-Authenticated: #9962044 X-Provags-ID: V01U2FsdGVkX19vVOl31LlvqJ1e4cMTlQJqA2r9Xf6QqnKZ2t4Y17 NE3Q7NP0hw19AY From: Marc Dietrich To: Colin Cross Subject: [PATCH 2/6] ARM: tegra: paz00: register i2c busses Date: Thu, 19 May 2011 14:08:26 +0200 Message-Id: <1305806910-3903-3-git-send-email-marvin24@gmx.de> X-Mailer: git-send-email 1.7.4.2 In-Reply-To: <1305806910-3903-1-git-send-email-marvin24@gmx.de> References: <1305806910-3903-1-git-send-email-marvin24@gmx.de> X-Y-GMX-Trusted: 0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110519_080834_523143_80DF98EA X-CRM114-Status: GOOD ( 16.12 ) X-Spam-Score: 2.2 (++) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (2.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, low trust [213.165.64.23 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is freemail (marvin24[at]gmx.de) 2.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (marvin24[at]gmx.de) Cc: linux-tegra@vger.kernel.org, Olof Johansson , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 19 May 2011 12:10:46 +0000 (UTC) This adds support for the i2c busses on paz00. The 3rd bus is reserved for the nvec, which acts as master and i2c-tegra has not yet support for this kind of operation. The sound codec (alc5632) is connected to the first bus and will be added once the codec and glue driver is upstream. The thermal sensor (atd7461) is connected to dvc as usual, but will not be added now because i2c-tegra still misses probe support (needs I2C_FUNC_SMBUS_EMUL). Signed-off-by: Marc Dietrich --- arch/arm/mach-tegra/board-paz00.c | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c index 57e50a8..5f1c110 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c @@ -25,6 +25,8 @@ #include #include #include +#include +#include #include #include @@ -70,6 +72,29 @@ static struct platform_device *paz00_devices[] __initdata = { &tegra_sdhci_device4, }; +static struct tegra_i2c_platform_data paz00_i2c1_platform_data = { + .bus_clk_rate = 400000, +}; + +static struct tegra_i2c_platform_data paz00_i2c2_platform_data = { + .bus_clk_rate = 400000, +}; + +static struct tegra_i2c_platform_data paz00_dvc_platform_data = { + .bus_clk_rate = 400000, +}; + +static void paz00_i2c_init(void) +{ + tegra_i2c_device1.dev.platform_data = &paz00_i2c1_platform_data; + tegra_i2c_device2.dev.platform_data = &paz00_i2c2_platform_data; + tegra_i2c_device4.dev.platform_data = &paz00_dvc_platform_data; + + platform_device_register(&tegra_i2c_device1); + platform_device_register(&tegra_i2c_device2); + platform_device_register(&tegra_i2c_device4); +} + static void __init tegra_paz00_fixup(struct machine_desc *desc, struct tag *tags, char **cmdline, struct meminfo *mi) { @@ -115,6 +140,8 @@ static void __init tegra_paz00_init(void) tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4; platform_add_devices(paz00_devices, ARRAY_SIZE(paz00_devices)); + + paz00_i2c_init(); } MACHINE_START(PAZ00, "paz00")