[U-Boot] [PATCH V3 2/3] i2c:multi_i2c: add new macros I2C_7 and I2C_8

Piotr Wilczek p.wilczek at samsung.com
Fri May 24 10:23:10 CEST 2013


This patch add new macros CONFIG_SOFT_I2C_I2C7_SCL/SDA and CONFIG_SOFT_I2C_I2C8_SCL/SDA

Signed-off-by: Piotr Wilczek <p.wilczek at samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
CC: Lukasz Majewski <l.majewski at samsung.com>
---
Changes in v3: none
Changes in v2: none
---
 board/samsung/common/multi_i2c.c |   33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/board/samsung/common/multi_i2c.c b/board/samsung/common/multi_i2c.c
index d6c3d37..5903be4 100644
--- a/board/samsung/common/multi_i2c.c
+++ b/board/samsung/common/multi_i2c.c
@@ -24,6 +24,31 @@
 #include <common.h>
 #include <i2c.h>
 
+#ifndef CONFIG_SOFT_I2C_I2C5_SCL
+#define CONFIG_SOFT_I2C_I2C5_SCL 0
+#endif
+#ifndef CONFIG_SOFT_I2C_I2C7_SCL
+#define CONFIG_SOFT_I2C_I2C7_SCL 0
+#endif
+#ifndef CONFIG_SOFT_I2C_I2C8_SCL
+#define CONFIG_SOFT_I2C_I2C8_SCL 0
+#endif
+#ifndef CONFIG_SOFT_I2C_I2C9_SCL
+#define CONFIG_SOFT_I2C_I2C9_SCL 0
+#endif
+#ifndef CONFIG_SOFT_I2C_I2C5_SDA
+#define CONFIG_SOFT_I2C_I2C5_SDA 0
+#endif
+#ifndef CONFIG_SOFT_I2C_I2C7_SDA
+#define CONFIG_SOFT_I2C_I2C7_SDA 0
+#endif
+#ifndef CONFIG_SOFT_I2C_I2C8_SDA
+#define CONFIG_SOFT_I2C_I2C8_SDA 0
+#endif
+#ifndef CONFIG_SOFT_I2C_I2C9_SDA
+#define CONFIG_SOFT_I2C_I2C9_SDA 0
+#endif
+
 /* Handle multiple I2C buses instances */
 int get_multi_scl_pin(void)
 {
@@ -33,6 +58,10 @@ int get_multi_scl_pin(void)
 	case I2C_0: /* I2C_0 definition - compatibility layer */
 	case I2C_5:
 		return CONFIG_SOFT_I2C_I2C5_SCL;
+	case I2C_7:
+		return CONFIG_SOFT_I2C_I2C7_SCL;
+	case I2C_8:
+		return CONFIG_SOFT_I2C_I2C8_SCL;
 	case I2C_9:
 		return CONFIG_SOFT_I2C_I2C9_SCL;
 	default:
@@ -50,6 +79,10 @@ int get_multi_sda_pin(void)
 	case I2C_0: /* I2C_0 definition - compatibility layer */
 	case I2C_5:
 		return CONFIG_SOFT_I2C_I2C5_SDA;
+	case I2C_7:
+		return CONFIG_SOFT_I2C_I2C7_SDA;
+	case I2C_8:
+		return CONFIG_SOFT_I2C_I2C8_SDA;
 	case I2C_9:
 		return CONFIG_SOFT_I2C_I2C9_SDA;
 	default:
-- 
1.7.9.5



More information about the U-Boot mailing list