diff options
author | Daniel Silverstone <dsilvers@simtec.co.uk> | 2009-03-13 09:53:46 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2009-04-07 05:18:33 -0400 |
commit | c564e6ae6c5aa6e3995ff87ed4a32b4788ad5109 (patch) | |
tree | b773106104d9897d945709d3bff8a56ff6586da8 /arch/arm/plat-s3c/dev-i2c1.c | |
parent | a192f7153bb33151f83440cd9c0442233a064bf1 (diff) |
i2c-s3c2410: Simplify bus frequency calculation
The platform data for the i2c-s3c2410 driver used to allow a min,
max and desired frequency for the I2C bus. This patch reduces it
to simply a desired frequency ceiling and corrects all the uses
of the platform data appropriately.
This means, for example, that on a system with a 66MHz fclk, a
request for 100KHz will achieve 65KHz which is safe and
acceptable, rather than 378KHz which it would have achieved
without this change.
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Signed-off-by: Daniel Silverstone <dsilvers@simtec.co.uk>
[ben-linux@fluff.org: tidy subject and description]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-s3c/dev-i2c1.c')
-rw-r--r-- | arch/arm/plat-s3c/dev-i2c1.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arm/plat-s3c/dev-i2c1.c b/arch/arm/plat-s3c/dev-i2c1.c index 4536e5bb50e5..8349c462788c 100644 --- a/arch/arm/plat-s3c/dev-i2c1.c +++ b/arch/arm/plat-s3c/dev-i2c1.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* linux/arch/arm/plat-s3c/dev-i2c1.c | 1 | /* linux/arch/arm/plat-s3c/dev-i2c1.c |
2 | * | 2 | * |
3 | * Copyright 2008 Simtec Electronics | 3 | * Copyright 2008,2009 Simtec Electronics |
4 | * Ben Dooks <ben@simtec.co.uk> | 4 | * Ben Dooks <ben@simtec.co.uk> |
5 | * http://armlinux.simtec.co.uk/ | 5 | * http://armlinux.simtec.co.uk/ |
6 | * | 6 | * |
@@ -47,8 +47,7 @@ static struct s3c2410_platform_i2c default_i2c_data1 __initdata = { | |||
47 | .flags = 0, | 47 | .flags = 0, |
48 | .bus_num = 1, | 48 | .bus_num = 1, |
49 | .slave_addr = 0x10, | 49 | .slave_addr = 0x10, |
50 | .bus_freq = 100*1000, | 50 | .frequency = 100*1000, |
51 | .max_freq = 400*1000, | ||
52 | .sda_delay = 100, | 51 | .sda_delay = 100, |
53 | }; | 52 | }; |
54 | 53 | ||