Commit 178239de authored by Rajeshwari Shinde's avatar Rajeshwari Shinde Committed by Heiko Schocher
Browse files

I2C: Add support for Multi channel

This adds multiple i2c channel support for I2C.

Signed-off-by: default avatarAlim Akhtar <>
Signed-off-by: default avatarRajeshwari Shinde <>
Acked-by: default avatarSimon Glass <>
parent ab7e52bb
......@@ -158,6 +158,33 @@ static void i2c_ch_init(struct s3c24x0_i2c *i2c, int speed, int slaveadd)
writel(I2C_MODE_MT | I2C_TXRX_ENA, &i2c->iicstat);
* MULTI BUS I2C support
int i2c_set_bus_num(unsigned int bus)
struct s3c24x0_i2c *i2c;
if ((bus < 0) || (bus >= CONFIG_MAX_I2C_NUM)) {
debug("Bad bus: %d\n", bus);
return -1;
g_current_bus = bus;
i2c = get_base_i2c();
return 0;
unsigned int i2c_get_bus_num(void)
return g_current_bus;
void i2c_init(int speed, int slaveadd)
struct s3c24x0_i2c *i2c;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment