Hello Lukasz,

On 05.09.2012 11:15, Lukasz Majewski wrote:
Support for multiple soft I2C buses.

Multibus I2C support is achieved by defining get_multi_{sda|scl}_pin
functions to switch between multiple "soft" I2C buses.

Common definition of I2C_X I2C buses is provided at<i2c.h>.

TEST HW:
      Samsung's Exynos4210 evt.0.1 - Trats development board

Signed-off-by: Lukasz Majewski<l.majew...@samsung.com>
Signed-off-by: Kyungmin Park<kyungmin.p...@samsung.com>
Cc: Heiko Schocher<h...@denx.de>
Cc: Minkyu Kang<mk7.k...@samsung.com>

---
Changes for v2:
- Common Samsung code has been put to board/samsung/common/multi_i2c.c file
- I2C_{4|5} have been renamed to I2C_{0|1}
- *soft_i2c_name[] table has been removed
Changes for v3:
- None
Changes for v4:
- Common definitions of available I2C buses are now defined at<i2c.h>
- Compatibility layer (I2C_0) has been added temporarily to not break the Trats
   I2C communication with PMIC. It will be removed when redesigned PMIC will be
   posted
---
  board/samsung/common/Makefile    |   43 +++++++++++++++++++++++++
  board/samsung/common/multi_i2c.c |   65 ++++++++++++++++++++++++++++++++++++++
  include/i2c.h                    |   12 +++++++
  3 files changed, 120 insertions(+), 0 deletions(-)
  create mode 100644 board/samsung/common/Makefile
  create mode 100644 board/samsung/common/multi_i2c.c

[...]
+#########################################################################
diff --git a/board/samsung/common/multi_i2c.c b/board/samsung/common/multi_i2c.c
new file mode 100644
index 0000000..d6c3d37
--- /dev/null
+++ b/board/samsung/common/multi_i2c.c
@@ -0,0 +1,65 @@
[...]
+/* Handle multiple I2C buses instances */
+int get_multi_scl_pin(void)
+{
+       unsigned int bus = I2C_GET_BUS();
+
+       switch (bus) {
+       case I2C_0: /* I2C_0 definition - compatibility layer */
+       case I2C_5:

Is this correct, that you want to use 2 i2c busses on the same pin?

Beside of that, you get my:

Acked-by: Heiko Schocher <h...@denx.de>

bye,
Heiko
--
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to