diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2013-05-13 13:07:34 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-06-11 18:47:40 -0400 |
commit | 362168f86e947ace670e0f670e558994d388ed6a (patch) | |
tree | 21e9436591628e30e8bf900a539338cf689c84cd /arch/arm/mach-clps711x | |
parent | 7dfbf1b68eb9eea411781ff9e610377febe4d6a2 (diff) |
ARM: clps711x: edb7211: Add support for I2C
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-clps711x')
-rw-r--r-- | arch/arm/mach-clps711x/board-edb7211.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-clps711x/board-edb7211.c b/arch/arm/mach-clps711x/board-edb7211.c index db804b42e912..970f4e17ba76 100644 --- a/arch/arm/mach-clps711x/board-edb7211.c +++ b/arch/arm/mach-clps711x/board-edb7211.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/delay.h> | 12 | #include <linux/delay.h> |
13 | #include <linux/memblock.h> | 13 | #include <linux/memblock.h> |
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/i2c-gpio.h> | ||
15 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
16 | #include <linux/backlight.h> | 17 | #include <linux/backlight.h> |
17 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
@@ -37,6 +38,9 @@ | |||
37 | #define EDB7211_LCDEN CLPS711X_GPIO(3, 2) | 38 | #define EDB7211_LCDEN CLPS711X_GPIO(3, 2) |
38 | #define EDB7211_LCDBL CLPS711X_GPIO(3, 3) | 39 | #define EDB7211_LCDBL CLPS711X_GPIO(3, 3) |
39 | 40 | ||
41 | #define EDB7211_I2C_SDA CLPS711X_GPIO(3, 4) | ||
42 | #define EDB7211_I2C_SCL CLPS711X_GPIO(3, 5) | ||
43 | |||
40 | #define EDB7211_FLASH0_BASE (CS0_PHYS_BASE) | 44 | #define EDB7211_FLASH0_BASE (CS0_PHYS_BASE) |
41 | #define EDB7211_FLASH1_BASE (CS1_PHYS_BASE) | 45 | #define EDB7211_FLASH1_BASE (CS1_PHYS_BASE) |
42 | 46 | ||
@@ -46,6 +50,12 @@ | |||
46 | /* The extra 8 lines of the keyboard matrix */ | 50 | /* The extra 8 lines of the keyboard matrix */ |
47 | #define EDB7211_EXTKBD_BASE (CS3_PHYS_BASE) | 51 | #define EDB7211_EXTKBD_BASE (CS3_PHYS_BASE) |
48 | 52 | ||
53 | static struct i2c_gpio_platform_data edb7211_i2c_pdata __initdata = { | ||
54 | .sda_pin = EDB7211_I2C_SDA, | ||
55 | .scl_pin = EDB7211_I2C_SCL, | ||
56 | .scl_is_output_only = 1, | ||
57 | }; | ||
58 | |||
49 | static struct resource edb7211_cs8900_resource[] __initdata = { | 59 | static struct resource edb7211_cs8900_resource[] __initdata = { |
50 | DEFINE_RES_MEM(EDB7211_CS8900_BASE, SZ_1K), | 60 | DEFINE_RES_MEM(EDB7211_CS8900_BASE, SZ_1K), |
51 | DEFINE_RES_IRQ(EDB7211_CS8900_IRQ), | 61 | DEFINE_RES_IRQ(EDB7211_CS8900_IRQ), |
@@ -173,6 +183,9 @@ static void __init edb7211_init_late(void) | |||
173 | platform_device_register_simple("video-clps711x", 0, NULL, 0); | 183 | platform_device_register_simple("video-clps711x", 0, NULL, 0); |
174 | platform_device_register_simple("cs89x0", 0, edb7211_cs8900_resource, | 184 | platform_device_register_simple("cs89x0", 0, edb7211_cs8900_resource, |
175 | ARRAY_SIZE(edb7211_cs8900_resource)); | 185 | ARRAY_SIZE(edb7211_cs8900_resource)); |
186 | platform_device_register_data(&platform_bus, "i2c-gpio", 0, | ||
187 | &edb7211_i2c_pdata, | ||
188 | sizeof(edb7211_i2c_pdata)); | ||
176 | } | 189 | } |
177 | 190 | ||
178 | MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)") | 191 | MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)") |