]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - board/samsung/common/multi_i2c.c
Merge 'u-boot-microblaze/zynq' into (u-boot-arm/master'
[karo-tx-uboot.git] / board / samsung / common / multi_i2c.c
1 /*
2  *  Copyright (C) 2012 Samsung Electronics
3  *  Lukasz Majewski <l.majewski@samsung.com>
4  *
5  * SPDX-License-Identifier:     GPL-2.0+
6  */
7
8 #include <common.h>
9 #include <i2c.h>
10
11 /* Handle multiple I2C buses instances */
12 int get_multi_scl_pin(void)
13 {
14         unsigned int bus = i2c_get_bus_num();
15
16         switch (bus) {
17         case I2C_0:
18                 return CONFIG_SOFT_I2C_I2C5_SCL;
19         case I2C_1:
20                 return CONFIG_SOFT_I2C_I2C9_SCL;
21         default:
22                 printf("I2C_%d not supported!\n", bus);
23         };
24
25         return 0;
26 }
27
28 int get_multi_sda_pin(void)
29 {
30         unsigned int bus = i2c_get_bus_num();
31
32         switch (bus) {
33         case I2C_0:
34                 return CONFIG_SOFT_I2C_I2C5_SDA;
35         case I2C_1:
36                 return CONFIG_SOFT_I2C_I2C9_SDA;
37         default:
38                 printf("I2C_%d not supported!\n", bus);
39         };
40
41         return 0;
42 }
43
44 int multi_i2c_init(void)
45 {
46         return 0;
47 }