Patchwork [U-Boot,v2,4/9] i2c:multi_i2c: add new macros I2C_7 and I2C_10

login
register
mail settings
Submitter Piotr Wilczek
Date April 4, 2013, 11:13 a.m.
Message ID <1365074001-5360-5-git-send-email-p.wilczek@samsung.com>
Download mbox | patch
Permalink /patch/233715/
State Changes Requested
Delegated to: Minkyu Kang
Headers show

Comments

Piotr Wilczek - April 4, 2013, 11:13 a.m.
Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Lukasz Majewski <l.majewski@samsung.com>

---
Changes in v2:
- new patch

 board/samsung/common/multi_i2c.c |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

Patch

diff --git a/board/samsung/common/multi_i2c.c b/board/samsung/common/multi_i2c.c
index d6c3d37..06ebb50 100644
--- a/board/samsung/common/multi_i2c.c
+++ b/board/samsung/common/multi_i2c.c
@@ -24,6 +24,19 @@ 
 #include <common.h>
 #include <i2c.h>
 
+#ifndef CONFIG_SOFT_I2C_I2C7_SCL
+#define CONFIG_SOFT_I2C_I2C7_SCL 0
+#endif
+#ifndef CONFIG_SOFT_I2C_I2C10_SCL
+#define CONFIG_SOFT_I2C_I2C10_SCL 0
+#endif
+#ifndef CONFIG_SOFT_I2C_I2C7_SDA
+#define CONFIG_SOFT_I2C_I2C7_SDA 0
+#endif
+#ifndef CONFIG_SOFT_I2C_I2C10_SDA
+#define CONFIG_SOFT_I2C_I2C10_SDA 0
+#endif
+
 /* Handle multiple I2C buses instances */
 int get_multi_scl_pin(void)
 {
@@ -33,8 +46,12 @@  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_9:
 		return CONFIG_SOFT_I2C_I2C9_SCL;
+	case I2C_10:
+		return CONFIG_SOFT_I2C_I2C10_SCL;
 	default:
 		printf("I2C_%d not supported!\n", bus);
 	};
@@ -50,8 +67,12 @@  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_9:
 		return CONFIG_SOFT_I2C_I2C9_SDA;
+	case I2C_10:
+		return CONFIG_SOFT_I2C_I2C10_SDA;
 	default:
 		printf("I2C_%d not supported!\n", bus);
 	};