Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=399dee...
Commit: 399dee2371787825a1845de87c0cbee7b7c30ad6
Parent: c9272c4f9fbe2087beb3392f526dc5b19efaa56b
Author: Ben Dooks <ben-linux@fluff.org>
AuthorDate: Mon Jul 28 12:04:06 2008 +0100
Committer: Ben Dooks <ben-linux@fluff.org>
CommitDate: Mon Jul 28 12:05:26 2008 +0100
i2c: S3C2410: Pass the I2C bus number via drivers platform data
Allow the platform data to specify the bus bumber that the
new I2C bus will be given. This is to allow the use of the
board registration mechanism to specify the new style of
I2C device registration which allows boards to provide a
list of attached devices.
Note, as discussed on the mailing list, we have dropped
backwards compatibility of adding an dynamic bus number
as it should not affect most boards to have the bus pinned
to 0 if they have either not specified platform data for
driver. Any board supplying platform data will automatically
have the bus_num field set to 0, and anyone who needs the
driver on a different bus number can supply platform data
to set bus_num.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
drivers/i2c/busses/i2c-s3c2410.c | 13 ++++++++++++-
include/asm-arm/plat-s3c/iic.h | 1 +
2 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 007390a..eef35d3 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -752,9 +752,12 @@ static int s3c24xx_i2c_init(struct s3c24xx_i2c *i2c)
static int s3c24xx_i2c_probe(struct platform_device *pdev)
{
struct s3c24xx_i2c *i2c = &s3c24xx_i2c;
+ struct s3c2410_platform_i2c *pdata;
struct resource *res;
int ret;
+ pdata = s3c24xx_i2c_get_platformdata(&pdev->dev);
+
/* find the clock and enable it */
i2c->dev = &pdev->dev;
@@ ...