diff options
author | Naveen Krishna Ch <ch.naveen@samsung.com> | 2010-07-21 03:51:56 (GMT) |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-08-05 09:36:22 (GMT) |
commit | 170d7415db431801baf5105298cf73131cc6d4f2 (patch) | |
tree | 006a7d3f6e451f38a794fb41e86ac691cf6522ef /arch/arm/mach-s5pv210/mach-smdkc110.c | |
parent | 4550ee20c8d1c280bd26ec3afbcf636ae2897486 (diff) | |
download | linux-170d7415db431801baf5105298cf73131cc6d4f2.tar.xz |
ARM: S5PV210: Add support for I2C devices on SMDKV210 and SMDKC110
This patch adds support I2C-0/1/2 devices to the SMDKV210/SMDKC110.
Signed-off-by: Naveen Krishna Ch <ch.naveen@samsung.com>
[kgene.kim@samsung.com: Fixes wrong name]
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s5pv210/mach-smdkc110.c')
-rw-r--r-- | arch/arm/mach-s5pv210/mach-smdkc110.c | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/arch/arm/mach-s5pv210/mach-smdkc110.c b/arch/arm/mach-s5pv210/mach-smdkc110.c index 4816fac..9f4f0bd 100644 --- a/arch/arm/mach-s5pv210/mach-smdkc110.c +++ b/arch/arm/mach-s5pv210/mach-smdkc110.c @@ -12,6 +12,7 @@ #include <linux/types.h> #include <linux/init.h> #include <linux/serial_core.h> +#include <linux/i2c.h> #include <asm/mach/arch.h> #include <asm/mach/map.h> @@ -26,6 +27,7 @@ #include <plat/devs.h> #include <plat/cpu.h> #include <plat/ata.h> +#include <plat/iic.h> /* Following are default values for UCON, ULCON and UFCON UART registers */ #define S5PV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ @@ -72,7 +74,7 @@ static struct s3c2410_uartcfg smdkv210_uartcfgs[] __initdata = { }, }; -static struct s3c_ide_platdata smdkv210_ide_pdata __initdata = { +static struct s3c_ide_platdata smdkc110_ide_pdata __initdata = { .setup_gpio = s5pv210_ide_setup_gpio, }; @@ -80,10 +82,25 @@ static struct platform_device *smdkc110_devices[] __initdata = { &s5pv210_device_iis0, &s5pv210_device_ac97, &s3c_device_cfcon, + &s3c_device_i2c0, + &s3c_device_i2c1, + &s3c_device_i2c2, &s3c_device_rtc, &s3c_device_wdt, }; +static struct i2c_board_info smdkc110_i2c_devs0[] __initdata = { + { I2C_BOARD_INFO("24c08", 0x50), }, /* Samsung S524AD0XD1 */ +}; + +static struct i2c_board_info smdkc110_i2c_devs1[] __initdata = { + /* To Be Updated */ +}; + +static struct i2c_board_info smdkc110_i2c_devs2[] __initdata = { + /* To Be Updated */ +}; + static void __init smdkc110_map_io(void) { s5p_init_io(NULL, 0, S5P_VA_CHIPID); @@ -93,7 +110,17 @@ static void __init smdkc110_map_io(void) static void __init smdkc110_machine_init(void) { - s3c_ide_set_platdata(&smdkv210_ide_pdata); + s3c_i2c0_set_platdata(NULL); + s3c_i2c1_set_platdata(NULL); + s3c_i2c2_set_platdata(NULL); + i2c_register_board_info(0, smdkc110_i2c_devs0, + ARRAY_SIZE(smdkc110_i2c_devs0)); + i2c_register_board_info(1, smdkc110_i2c_devs1, + ARRAY_SIZE(smdkc110_i2c_devs1)); + i2c_register_board_info(2, smdkc110_i2c_devs2, + ARRAY_SIZE(smdkc110_i2c_devs2)); + + s3c_ide_set_platdata(&smdkc110_ide_pdata); platform_add_devices(smdkc110_devices, ARRAY_SIZE(smdkc110_devices)); } |