I2C: OMAP2+: Pass hwmod rev knowledge via platform_data when i2c bus added
authorAndy Green <andy@warmcat.com>
Mon, 30 May 2011 14:43:06 +0000 (07:43 -0700)
committerBen Dooks <ben-linux@fluff.org>
Sat, 29 Oct 2011 08:37:07 +0000 (09:37 +0100)
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 <peter.maydell@linaro.org>
Signed-off-by: Andy Green <andy.green@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kevin Hilman <khilman@ti.com>
arch/arm/plat-omap/i2c.c

index a938df0..0d3eda7 100644 (file)
@@ -155,6 +155,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
         * ensure quick enough wakeup from idle, when transfer