1
linux/drivers/i2c/busses
Haavard Skinnemoen 1c23af90dc 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>
2007-05-01 23:26:34 +02:00
..
i2c-acorn.c [ARM] Acorn: move the i2c bus driver into drivers/i2c 2007-03-04 20:40:50 +00:00
i2c-ali15x3.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-ali1535.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-ali1563.c i2c: Add IDs to adapters 2007-02-13 22:09:01 +01:00
i2c-amd756-s4882.c i2c: Declare more i2c_adapter parent devices 2007-02-13 22:09:03 +01:00
i2c-amd756.c Replace remaining references to "driverfs" with "sysfs". 2007-02-17 19:13:42 +01:00
i2c-amd8111.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-at91.c i2c: New Atmel AT91 bus driver 2006-12-10 21:21:30 +01:00
i2c-au1550.c
i2c-au1550.h
i2c-bfin-twi.c i2c: Blackfin Two Wire Interface driver 2007-05-01 23:26:32 +02:00
i2c-elektor.c i2c-elektor: Port to the new device driver model 2007-05-01 23:26:30 +02:00
i2c-gpio.c i2c: Bitbanging I2C bus driver using the GPIO API 2007-05-01 23:26:34 +02:00
i2c-hydra.c i2c: Discard the i2c algo del_bus wrappers 2006-12-10 21:21:33 +01:00
i2c-i801.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-i810.c i2c: Add IDs to adapters 2007-02-13 22:09:01 +01:00
i2c-ibm_iic.c i2c: Declare more i2c_adapter parent devices 2007-02-13 22:09:03 +01:00
i2c-ibm_iic.h
i2c-iop3xx.c Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2007-02-19 13:18:39 -08:00
i2c-iop3xx.h
i2c-isa.c i2c: Move i2c-isa-only exported symbol declarations 2007-05-01 23:26:32 +02:00
i2c-ixp4xx.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-ixp2000.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-mpc.c
i2c-mv64xxx.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-nforce2.c i2c-nforce2: Add support for the MCP61 and MCP65 2007-05-01 23:26:29 +02:00
i2c-ocores.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
i2c-omap.c i2c-omap: Switch to static adapter numbering 2007-05-01 23:26:32 +02:00
i2c-parport-light.c i2c-parport-light: Port to the new device driver model 2007-05-01 23:26:30 +02:00
i2c-parport.c i2c-parport: Fix a minor race on driver unload 2007-05-01 23:26:30 +02:00
i2c-parport.h i2c-parport: Add support for One For All remote JP1 interface 2007-02-13 22:09:02 +01:00
i2c-pasemi.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-pca-isa.c i2c-pca-isa: Port to the new device driver model 2007-05-01 23:26:30 +02:00
i2c-piix4.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-pnx.c i2c-pnx: Fix interrupt handler, get rid of EARLY config option 2007-01-04 13:07:03 +01:00
i2c-powermac.c i2c: completion header cleanups 2007-02-13 22:09:00 +01:00
i2c-prosavage.c i2c: Discard the i2c algo del_bus wrappers 2006-12-10 21:21:33 +01:00
i2c-pxa.c i2c-pxa: Clean transaction stop 2007-05-01 23:26:33 +02:00
i2c-rpx.c
i2c-s3c2410.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
i2c-savage4.c i2c: Add IDs to adapters 2007-02-13 22:09:01 +01:00
i2c-sibyte.c
i2c-sis96x.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-sis630.c Replace remaining references to "driverfs" with "sysfs". 2007-02-17 19:13:42 +01:00
i2c-sis5595.c Replace remaining references to "driverfs" with "sysfs". 2007-02-17 19:13:42 +01:00
i2c-stub.c
i2c-versatile.c i2c: New ARM Versatile/Realview bus driver 2006-12-10 21:21:32 +01:00
i2c-via.c Replace remaining references to "driverfs" with "sysfs". 2007-02-17 19:13:42 +01:00
i2c-viapro.c i2c: Shrink struct i2c_client 2007-05-01 23:26:28 +02:00
i2c-voodoo3.c i2c: Add IDs to adapters 2007-02-13 22:09:01 +01:00
Kconfig i2c: Bitbanging I2C bus driver using the GPIO API 2007-05-01 23:26:34 +02:00
Makefile i2c: Bitbanging I2C bus driver using the GPIO API 2007-05-01 23:26:34 +02:00
scx200_acb.c scx200_acb: Fix PCI device reference count 2007-05-01 23:26:30 +02:00
scx200_i2c.c i2c: Add IDs to adapters 2007-02-13 22:09:01 +01:00