summaryrefslogtreecommitdiff
path: root/drivers/i2c/Kconfig
diff options
context:
space:
mode:
authorLukasz Majewski <lukma@denx.de>2017-03-21 12:08:25 +0100
committerHeiko Schocher <hs@denx.de>2017-03-28 06:27:54 +0200
commite46f8a3309fb2628940d3e2806c954d84f910165 (patch)
treefef8b56725a7613dd59bfd5f41891461cd955b48 /drivers/i2c/Kconfig
parentb52a3fa08b830006c1872517bdafe41160d9223d (diff)
i2c: Set default I2C bus number
This patch allows using i2c commands (e.g. "i2c probe", "i2c md", etc) without the need to first select the bus number with e.g. "i2c dev 0". This is the "i2c" command behavior similar to the one from pre DM, where by default bus 0 was immediately accessible. Signed-off-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'drivers/i2c/Kconfig')
-rw-r--r--drivers/i2c/Kconfig14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
index 8ac7aaf2d2..4e9afc120a 100644
--- a/drivers/i2c/Kconfig
+++ b/drivers/i2c/Kconfig
@@ -49,6 +49,20 @@ config I2C_CROS_EC_LDO
avoid duplicating the logic in the TPS65090 regulator driver for
enabling/disabling an LDO.
+config I2C_SET_DEFAULT_BUS_NUM
+ bool "Set default I2C bus number"
+ depends on DM_I2C
+ help
+ Set default number of I2C bus to be accessed. This option provides
+ behaviour similar to old (i.e. pre DM) I2C bus driver.
+
+config I2C_DEFAULT_BUS_NUMBER
+ hex "I2C default bus number"
+ depends on I2C_SET_DEFAULT_BUS_NUM
+ default 0x0
+ help
+ Number of default I2C bus to use
+
config DM_I2C_GPIO
bool "Enable Driver Model for software emulated I2C bus driver"
depends on DM_I2C && DM_GPIO