aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/Makefile
diff options
context:
space:
mode:
authorHaavard Skinnemoen2007-05-01 23:26:34 +0200
committerJean Delvare2007-05-01 23:26:34 +0200
commit1c23af90dc44d05bbb6a3b5246ab664b1f943943 (patch)
tree184dc150ca69a9dfbc00996e35659ef41beb202c /drivers/i2c/busses/Makefile
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/Makefile')
-rw-r--r--drivers/i2c/busses/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
index e51493cfbee2..5689165f6d6a 100644
--- a/drivers/i2c/busses/Makefile
+++ b/drivers/i2c/busses/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_I2C_AT91) += i2c-at91.o
obj-$(CONFIG_I2C_AU1550) += i2c-au1550.o
obj-$(CONFIG_I2C_BLACKFIN_TWI) += i2c-bfin-twi.o
obj-$(CONFIG_I2C_ELEKTOR) += i2c-elektor.o
+obj-$(CONFIG_I2C_GPIO) += i2c-gpio.o
obj-$(CONFIG_I2C_HYDRA) += i2c-hydra.o
obj-$(CONFIG_I2C_I801) += i2c-i801.o
obj-$(CONFIG_I2C_I810) += i2c-i810.o