]> git.ipfire.org Git - people/ms/u-boot.git/blame - board/samsung/common/multi_i2c.c
Add GPL-2.0+ SPDX-License-Identifier to source files
[people/ms/u-boot.git] / board / samsung / common / multi_i2c.c
CommitLineData
7ca8f73a
ŁM
1/*
2 * Copyright (C) 2012 Samsung Electronics
3 * Lukasz Majewski <l.majewski@samsung.com>
4 *
1a459660 5 * SPDX-License-Identifier: GPL-2.0+
7ca8f73a
ŁM
6 */
7
8#include <common.h>
9#include <i2c.h>
10
11/* Handle multiple I2C buses instances */
12int get_multi_scl_pin(void)
13{
14 unsigned int bus = I2C_GET_BUS();
15
16 switch (bus) {
17 case I2C_0: /* I2C_0 definition - compatibility layer */
18 case I2C_5:
19 return CONFIG_SOFT_I2C_I2C5_SCL;
20 case I2C_9:
21 return CONFIG_SOFT_I2C_I2C9_SCL;
22 default:
23 printf("I2C_%d not supported!\n", bus);
24 };
25
26 return 0;
27}
28
29int get_multi_sda_pin(void)
30{
31 unsigned int bus = I2C_GET_BUS();
32
33 switch (bus) {
34 case I2C_0: /* I2C_0 definition - compatibility layer */
35 case I2C_5:
36 return CONFIG_SOFT_I2C_I2C5_SDA;
37 case I2C_9:
38 return CONFIG_SOFT_I2C_I2C9_SDA;
39 default:
40 printf("I2C_%d not supported!\n", bus);
41 };
42
43 return 0;
44}
45
46int multi_i2c_init(void)
47{
48 return 0;
49}