1
0
Fork 0
remarkable-linux/include
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
..
acpi ACPI: Disable MSI on request of FADT 2007-04-25 01:13:47 -04:00
asm-alpha Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2007-04-27 09:29:04 -07:00
asm-arm [NET]: Adding SO_TIMESTAMPNS / SCM_TIMESTAMPNS support 2007-04-25 22:24:21 -07:00
asm-arm26 [NET]: Adding SO_TIMESTAMPNS / SCM_TIMESTAMPNS support 2007-04-25 22:24:21 -07:00
asm-avr32 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2007-04-27 09:26:46 -07:00
asm-cris [NET]: Adding SO_TIMESTAMPNS / SCM_TIMESTAMPNS support 2007-04-25 22:24:21 -07:00
asm-frv [NET]: Adding SO_TIMESTAMPNS / SCM_TIMESTAMPNS support 2007-04-25 22:24:21 -07:00
asm-generic Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2007-04-27 09:26:46 -07:00
asm-h8300 [NET]: Adding SO_TIMESTAMPNS / SCM_TIMESTAMPNS support 2007-04-25 22:24:21 -07:00
asm-i386 [NET]: Adding SO_TIMESTAMPNS / SCM_TIMESTAMPNS support 2007-04-25 22:24:21 -07:00
asm-ia64 [NET]: Adding SO_TIMESTAMPNS / SCM_TIMESTAMPNS support 2007-04-25 22:24:21 -07:00
asm-m32r [NET]: Adding SO_TIMESTAMPNS / SCM_TIMESTAMPNS support 2007-04-25 22:24:21 -07:00
asm-m68k [NET]: Adding SO_TIMESTAMPNS / SCM_TIMESTAMPNS support 2007-04-25 22:24:21 -07:00
asm-m68knommu [PATCH] m68knommu: GPIO line defines for the ColdFire 5282 2007-03-06 18:08:38 -08:00
asm-mips Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2007-04-27 09:26:46 -07:00
asm-parisc [NET]: Adding SO_TIMESTAMPNS / SCM_TIMESTAMPNS support 2007-04-25 22:24:21 -07:00
asm-powerpc Merge branch 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2007-04-30 08:10:12 -07:00
asm-ppc [POWERPC] Stop using ppc_sys for Xilinx Virtex boards 2007-04-30 11:02:04 +10:00
asm-s390 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2007-04-27 09:26:46 -07:00
asm-sh Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2007-04-27 09:29:04 -07:00
asm-sh64 [NET]: Introduce SIOCGSTAMPNS ioctl to get timestamps with nanosec resolution 2007-04-25 22:24:04 -07:00
asm-sparc Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2007-04-27 09:29:04 -07:00
asm-sparc64 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2007-04-27 09:29:04 -07:00
asm-um [NET]: div64_64 consolidate (rev3) 2007-04-25 22:23:33 -07:00
asm-v850 [NET]: Adding SO_TIMESTAMPNS / SCM_TIMESTAMPNS support 2007-04-25 22:24:21 -07:00
asm-x86_64 [NET]: Adding SO_TIMESTAMPNS / SCM_TIMESTAMPNS support 2007-04-25 22:24:21 -07:00
asm-xtensa [NET]: Adding SO_TIMESTAMPNS / SCM_TIMESTAMPNS support 2007-04-25 22:24:21 -07:00
crypto [CRYPTO] api: Allow multiple frontends per backend 2007-02-07 09:21:01 +11:00
keys [AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both 2007-04-26 15:48:28 -07:00
linux i2c: Bitbanging I2C bus driver using the GPIO API 2007-05-01 23:26:34 +02:00
math-emu
media i2c: Cleanup the includes of <linux/i2c.h> 2007-05-01 23:26:29 +02:00
mtd UBI: Unsorted Block Images 2007-04-27 14:23:33 +03:00
net Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2007-04-30 08:14:42 -07:00
pcmcia serial: Add PCMCIA IDs for Quatech DSP-100 dual RS232 adapter. 2007-02-16 15:19:16 -08:00
rdma RDMA/cma: Add multicast communication support 2007-02-16 14:29:07 -08:00
rxrpc [AF_RXRPC]: Delete the old RxRPC code. 2007-04-26 15:55:48 -07:00
scsi Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2007-02-19 13:32:28 -08:00
sound [ALSA] version 1.0.14rc3 2007-03-14 08:25:52 +01:00
video [PATCH] Video: fb, add true ref_count atomicity 2007-02-12 09:48:42 -08:00
Kbuild