linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: shc_work@mail.ru (Alexander Shiyan)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 12/15] ARM: clps711x: edb7211: Add support for I2C
Date: Mon, 13 May 2013 21:07:34 +0400	[thread overview]
Message-ID: <1368464857-5038-15-git-send-email-shc_work@mail.ru> (raw)
In-Reply-To: <1368464857-5038-1-git-send-email-shc_work@mail.ru>


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 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 <linux/delay.h>
 #include <linux/memblock.h>
 #include <linux/types.h>
+#include <linux/i2c-gpio.h>
 #include <linux/interrupt.h>
 #include <linux/backlight.h>
 #include <linux/platform_device.h>
@@ -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)")
-- 
1.8.1.5

  parent reply	other threads:[~2013-05-13 17:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-13 17:07 [PATCH 01/15] ARM: clps711x: Remove NEED_MACH_MEMORY_H dependency Alexander Shiyan
2013-05-13 17:07 ` [PATCH RESEND v2 1/3] GPIO: clps711x: Rewrite driver for using generic GPIO code Alexander Shiyan
2013-05-13 17:07 ` [PATCH RESEND v2 2/3] ARM: clps711x: Re-add GPIO support Alexander Shiyan
2013-05-13 17:07 ` [PATCH 02/15] ARM: clps711x: Set PLL clock to zero if we work from 13 mHz source Alexander Shiyan
2013-05-13 17:07 ` [PATCH 03/15] ARM: clps711x: autcpu12: Move LCD DPOT definitions to board file Alexander Shiyan
2013-05-13 17:07 ` [PATCH RESEND v2 3/3] GPIO: clps711x: Add DT support Alexander Shiyan
2013-05-13 17:07 ` [PATCH 04/15] ARM: clps711x: autcpu12: Add support for NOR flash Alexander Shiyan
2013-05-13 17:07 ` [PATCH 05/15] ARM: clps711x: autcpu12: Special driver for handling memory is removed Alexander Shiyan
2013-05-13 17:07 ` [PATCH 06/15] ARM: clps711x: autcpu12: Move remaining specific definitions to board file Alexander Shiyan
2013-05-13 17:07 ` [PATCH 07/15] ARM: clps711x: p720t: Define PLD registers as GPIOs Alexander Shiyan
2013-05-13 17:07 ` [PATCH 08/15] ARM: clps711x: Move specific definitions from hardware.h to boards files Alexander Shiyan
2013-05-13 17:07 ` [PATCH 09/15] ARM: clps711x: Replace "arch_initcall" in common code with ".init_early" Alexander Shiyan
2013-05-13 17:07 ` [PATCH 10/15] ARM: clps711x: Add clocksource framework Alexander Shiyan
2013-05-13 17:07 ` [PATCH 11/15] ARM: clps711x: Optimize interrupt handling Alexander Shiyan
2013-05-13 17:07 ` Alexander Shiyan [this message]
2013-05-13 17:07 ` [PATCH 13/15] ARM: clps711x: edb7211: Control LCD backlight via PWM Alexander Shiyan
2013-05-13 17:07 ` [PATCH 14/15] ARM: clps711x: Add support for SYSCON driver Alexander Shiyan
2013-05-13 17:07 ` [PATCH 15/15] ARM: clps711x: Update defconfig Alexander Shiyan
2013-06-11 22:57 ` [PATCH 01/15] ARM: clps711x: Remove NEED_MACH_MEMORY_H dependency Olof Johansson
2013-06-12 15:56   ` Alexander Shiyan

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=1368464857-5038-15-git-send-email-shc_work@mail.ru \
    --to=shc_work@mail.ru \
    --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).