Skip to contentSkip to conversation

Enable I2C bus switching

PATCH New Syed Mohammed Khasim 1 participant 1 message Jan 18, 2010 I2C

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Enable I2C bus switching

OMAP3 supports Multiple I2C channels, this patch allows us to use i2c dev <bus no> command to switch between busses.

---
 drivers/i2c/omap24xx_i2c.c     |    5 +++++
 include/configs/omap3_beagle.h |    6 ++++++
 2 files changed, 11 insertions(+), 0 deletions(-)
drivers/i2c/omap24xx_i2c.c +5 -0
index ff18991..e8c8184 100644
@@ -435,3 +435,8 @@ int i2c_set_bus_num(unsigned int bus)
 
 	return 0;
 }
+
+int i2c_get_bus_num(void)
+{
+	return (int) current_bus;
+}
include/configs/omap3_beagle.h +6 -0
index a8abb0e..4d516a4 100644
@@ -100,6 +100,12 @@
 /* DDR - I use Micron DDR */
 #define CONFIG_OMAP3_MICRON_DDR		1
 
+/* Enable Multi Bus support for I2C */
+#define CONFIG_I2C_MULTI_BUS		1
+
+/* Probe all devices */
+#define CONFIG_SYS_I2C_NOPROBES		{0x0, 0x0}
+
 /* USB */
 #define CONFIG_MUSB_UDC			1
 #define CONFIG_USB_OMAP3		1
Signature · 1 line
1.5.6.3