Subject: [PATCH 2/7 v2] ARM OMAP3: Enable I2C bus switching From: Khasim Syed Mohammed OMAP3 supports Multiple I2C channels, this patch allows us to use i2c dev command to switch between busses. Signed-off-by: Syed Mohammed Khasim Signed-off-by: Dirk Behme Acked-by: Heiko Schocher --- Changes in v2: - Remove CONFIG_SYS_I2C_NOPROBES as proposed by Ben Warren drivers/i2c/omap24xx_i2c.c | 5 +++++ include/configs/omap3_beagle.h | 3 +++ 2 files changed, 8 insertions(+) Index: u-boot-main/drivers/i2c/omap24xx_i2c.c =================================================================== --- u-boot-main.orig/drivers/i2c/omap24xx_i2c.c +++ u-boot-main/drivers/i2c/omap24xx_i2c.c @@ -435,3 +435,8 @@ int i2c_set_bus_num(unsigned int bus) return 0; } + +int i2c_get_bus_num(void) +{ + return (int) current_bus; +} Index: u-boot-main/include/configs/omap3_beagle.h =================================================================== --- u-boot-main.orig/include/configs/omap3_beagle.h +++ u-boot-main/include/configs/omap3_beagle.h @@ -100,6 +100,9 @@ /* DDR - I use Micron DDR */ #define CONFIG_OMAP3_MICRON_DDR 1 +/* Enable Multi Bus support for I2C */ +#define CONFIG_I2C_MULTI_BUS 1 + /* USB */ #define CONFIG_MUSB_UDC 1 #define CONFIG_USB_OMAP3 1