summaryrefslogtreecommitdiff
path: root/drivers/i2c/tegra_i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/tegra_i2c.c')
-rw-r--r--drivers/i2c/tegra_i2c.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/i2c/tegra_i2c.c b/drivers/i2c/tegra_i2c.c
index 21f6897..5b6ea0e 100644
--- a/drivers/i2c/tegra_i2c.c
+++ b/drivers/i2c/tegra_i2c.c
@@ -567,3 +567,17 @@ int i2c_set_bus_num(unsigned int bus)
return 0;
}
#endif
+
+int tegra_i2c_get_dvc_bus_num(void)
+{
+ int i;
+
+ for (i = 0; i < CONFIG_SYS_MAX_I2C_BUS; i++) {
+ struct i2c_bus *bus = &i2c_controllers[i];
+
+ if (bus->inited && bus->is_dvc)
+ return i;
+ }
+
+ return -1;
+}