diff options
author | Ćukasz Majewski <l.majewski@samsung.com> | 2013-08-16 15:33:33 +0200 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2013-08-20 11:15:32 +0200 |
commit | 2936df1f1183f0bb884489e993a0381c3f179ea6 (patch) | |
tree | a9d1f8926d7fa5f38d1718825c79f9faf8c5d3a3 /board/samsung/common/multi_i2c.c | |
parent | ea0f73abb1afbf5bb4bf34f5a5eeb7896111df97 (diff) |
i2c:samsung: Adjust Trats, GONI and Universal_c210 boards to work with new I2C framework
New I2C framework, introduced after v2013.07 final release, imposed I2C
code adjustment for some Samsung boards - namely Trats, GONI and Universal_c210.
Those boards were using schematic based I2C enumeration (I2C_5, I2C_9).
However, new I2C framework imposes usage of logical I2C adapters numbering
(e.g. I2C_0, I2C_1, etc).
Additionally, I2C_GET_* macros were replaced with i2c_*_bus_num() functions.
Trats board gained definition of second soft I2C adapter.
Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'board/samsung/common/multi_i2c.c')
-rw-r--r-- | board/samsung/common/multi_i2c.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/board/samsung/common/multi_i2c.c b/board/samsung/common/multi_i2c.c index 4fce987540..084858defa 100644 --- a/board/samsung/common/multi_i2c.c +++ b/board/samsung/common/multi_i2c.c @@ -11,13 +11,12 @@ /* Handle multiple I2C buses instances */ int get_multi_scl_pin(void) { - unsigned int bus = I2C_GET_BUS(); + unsigned int bus = i2c_get_bus_num(); switch (bus) { - case I2C_0: /* I2C_0 definition - compatibility layer */ - case I2C_5: + case I2C_0: return CONFIG_SOFT_I2C_I2C5_SCL; - case I2C_9: + case I2C_1: return CONFIG_SOFT_I2C_I2C9_SCL; default: printf("I2C_%d not supported!\n", bus); @@ -28,13 +27,12 @@ int get_multi_scl_pin(void) int get_multi_sda_pin(void) { - unsigned int bus = I2C_GET_BUS(); + unsigned int bus = i2c_get_bus_num(); switch (bus) { - case I2C_0: /* I2C_0 definition - compatibility layer */ - case I2C_5: + case I2C_0: return CONFIG_SOFT_I2C_I2C5_SDA; - case I2C_9: + case I2C_1: return CONFIG_SOFT_I2C_I2C9_SDA; default: printf("I2C_%d not supported!\n", bus); |