summaryrefslogtreecommitdiff
path: root/arch/arm/plat-omap
diff options
context:
space:
mode:
authorAndy Green <andy@warmcat.com>2011-03-08 11:08:57 +0000
committerNicolas Pitre <nicolas.pitre@linaro.org>2011-03-27 21:53:39 -0400
commitb9a94d4ddff781314f031f6eac6a32e497da4b2f (patch)
tree5479b5ac3aa7fe1ad90e1971f139b1e92f2943e5 /arch/arm/plat-omap
parent3293bcf2387a773f273cf8744d33383eb7ab3e8b (diff)
I2C: OMAP2+: Pass flags up to omap i2c platform_data as well
This is how the driver can find the flags for its implementation functionality in its platform_data Cc: patches@linaro.org Cc: Ben Dooks <ben-linux@fluff.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> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r--arch/arm/plat-omap/i2c.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c
index 0d3eda77e7c..90986690aa9 100644
--- a/arch/arm/plat-omap/i2c.c
+++ b/arch/arm/plat-omap/i2c.c
@@ -141,6 +141,7 @@ static inline int omap2_i2c_add_bus(int bus_id)
struct omap_device *od;
char oh_name[MAX_OMAP_I2C_HWMOD_NAME_LEN];
struct omap_i2c_bus_platform_data *pdata;
+ struct omap_i2c_dev_attr *dev_attr;
omap2_i2c_mux_pins(bus_id);
@@ -156,10 +157,14 @@ 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
+ * use, and functionality implementation flags, up to the OMAP I2C
+ * driver via platform data
*/
pdata->rev = oh->class->rev;
+ dev_attr = (struct omap_i2c_dev_attr *)oh->dev_attr;
+ pdata->flags = dev_attr->flags;
+
/*
* When waiting for completion of a i2c transfer, we need to
* set a wake up latency constraint for the MPU. This is to