From patchwork Wed Jun 5 05:59:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Shiyan X-Patchwork-Id: 2672421 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id 26C4E3FD4F for ; Wed, 5 Jun 2013 17:56:26 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uk6p8-0000gv-LM; Wed, 05 Jun 2013 06:03:59 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uk6nj-00065z-Uf; Wed, 05 Jun 2013 06:02:27 +0000 Received: from smtp4.mail.ru ([94.100.176.44]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uk6mM-0005u6-UY for linux-arm-kernel@lists.infradead.org; Wed, 05 Jun 2013 06:01:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=kfFCs8phwEiTrchLSUhSoB8AlqY32B9uWwj/eiEhvlQ=; b=Y6hpQSkT3Ko0pQDEYGWOvT21HT4TY32ZgfHFIl5i7HVgoHtMwaNfqqs8PlsbaXB89dBzQF7CqUGPcNaYVHIjz8WqFCdnRN++qa6vt+PhU7lxo3fzlIhwF1X3TiqBZPkdLhOaUTSpEv7PjLqaekS+EujRey/IAoMHrfvVGUCmqR0=; Received: from [188.134.40.128] (port=27813 helo=shc.zet) by smtp4.mail.ru with esmtpa (envelope-from ) id 1Uk6m1-0007yf-94; Wed, 05 Jun 2013 10:00:41 +0400 From: Alexander Shiyan To: linux-arm-kernel@lists.infradead.org Subject: [PATCH RESEND 12/15] ARM: clps711x: edb7211: Add support for I2C Date: Wed, 5 Jun 2013 09:59:20 +0400 Message-Id: <1370411967-29451-13-git-send-email-shc_work@mail.ru> X-Mailer: git-send-email 1.8.1.5 In-Reply-To: <1370411967-29451-1-git-send-email-shc_work@mail.ru> References: <1370411967-29451-1-git-send-email-shc_work@mail.ru> X-Spam: Not detected X-Mras: Ok X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130605_020103_359637_D089FC48 X-CRM114-Status: GOOD ( 11.04 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [94.100.176.44 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (shc_work[at]mail.ru) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Olof Johansson , Russell King , Alexander Shiyan , Arnd Bergmann X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Signed-off-by: Alexander Shiyan --- arch/arm/mach-clps711x/board-edb7211.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm/mach-clps711x/board-edb7211.c b/arch/arm/mach-clps711x/board-edb7211.c index db804b4..970f4e1 100644 --- a/arch/arm/mach-clps711x/board-edb7211.c +++ b/arch/arm/mach-clps711x/board-edb7211.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -37,6 +38,9 @@ #define EDB7211_LCDEN CLPS711X_GPIO(3, 2) #define EDB7211_LCDBL CLPS711X_GPIO(3, 3) +#define EDB7211_I2C_SDA CLPS711X_GPIO(3, 4) +#define EDB7211_I2C_SCL CLPS711X_GPIO(3, 5) + #define EDB7211_FLASH0_BASE (CS0_PHYS_BASE) #define EDB7211_FLASH1_BASE (CS1_PHYS_BASE) @@ -46,6 +50,12 @@ /* The extra 8 lines of the keyboard matrix */ #define EDB7211_EXTKBD_BASE (CS3_PHYS_BASE) +static struct i2c_gpio_platform_data edb7211_i2c_pdata __initdata = { + .sda_pin = EDB7211_I2C_SDA, + .scl_pin = EDB7211_I2C_SCL, + .scl_is_output_only = 1, +}; + static struct resource edb7211_cs8900_resource[] __initdata = { DEFINE_RES_MEM(EDB7211_CS8900_BASE, SZ_1K), DEFINE_RES_IRQ(EDB7211_CS8900_IRQ), @@ -173,6 +183,9 @@ static void __init edb7211_init_late(void) platform_device_register_simple("video-clps711x", 0, NULL, 0); platform_device_register_simple("cs89x0", 0, edb7211_cs8900_resource, ARRAY_SIZE(edb7211_cs8900_resource)); + platform_device_register_data(&platform_bus, "i2c-gpio", 0, + &edb7211_i2c_pdata, + sizeof(edb7211_i2c_pdata)); } MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)")