From: Andy Green Date: Mon, 30 May 2011 14:43:06 +0000 (-0700) Subject: I2C: OMAP2+: Pass hwmod rev knowledge via platform_data when i2c bus added X-Git-Tag: next-20110915~67^2~13 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9d430ff68eaaba9903b9c6f75e0bdc73e35d4cb7;p=karo-tx-linux.git I2C: OMAP2+: Pass hwmod rev knowledge via platform_data when i2c bus added Mark each OMAP I2C bus with the hwmod's knowledge of which I2C IP version is in the chip we're running on. Cc: patches@linaro.org Reported-by: Peter Maydell Signed-off-by: Andy Green Signed-off-by: Tony Lindgren Acked-by: Ben Dooks Signed-off-by: Kevin Hilman --- diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c index a938df0908a2..0d3eda77e7ce 100644 --- a/arch/arm/plat-omap/i2c.c +++ b/arch/arm/plat-omap/i2c.c @@ -154,6 +154,12 @@ static inline int omap2_i2c_add_bus(int bus_id) } pdata = &i2c_pdata[bus_id - 1]; + /* + * pass the hwmod class's CPU-specific knowledge of I2C IP revision in + * use up to the OMAP I2C driver via platform data + */ + pdata->rev = oh->class->rev; + /* * When waiting for completion of a i2c transfer, we need to * set a wake up latency constraint for the MPU. This is to