[U-Boot] [PATCH v2 4/9] i2c:multi_i2c: add new macros I2C_7 and I2C_10
Piotr Wilczek
p.wilczek at samsung.com
Thu Apr 4 13:13:16 CEST 2013
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 v2:
- new patch
board/samsung/common/multi_i2c.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
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);
};
--
1.7.9.5
More information about the U-Boot
mailing list