diff options
author | Andy Green <andy@warmcat.com> | 2011-07-10 05:27:14 -0600 |
---|---|---|
committer | Dan Murphy <dmurphy@ti.com> | 2011-12-15 07:40:24 -0600 |
commit | 51c2434ea240ab0284148cc835b29ef86c05ab6e (patch) | |
tree | e12ade4da244d805549e9173cd053a386774cab7 | |
parent | dd1d6e1fee5cfc2b23e6866e3035d8105cf74810 (diff) | |
download | kernel_samsung_espresso10-51c2434ea240ab0284148cc835b29ef86c05ab6e.zip kernel_samsung_espresso10-51c2434ea240ab0284148cc835b29ef86c05ab6e.tar.gz kernel_samsung_espresso10-51c2434ea240ab0284148cc835b29ef86c05ab6e.tar.bz2 |
I2C: OMAP2+: Introduce I2C IP versioning constants
These represent the two kinds of (incompatible) OMAP I2C
peripheral unit in use so far.
The constants are in linux/i2c-omap.h so the omap i2c driver can have
them too.
Change-Id: I42d2c7822985a9bc4124986d7cd786565006466f
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: Kevin Hilman <khilman@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
-rw-r--r-- | arch/arm/plat-omap/include/plat/i2c.h | 1 | ||||
-rw-r--r-- | include/linux/i2c-omap.h | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/plat/i2c.h b/arch/arm/plat-omap/include/plat/i2c.h index 5e8846b..10bafd4 100644 --- a/arch/arm/plat-omap/include/plat/i2c.h +++ b/arch/arm/plat-omap/include/plat/i2c.h @@ -22,6 +22,7 @@ #define __ASM__ARCH_OMAP_I2C_H #include <linux/i2c.h> +#include <linux/i2c-omap.h> #include <linux/hwspinlock.h> struct omap_i2c_bus_board_data { diff --git a/include/linux/i2c-omap.h b/include/linux/i2c-omap.h index 3ac6cc2..0eb4439 100644 --- a/include/linux/i2c-omap.h +++ b/include/linux/i2c-omap.h @@ -3,6 +3,18 @@ #include <linux/platform_device.h> +/* + * Version 2 of the I2C peripheral unit has a different register + * layout and extra registers. The ID register in the V2 peripheral + * unit on the OMAP4430 reports the same ID as the V1 peripheral + * unit on the OMAP3530, so we must inform the driver which IP + * version we know it is running on from platform / cpu-specific + * code using these constants in the hwmod class definition. + */ + +#define OMAP_I2C_IP_VERSION_1 1 +#define OMAP_I2C_IP_VERSION_2 2 + struct omap_i2c_bus_platform_data { u32 clkrate; bool needs_wakeup_latency; |