summaryrefslogtreecommitdiff
path: root/drivers/i2c/Kconfig
diff options
context:
space:
mode:
authorPrzemyslaw Marczak <p.marczak@samsung.com>2015-03-31 18:57:18 +0200
committerSimon Glass <sjg@chromium.org>2015-04-18 11:11:17 -0600
commitc54473cb25968be53e6b47527d5970b03a3cf41d (patch)
tree3bd25bfae1d777030122a441f585b20ba42a427f /drivers/i2c/Kconfig
parent705fcf4de40383a47dc92c4c9d7dbeb37a9d1104 (diff)
downloadu-boot-imx-c54473cb25968be53e6b47527d5970b03a3cf41d.zip
u-boot-imx-c54473cb25968be53e6b47527d5970b03a3cf41d.tar.gz
u-boot-imx-c54473cb25968be53e6b47527d5970b03a3cf41d.tar.bz2
dm: i2c: add i2c-gpio driver
This commit adds driver model support to software emulated i2c bus driver. This driver supports kernel-style device tree bindings. Fdt properties in use: - compatible - "i2c-gpio" - gpios - data and clock GPIO pin phandles - delay-us - micro seconds delay between GPIOs toggle operations, which is 1/4 of I2C speed clock period. Added: - Config: CONFIG_DM_I2C_GPIO - File: drivers/i2c/i2c-gpio.c - File: doc/device-tree-bindings/i2c/i2c-gpio.txt Driver base code is taken from: drivers/i2c/soft-i2c.c, changes: - use "i2c-gpio" naming - update comments style - move preprocesor macros into functions - add device tree support - add driver model i2c support - code cleanup, - add Kconfig entry Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Added braces in i2c_gpio_xfer() to fix style nit: Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/i2c/Kconfig')
-rw-r--r--drivers/i2c/Kconfig9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
index c83a984..739badc 100644
--- a/drivers/i2c/Kconfig
+++ b/drivers/i2c/Kconfig
@@ -19,6 +19,15 @@ config DM_I2C_COMPAT
to convert all code for a board in a single commit. It should not
be enabled for any board in an official release.
+config DM_I2C_GPIO
+ bool "Enable Driver Model for software emulated I2C bus driver"
+ depends on DM_I2C && DM_GPIO
+ help
+ Enable the i2c bus driver emulation by using the GPIOs. The bus GPIO
+ configuration is given by the device tree. Kernel-style device tree
+ bindings are supported.
+ Binding info: doc/device-tree-bindings/i2c/i2c-gpio.txt
+
config SYS_I2C_UNIPHIER
bool "UniPhier I2C driver"
depends on ARCH_UNIPHIER && DM_I2C