aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s3c/dev-i2c0.c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-10-31 12:14:55 -0400
committerBen Dooks <ben-linux@fluff.org>2008-12-15 18:56:41 -0500
commit1aba834da12989bb769d1dcbf6b0ea29f730c92c (patch)
tree4f06c055eb265919ab137a49a21d3a5ace5d393d /arch/arm/plat-s3c/dev-i2c0.c
parent8f995cc3ac94b114fe84782b023d8706d1adf960 (diff)
[ARM] S3C: Add i2c1 device definition
Add device definition and support functions for the second i2c device (i2c1). If this is selected, the first i2c bus will become index 0 instead of index -1. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-s3c/dev-i2c0.c')
-rw-r--r--arch/arm/plat-s3c/dev-i2c0.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/plat-s3c/dev-i2c0.c b/arch/arm/plat-s3c/dev-i2c0.c
index 21870fd2ec98..2c0128c77c6e 100644
--- a/arch/arm/plat-s3c/dev-i2c0.c
+++ b/arch/arm/plat-s3c/dev-i2c0.c
@@ -37,12 +37,16 @@ static struct resource s3c_i2c_resource[] = {
37 37
38struct platform_device s3c_device_i2c0 = { 38struct platform_device s3c_device_i2c0 = {
39 .name = "s3c2410-i2c", 39 .name = "s3c2410-i2c",
40#ifdef CONFIG_S3C_DEV_I2C1
41 .id = 0,
42#else
40 .id = -1, 43 .id = -1,
44#endif
41 .num_resources = ARRAY_SIZE(s3c_i2c_resource), 45 .num_resources = ARRAY_SIZE(s3c_i2c_resource),
42 .resource = s3c_i2c_resource, 46 .resource = s3c_i2c_resource,
43}; 47};
44 48
45struct s3c2410_platform_i2c default_i2c_data __initdata = { 49static struct s3c2410_platform_i2c default_i2c_data0 __initdata = {
46 .flags = 0, 50 .flags = 0,
47 .slave_addr = 0x10, 51 .slave_addr = 0x10,
48 .bus_freq = 100*1000, 52 .bus_freq = 100*1000,
@@ -55,7 +59,7 @@ void __init s3c_i2c0_set_platdata(struct s3c2410_platform_i2c *pd)
55 struct s3c2410_platform_i2c *npd; 59 struct s3c2410_platform_i2c *npd;
56 60
57 if (!pd) 61 if (!pd)
58 pd = &default_i2c_data; 62 pd = &default_i2c_data0;
59 63
60 npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL); 64 npd = kmemdup(pd, sizeof(struct s3c2410_platform_i2c), GFP_KERNEL);
61 if (!npd) 65 if (!npd)