summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/Kconfig28
-rw-r--r--drivers/i2c/Makefile2
2 files changed, 26 insertions, 4 deletions
diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
index 35d6e2c8ec5..63d03a3cebf 100644
--- a/drivers/i2c/Kconfig
+++ b/drivers/i2c/Kconfig
@@ -2,7 +2,29 @@
# I2C subsystem configuration
#
-menu "I2C support"
+menuconfig I2C
+ bool "I2C support"
+ default y
+ help
+ Note:
+ This is a stand-in for an option to enable I2C support. In fact this
+ simply enables building of the I2C directory for U-Boot. The actual
+ I2C feature is enabled by DM_I2C (for driver model) and
+ the #define CONFIG_SYS_I2C_LEGACY (for the legacy I2C stack).
+
+ So at present there is no need to ever disable this option.
+
+ Eventually it will:
+
+ Enable support for the I2C (Inter-Integrated Circuit) bus in U-Boot.
+ I2C works with a clock and data line which can be driven by a
+ one or more masters or slaves. It is a fairly complex bus but is
+ widely used as it only needs two lines for communication. Speeds of
+ 400kbps are typical but up to 3.4Mbps is supported by some
+ hardware. Enable this option to build the drivers in drivers/i2c as
+ part of a U-Boot build.
+
+if I2C
config DM_I2C
bool "Enable Driver Model for I2C drivers"
@@ -74,7 +96,7 @@ config DM_I2C_GPIO
config SPL_DM_I2C_GPIO
bool "Enable Driver Model for software emulated I2C bus driver in SPL"
- depends on SPL_DM && DM_I2C_GPIO && SPL_DM_GPIO && SPL_GPIO_SUPPORT
+ depends on SPL_DM && DM_I2C_GPIO && SPL_DM_GPIO && SPL_GPIO
default y
help
Enable the i2c bus driver emulation by using the GPIOs. The bus GPIO
@@ -528,4 +550,4 @@ config SYS_I2C_IHS
source "drivers/i2c/muxes/Kconfig"
-endmenu
+endif
diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile
index 06a1150f03d..c2eb24e0f7b 100644
--- a/drivers/i2c/Makefile
+++ b/drivers/i2c/Makefile
@@ -11,7 +11,7 @@ obj-$(CONFIG_$(SPL_)I2C_CROS_EC_TUNNEL) += cros_ec_tunnel.o
obj-$(CONFIG_$(SPL_)I2C_CROS_EC_LDO) += cros_ec_ldo.o
obj-$(CONFIG_I2C_MV) += mv_i2c.o
-obj-$(CONFIG_SYS_I2C) += i2c_core.o
+obj-$(CONFIG_SYS_I2C_LEGACY) += i2c_core.o
obj-$(CONFIG_SYS_I2C_ASPEED) += ast_i2c.o
obj-$(CONFIG_SYS_I2C_AT91) += at91_i2c.o
obj-$(CONFIG_SYS_I2C_CADENCE) += i2c-cdns.o