aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/Kconfig
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2007-05-01 17:26:34 -0400
committerJean Delvare <khali@hyperion.delvare>2007-05-01 17:26:34 -0400
commit1c23af90dc44d05bbb6a3b5246ab664b1f943943 (patch)
tree184dc150ca69a9dfbc00996e35659ef41beb202c /drivers/i2c/busses/Kconfig
parent16538e6b32600f76ad212d42fc2b1f801e32ab4b (diff)
i2c: Bitbanging I2C bus driver using the GPIO API
This is a very simple bitbanging I2C bus driver utilizing the new arch-neutral GPIO API. Useful for chips that don't have a built-in I2C controller, additional I2C busses, or testing purposes. To use, include something similar to the following in the board-specific setup code: #include <linux/i2c-gpio.h> static struct i2c_gpio_platform_data i2c_gpio_data = { .sda_pin = GPIO_PIN_FOO, .scl_pin = GPIO_PIN_BAR, }; static struct platform_device i2c_gpio_device = { .name = "i2c-gpio", .id = 0, .dev = { .platform_data = &i2c_gpio_data, }, }; Register this platform_device, set up the I2C pins as GPIO if required and you're ready to go. This will use default values for udelay and timeout, and will work with GPIO hardware that does not support open drain mode, but allows sensing of the SDA and SCL lines even when they are being driven. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c/busses/Kconfig')
-rw-r--r--drivers/i2c/busses/Kconfig8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 8ccf6e4e91d0..33a8a67f161b 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -117,6 +117,14 @@ config I2C_ELEKTOR
117 This support is also available as a module. If so, the module 117 This support is also available as a module. If so, the module
118 will be called i2c-elektor. 118 will be called i2c-elektor.
119 119
120config I2C_GPIO
121 tristate "GPIO-based bitbanging I2C"
122 depends on GENERIC_GPIO
123 select I2C_ALGOBIT
124 help
125 This is a very simple bitbanging I2C driver utilizing the
126 arch-neutral GPIO API to control the SCL and SDA lines.
127
120config I2C_HYDRA 128config I2C_HYDRA
121 tristate "CHRP Apple Hydra Mac I/O I2C interface" 129 tristate "CHRP Apple Hydra Mac I/O I2C interface"
122 depends on PCI && PPC_CHRP && EXPERIMENTAL 130 depends on PCI && PPC_CHRP && EXPERIMENTAL