LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v3] Bitbanging i2c bus driver using the GPIO API
@ 2007-04-14 12:56 Haavard Skinnemoen
  2007-04-14 14:34 ` Haavard Skinnemoen
  0 siblings, 1 reply; 21+ messages in thread
From: Haavard Skinnemoen @ 2007-04-14 12:56 UTC (permalink / raw)
  To: Jean Delvare
  Cc: David Brownell, Bryan Wu, Andrew Morton, Deepak Saxena,
	linux-kernel, Haavard Skinnemoen

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 changing the direction of the SDA
and SCL lines on the fly.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
---
Sorry for the long delay. I didn't want to send out a patch just
before taking off for two weeks. This patch contains the following
changes compared to v2:

  o Make udelay and timeout parameterizable and fix comment
  o Default to a very low SCL frequency (6.6 kHz) if clock stretching
    isn't supported
  o Document that GPIO hardware must report actual state of sda and
    scl pins in open drain mode.
  o Add myself to MAINTAINERS
  o Add KERN_ERR to "probe failed" message
  o Use new gpio_direction_output() API

 MAINTAINERS                   |    5 +
 drivers/i2c/busses/Kconfig    |    8 ++
 drivers/i2c/busses/Makefile   |    1 +
 drivers/i2c/busses/i2c-gpio.c |  213 +++++++++++++++++++++++++++++++++++++++++
 include/linux/i2c-gpio.h      |   38 +++++++
 5 files changed, 265 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index ef84419..fdecda4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1429,6 +1429,11 @@ L:	linux-scsi@vger.kernel.org
 W:	http://www.icp-vortex.com/
 S:	Supported
 
+GENERIC GPIO I2C DRIVER
+P:	Haavard Skinnemoen
+M:	hskinnemoen@atmel.com
+S:	Supported
+
 GENERIC HDLC DRIVER, N2, C101, PCI200SYN and WANXL DRIVERS
 P:	Krzysztof Halasa
 M:	khc@pm.waw.pl
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index fb19dbb..52f79d1 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -102,6 +102,14 @@ config I2C_ELEKTOR
 	  This support is also available as a module.  If so, the module 
 	  will be called i2c-elektor.
 
+config I2C_GPIO
+	tristate "GPIO-based bitbanging i2c driver"
+	depends on I2C && GENERIC_GPIO
+	select I2C_ALGOBIT
+	help
+	  This is a very simple bitbanging i2c driver utilizing the
+	  arch-neutral GPIO API to control the SCL and SDA lines.
+
 config I2C_HYDRA
 	tristate "CHRP Apple Hydra Mac I/O I2C interface"
 	depends on I2C && PCI && PPC_CHRP && EXPERIMENTAL
diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
index 290b540..68f2b05 100644
--- a/drivers/i2c/busses/Makefile
+++ b/drivers/i2c/busses/Makefile
@@ -11,6 +11,7 @@ obj-$(CONFIG_I2C_AMD8111)	+= i2c-amd8111.o
 obj-$(CONFIG_I2C_AT91)		+= i2c-at91.o
 obj-$(CONFIG_I2C_AU1550)	+= i2c-au1550.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
diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
new file mode 100644
index 0000000..895d150
--- /dev/null
+++ b/drivers/i2c/busses/i2c-gpio.c
@@ -0,0 +1,213 @@
+/*
+ * Bitbanging i2c bus driver using the GPIO API
+ *
+ * Copyright (C) 2007 Atmel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/i2c.h>
+#include <linux/i2c-algo-bit.h>
+#include <linux/i2c-gpio.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+
+#include <asm/gpio.h>
+
+/* Toggle SDA by changing the direction of the pin */
+static void i2c_gpio_setsda_dir(void *data, int state)
+{
+	struct i2c_gpio_platform_data *pdata = data;
+
+	if (state)
+		gpio_direction_input(pdata->sda_pin);
+	else
+		gpio_direction_output(pdata->sda_pin, 0);
+}
+
+/*
+ * Toggle SDA by changing the output value of the pin. This is only
+ * valid for pins configured as open drain (i.e. setting the value
+ * high effectively turns off the output driver.)
+ */
+static void i2c_gpio_setsda_val(void *data, int state)
+{
+	struct i2c_gpio_platform_data *pdata = data;
+
+	gpio_set_value(pdata->sda_pin, state);
+}
+
+/* Toggle SCL by changing the direction of the pin. */
+static void i2c_gpio_setscl_dir(void *data, int state)
+{
+	struct i2c_gpio_platform_data *pdata = data;
+
+	if (state)
+		gpio_direction_input(pdata->scl_pin);
+	else
+		gpio_direction_output(pdata->scl_pin, 0);
+}
+
+/*
+ * Toggle SCL by changing the output value of the pin. This is used
+ * for pins that are configured as open drain and for output-only
+ * pins. The latter case will break the i2c protocol, but it will
+ * often work in practice.
+ */
+static void i2c_gpio_setscl_val(void *data, int state)
+{
+	struct i2c_gpio_platform_data *pdata = data;
+
+	gpio_set_value(pdata->scl_pin, state);
+}
+
+int i2c_gpio_getsda(void *data)
+{
+	struct i2c_gpio_platform_data *pdata = data;
+
+	return gpio_get_value(pdata->sda_pin);
+}
+
+int i2c_gpio_getscl(void *data)
+{
+	struct i2c_gpio_platform_data *pdata = data;
+
+	return gpio_get_value(pdata->scl_pin);
+}
+
+static int __init i2c_gpio_probe(struct platform_device *pdev)
+{
+	struct i2c_gpio_platform_data *pdata;
+	struct i2c_algo_bit_data *bit_data;
+	struct i2c_adapter *adap;
+	int ret;
+
+	pdata = pdev->dev.platform_data;
+	if (!pdata)
+		return -ENXIO;
+
+	ret = -ENOMEM;
+	adap = kzalloc(sizeof(struct i2c_adapter), GFP_KERNEL);
+	if (!adap)
+		goto err_alloc_adap;
+	bit_data = kzalloc(sizeof(struct i2c_algo_bit_data), GFP_KERNEL);
+	if (!bit_data)
+		goto err_alloc_bit_data;
+
+	ret = gpio_request(pdata->sda_pin, "sda");
+	if (ret)
+		goto err_request_sda;
+	ret = gpio_request(pdata->scl_pin, "scl");
+	if (ret)
+		goto err_request_scl;
+
+	if (pdata->sda_is_open_drain) {
+		gpio_direction_output(pdata->sda_pin, 1);
+		bit_data->setsda = i2c_gpio_setsda_val;
+	} else {
+		gpio_direction_input(pdata->sda_pin);
+		bit_data->setsda = i2c_gpio_setsda_dir;
+	}
+
+	if (pdata->scl_is_open_drain || pdata->scl_is_output_only) {
+		gpio_direction_output(pdata->scl_pin, 1);
+		bit_data->setscl = i2c_gpio_setscl_val;
+	} else {
+		gpio_direction_input(pdata->scl_pin);
+		bit_data->setscl = i2c_gpio_setscl_dir;
+	}
+
+	if (!pdata->scl_is_output_only)
+		bit_data->getscl = i2c_gpio_getscl;
+	bit_data->getsda = i2c_gpio_getsda;
+
+	if (pdata->udelay)
+		bit_data->udelay = pdata->udelay;
+	else
+		bit_data->udelay = 50;			/* 66 kHz */
+
+	if (pdata->timeout)
+		bit_data->timeout = pdata->timeout;
+	else
+		bit_data->timeout = HZ / 10;		/* 100 ms */
+
+	bit_data->data = pdata;
+
+	adap->owner = THIS_MODULE;
+	snprintf(adap->name, I2C_NAME_SIZE, "i2c-gpio%d", pdev->id);
+	adap->algo_data = bit_data;
+	adap->dev.parent = &pdev->dev;
+
+	ret = i2c_bit_add_bus(adap);
+	if (ret)
+		goto err_add_bus;
+
+	platform_set_drvdata(pdev, adap);
+
+	dev_info(&pdev->dev, "using pins %u (sda) and %u (scl%s)\n",
+		 pdata->sda_pin, pdata->scl_pin,
+		 pdata->scl_is_output_only
+		 ? ", no clock stretching" : "");
+
+	return 0;
+
+err_add_bus:
+	gpio_free(pdata->scl_pin);
+err_request_scl:
+	gpio_free(pdata->sda_pin);
+err_request_sda:
+	kfree(bit_data);
+err_alloc_bit_data:
+	kfree(adap);
+err_alloc_adap:
+	return ret;
+}
+
+static int __exit i2c_gpio_remove(struct platform_device *pdev)
+{
+	struct i2c_gpio_platform_data *pdata;
+	struct i2c_adapter *adap;
+
+	adap = platform_get_drvdata(pdev);
+	pdata = pdev->dev.platform_data;
+
+	i2c_del_adapter(adap);
+	gpio_free(pdata->scl_pin);
+	gpio_free(pdata->sda_pin);
+	kfree(adap->algo_data);
+	kfree(adap);
+
+	return 0;
+}
+
+static struct platform_driver i2c_gpio_driver = {
+	.driver		= {
+		.name	= "i2c-gpio",
+		.owner	= THIS_MODULE,
+	},
+	.remove		= __exit_p(i2c_gpio_remove),
+};
+
+static int __init i2c_gpio_init(void)
+{
+	int ret;
+
+	ret = platform_driver_probe(&i2c_gpio_driver, i2c_gpio_probe);
+	if (ret)
+		printk(KERN_ERR "i2c-gpio: probe failed: %d\n", ret);
+
+	return ret;
+}
+module_init(i2c_gpio_init);
+
+static void __exit i2c_gpio_exit(void)
+{
+	platform_driver_unregister(&i2c_gpio_driver);
+}
+module_exit(i2c_gpio_exit);
+
+MODULE_AUTHOR("Haavard Skinnemoen <hskinnemoen@atmel.com>");
+MODULE_DESCRIPTION("Platform-independent bitbanging i2c driver");
+MODULE_LICENSE("GPL");
diff --git a/include/linux/i2c-gpio.h b/include/linux/i2c-gpio.h
new file mode 100644
index 0000000..7812407
--- /dev/null
+++ b/include/linux/i2c-gpio.h
@@ -0,0 +1,38 @@
+/*
+ * i2c-gpio interface to platform code
+ *
+ * Copyright (C) 2007 Atmel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef _LINUX_I2C_GPIO_H
+#define _LINUX_I2C_GPIO_H
+
+/**
+ * struct i2c_gpio_platform_data - Platform-dependent data for i2c-gpio
+ * @sda_pin: GPIO pin ID to use for SDA
+ * @scl_pin: GPIO pin ID to use for SCL
+ * @udelay: signal toggle delay. SCL frequency is (333 / udelay) kHz
+ * @timeout: clock stretching timeout in jiffies. If the slave keeps
+ *	SCL low for longer than this, the transfer will time out.
+ * @sda_is_open_drain: SDA is configured as open drain, i.e. the pin
+ *	isn't actively driven high when setting the output value high.
+ *	gpio_get_value() must return the actual pin state even if the
+ *	pin is configured as an output.
+ * @scl_is_open_drain: SCL is set up as open drain. Same requirements
+ *	as for sda_is_open_drain apply.
+ * @scl_is_output_only: SCL output drivers cannot be turned off.
+ */
+struct i2c_gpio_platform_data {
+	unsigned int	sda_pin;
+	unsigned int	scl_pin;
+	int		udelay;
+	int		timeout;
+	unsigned int	sda_is_open_drain:1;
+	unsigned int	scl_is_open_drain:1;
+	unsigned int	scl_is_output_only:1;
+};
+
+#endif /* _LINUX_I2C_GPIO_H */
-- 
1.4.4.4


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3] Bitbanging i2c bus driver using the GPIO API
  2007-04-14 12:56 [PATCH v3] Bitbanging i2c bus driver using the GPIO API Haavard Skinnemoen
@ 2007-04-14 14:34 ` Haavard Skinnemoen
  2007-04-14 17:28   ` Jean Delvare
  0 siblings, 1 reply; 21+ messages in thread
From: Haavard Skinnemoen @ 2007-04-14 14:34 UTC (permalink / raw)
  To: Haavard Skinnemoen
  Cc: Jean Delvare, David Brownell, Bryan Wu, Andrew Morton,
	Deepak Saxena, linux-kernel

On Sat, 14 Apr 2007 14:56:47 +0200
Haavard Skinnemoen <hskinnemoen@atmel.com> wrote:

>   o Default to a very low SCL frequency (6.6 kHz) if clock stretching
>     isn't supported

This would have been true if I had remembered to save before generating
the patch...

Updated patch below. Sorry about the mess.

Haavard

===================[cut here]======================
From: Haavard Skinnemoen <hskinnemoen@atmel.com>
Subject: [PATCH] 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>
---
 MAINTAINERS                   |    5 +
 drivers/i2c/busses/Kconfig    |    8 ++
 drivers/i2c/busses/Makefile   |    1 +
 drivers/i2c/busses/i2c-gpio.c |  215 +++++++++++++++++++++++++++++++++++++++++
 include/linux/i2c-gpio.h      |   38 +++++++
 5 files changed, 267 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index ef84419..fdecda4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1429,6 +1429,11 @@ L:	linux-scsi@vger.kernel.org
 W:	http://www.icp-vortex.com/
 S:	Supported
 
+GENERIC GPIO I2C DRIVER
+P:	Haavard Skinnemoen
+M:	hskinnemoen@atmel.com
+S:	Supported
+
 GENERIC HDLC DRIVER, N2, C101, PCI200SYN and WANXL DRIVERS
 P:	Krzysztof Halasa
 M:	khc@pm.waw.pl
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index fb19dbb..52f79d1 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -102,6 +102,14 @@ config I2C_ELEKTOR
 	  This support is also available as a module.  If so, the module 
 	  will be called i2c-elektor.
 
+config I2C_GPIO
+	tristate "GPIO-based bitbanging i2c driver"
+	depends on I2C && GENERIC_GPIO
+	select I2C_ALGOBIT
+	help
+	  This is a very simple bitbanging i2c driver utilizing the
+	  arch-neutral GPIO API to control the SCL and SDA lines.
+
 config I2C_HYDRA
 	tristate "CHRP Apple Hydra Mac I/O I2C interface"
 	depends on I2C && PCI && PPC_CHRP && EXPERIMENTAL
diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
index 290b540..68f2b05 100644
--- a/drivers/i2c/busses/Makefile
+++ b/drivers/i2c/busses/Makefile
@@ -11,6 +11,7 @@ obj-$(CONFIG_I2C_AMD8111)	+= i2c-amd8111.o
 obj-$(CONFIG_I2C_AT91)		+= i2c-at91.o
 obj-$(CONFIG_I2C_AU1550)	+= i2c-au1550.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
diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
new file mode 100644
index 0000000..e427bfb
--- /dev/null
+++ b/drivers/i2c/busses/i2c-gpio.c
@@ -0,0 +1,215 @@
+/*
+ * Bitbanging i2c bus driver using the GPIO API
+ *
+ * Copyright (C) 2007 Atmel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/i2c.h>
+#include <linux/i2c-algo-bit.h>
+#include <linux/i2c-gpio.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+
+#include <asm/gpio.h>
+
+/* Toggle SDA by changing the direction of the pin */
+static void i2c_gpio_setsda_dir(void *data, int state)
+{
+	struct i2c_gpio_platform_data *pdata = data;
+
+	if (state)
+		gpio_direction_input(pdata->sda_pin);
+	else
+		gpio_direction_output(pdata->sda_pin, 0);
+}
+
+/*
+ * Toggle SDA by changing the output value of the pin. This is only
+ * valid for pins configured as open drain (i.e. setting the value
+ * high effectively turns off the output driver.)
+ */
+static void i2c_gpio_setsda_val(void *data, int state)
+{
+	struct i2c_gpio_platform_data *pdata = data;
+
+	gpio_set_value(pdata->sda_pin, state);
+}
+
+/* Toggle SCL by changing the direction of the pin. */
+static void i2c_gpio_setscl_dir(void *data, int state)
+{
+	struct i2c_gpio_platform_data *pdata = data;
+
+	if (state)
+		gpio_direction_input(pdata->scl_pin);
+	else
+		gpio_direction_output(pdata->scl_pin, 0);
+}
+
+/*
+ * Toggle SCL by changing the output value of the pin. This is used
+ * for pins that are configured as open drain and for output-only
+ * pins. The latter case will break the i2c protocol, but it will
+ * often work in practice.
+ */
+static void i2c_gpio_setscl_val(void *data, int state)
+{
+	struct i2c_gpio_platform_data *pdata = data;
+
+	gpio_set_value(pdata->scl_pin, state);
+}
+
+int i2c_gpio_getsda(void *data)
+{
+	struct i2c_gpio_platform_data *pdata = data;
+
+	return gpio_get_value(pdata->sda_pin);
+}
+
+int i2c_gpio_getscl(void *data)
+{
+	struct i2c_gpio_platform_data *pdata = data;
+
+	return gpio_get_value(pdata->scl_pin);
+}
+
+static int __init i2c_gpio_probe(struct platform_device *pdev)
+{
+	struct i2c_gpio_platform_data *pdata;
+	struct i2c_algo_bit_data *bit_data;
+	struct i2c_adapter *adap;
+	int ret;
+
+	pdata = pdev->dev.platform_data;
+	if (!pdata)
+		return -ENXIO;
+
+	ret = -ENOMEM;
+	adap = kzalloc(sizeof(struct i2c_adapter), GFP_KERNEL);
+	if (!adap)
+		goto err_alloc_adap;
+	bit_data = kzalloc(sizeof(struct i2c_algo_bit_data), GFP_KERNEL);
+	if (!bit_data)
+		goto err_alloc_bit_data;
+
+	ret = gpio_request(pdata->sda_pin, "sda");
+	if (ret)
+		goto err_request_sda;
+	ret = gpio_request(pdata->scl_pin, "scl");
+	if (ret)
+		goto err_request_scl;
+
+	if (pdata->sda_is_open_drain) {
+		gpio_direction_output(pdata->sda_pin, 1);
+		bit_data->setsda = i2c_gpio_setsda_val;
+	} else {
+		gpio_direction_input(pdata->sda_pin);
+		bit_data->setsda = i2c_gpio_setsda_dir;
+	}
+
+	if (pdata->scl_is_open_drain || pdata->scl_is_output_only) {
+		gpio_direction_output(pdata->scl_pin, 1);
+		bit_data->setscl = i2c_gpio_setscl_val;
+	} else {
+		gpio_direction_input(pdata->scl_pin);
+		bit_data->setscl = i2c_gpio_setscl_dir;
+	}
+
+	if (!pdata->scl_is_output_only)
+		bit_data->getscl = i2c_gpio_getscl;
+	bit_data->getsda = i2c_gpio_getsda;
+
+	if (pdata->udelay)
+		bit_data->udelay = pdata->udelay;
+	else if (pdata->scl_is_output_only)
+		bit_data->udelay = 50;			/* 6.6 kHz */
+	else
+		bit_data->udelay = 5;			/* 66 kHz */
+
+	if (pdata->timeout)
+		bit_data->timeout = pdata->timeout;
+	else
+		bit_data->timeout = HZ / 10;		/* 100 ms */
+
+	bit_data->data = pdata;
+
+	adap->owner = THIS_MODULE;
+	snprintf(adap->name, I2C_NAME_SIZE, "i2c-gpio%d", pdev->id);
+	adap->algo_data = bit_data;
+	adap->dev.parent = &pdev->dev;
+
+	ret = i2c_bit_add_bus(adap);
+	if (ret)
+		goto err_add_bus;
+
+	platform_set_drvdata(pdev, adap);
+
+	dev_info(&pdev->dev, "using pins %u (sda) and %u (scl%s)\n",
+		 pdata->sda_pin, pdata->scl_pin,
+		 pdata->scl_is_output_only
+		 ? ", no clock stretching" : "");
+
+	return 0;
+
+err_add_bus:
+	gpio_free(pdata->scl_pin);
+err_request_scl:
+	gpio_free(pdata->sda_pin);
+err_request_sda:
+	kfree(bit_data);
+err_alloc_bit_data:
+	kfree(adap);
+err_alloc_adap:
+	return ret;
+}
+
+static int __exit i2c_gpio_remove(struct platform_device *pdev)
+{
+	struct i2c_gpio_platform_data *pdata;
+	struct i2c_adapter *adap;
+
+	adap = platform_get_drvdata(pdev);
+	pdata = pdev->dev.platform_data;
+
+	i2c_del_adapter(adap);
+	gpio_free(pdata->scl_pin);
+	gpio_free(pdata->sda_pin);
+	kfree(adap->algo_data);
+	kfree(adap);
+
+	return 0;
+}
+
+static struct platform_driver i2c_gpio_driver = {
+	.driver		= {
+		.name	= "i2c-gpio",
+		.owner	= THIS_MODULE,
+	},
+	.remove		= __exit_p(i2c_gpio_remove),
+};
+
+static int __init i2c_gpio_init(void)
+{
+	int ret;
+
+	ret = platform_driver_probe(&i2c_gpio_driver, i2c_gpio_probe);
+	if (ret)
+		printk(KERN_ERR "i2c-gpio: probe failed: %d\n", ret);
+
+	return ret;
+}
+module_init(i2c_gpio_init);
+
+static void __exit i2c_gpio_exit(void)
+{
+	platform_driver_unregister(&i2c_gpio_driver);
+}
+module_exit(i2c_gpio_exit);
+
+MODULE_AUTHOR("Haavard Skinnemoen <hskinnemoen@atmel.com>");
+MODULE_DESCRIPTION("Platform-independent bitbanging i2c driver");
+MODULE_LICENSE("GPL");
diff --git a/include/linux/i2c-gpio.h b/include/linux/i2c-gpio.h
new file mode 100644
index 0000000..7812407
--- /dev/null
+++ b/include/linux/i2c-gpio.h
@@ -0,0 +1,38 @@
+/*
+ * i2c-gpio interface to platform code
+ *
+ * Copyright (C) 2007 Atmel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef _LINUX_I2C_GPIO_H
+#define _LINUX_I2C_GPIO_H
+
+/**
+ * struct i2c_gpio_platform_data - Platform-dependent data for i2c-gpio
+ * @sda_pin: GPIO pin ID to use for SDA
+ * @scl_pin: GPIO pin ID to use for SCL
+ * @udelay: signal toggle delay. SCL frequency is (333 / udelay) kHz
+ * @timeout: clock stretching timeout in jiffies. If the slave keeps
+ *	SCL low for longer than this, the transfer will time out.
+ * @sda_is_open_drain: SDA is configured as open drain, i.e. the pin
+ *	isn't actively driven high when setting the output value high.
+ *	gpio_get_value() must return the actual pin state even if the
+ *	pin is configured as an output.
+ * @scl_is_open_drain: SCL is set up as open drain. Same requirements
+ *	as for sda_is_open_drain apply.
+ * @scl_is_output_only: SCL output drivers cannot be turned off.
+ */
+struct i2c_gpio_platform_data {
+	unsigned int	sda_pin;
+	unsigned int	scl_pin;
+	int		udelay;
+	int		timeout;
+	unsigned int	sda_is_open_drain:1;
+	unsigned int	scl_is_open_drain:1;
+	unsigned int	scl_is_output_only:1;
+};
+
+#endif /* _LINUX_I2C_GPIO_H */
-- 
1.4.4.4


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3] Bitbanging i2c bus driver using the GPIO API
  2007-04-14 14:34 ` Haavard Skinnemoen
@ 2007-04-14 17:28   ` Jean Delvare
  2007-04-18 17:42     ` Lennart Sorensen
  0 siblings, 1 reply; 21+ messages in thread
From: Jean Delvare @ 2007-04-14 17:28 UTC (permalink / raw)
  To: Haavard Skinnemoen
  Cc: David Brownell, Bryan Wu, Andrew Morton, Deepak Saxena, linux-kernel

Hi Haavard,

On Sat, 14 Apr 2007 16:34:18 +0200, Haavard Skinnemoen wrote:
> On Sat, 14 Apr 2007 14:56:47 +0200
> Haavard Skinnemoen <hskinnemoen@atmel.com> wrote:
> 
> >   o Default to a very low SCL frequency (6.6 kHz) if clock stretching
> >     isn't supported
> 
> This would have been true if I had remembered to save before generating
> the patch...
> 
> Updated patch below. Sorry about the mess.
> 
> Haavard
> 
> ===================[cut here]======================
> From: Haavard Skinnemoen <hskinnemoen@atmel.com>
> Subject: [PATCH] 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>
> ---
>  MAINTAINERS                   |    5 +
>  drivers/i2c/busses/Kconfig    |    8 ++
>  drivers/i2c/busses/Makefile   |    1 +
>  drivers/i2c/busses/i2c-gpio.c |  215 +++++++++++++++++++++++++++++++++++++++++
>  include/linux/i2c-gpio.h      |   38 +++++++
>  5 files changed, 267 insertions(+), 0 deletions(-)

Random comments:

> diff --git a/MAINTAINERS b/MAINTAINERS
> index ef84419..fdecda4 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -1429,6 +1429,11 @@ L:	linux-scsi@vger.kernel.org
>  W:	http://www.icp-vortex.com/
>  S:	Supported
>  
> +GENERIC GPIO I2C DRIVER
> +P:	Haavard Skinnemoen
> +M:	hskinnemoen@atmel.com
> +S:	Supported
> +
>  GENERIC HDLC DRIVER, N2, C101, PCI200SYN and WANXL DRIVERS
>  P:	Krzysztof Halasa
>  M:	khc@pm.waw.pl
> diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
> index fb19dbb..52f79d1 100644
> --- a/drivers/i2c/busses/Kconfig
> +++ b/drivers/i2c/busses/Kconfig
> @@ -102,6 +102,14 @@ config I2C_ELEKTOR
>  	  This support is also available as a module.  If so, the module 
>  	  will be called i2c-elektor.
>  
> +config I2C_GPIO
> +	tristate "GPIO-based bitbanging i2c driver"

I removed "driver" from the option name.

> +	depends on I2C && GENERIC_GPIO

I removed I2C, in accordance with Jan Engelhardt's patch:
http://lkml.org/lkml/2007/4/11/153

> +	select I2C_ALGOBIT
> +	help
> +	  This is a very simple bitbanging i2c driver utilizing the
> +	  arch-neutral GPIO API to control the SCL and SDA lines.
> +
>  config I2C_HYDRA
>  	tristate "CHRP Apple Hydra Mac I/O I2C interface"
>  	depends on I2C && PCI && PPC_CHRP && EXPERIMENTAL
> diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
> index 290b540..68f2b05 100644
> --- a/drivers/i2c/busses/Makefile
> +++ b/drivers/i2c/busses/Makefile
> @@ -11,6 +11,7 @@ obj-$(CONFIG_I2C_AMD8111)	+= i2c-amd8111.o
>  obj-$(CONFIG_I2C_AT91)		+= i2c-at91.o
>  obj-$(CONFIG_I2C_AU1550)	+= i2c-au1550.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
> diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
> new file mode 100644
> index 0000000..e427bfb
> --- /dev/null
> +++ b/drivers/i2c/busses/i2c-gpio.c
> @@ -0,0 +1,215 @@
> +/*
> + * Bitbanging i2c bus driver using the GPIO API
> + *
> + * Copyright (C) 2007 Atmel Corporation
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +#include <linux/i2c.h>
> +#include <linux/i2c-algo-bit.h>
> +#include <linux/i2c-gpio.h>
> +#include <linux/init.h>
> +#include <linux/module.h>
> +#include <linux/platform_device.h>
> +
> +#include <asm/gpio.h>
> +
> +/* Toggle SDA by changing the direction of the pin */
> +static void i2c_gpio_setsda_dir(void *data, int state)
> +{
> +	struct i2c_gpio_platform_data *pdata = data;
> +
> +	if (state)
> +		gpio_direction_input(pdata->sda_pin);
> +	else
> +		gpio_direction_output(pdata->sda_pin, 0);
> +}
> +
> +/*
> + * Toggle SDA by changing the output value of the pin. This is only
> + * valid for pins configured as open drain (i.e. setting the value
> + * high effectively turns off the output driver.)
> + */
> +static void i2c_gpio_setsda_val(void *data, int state)
> +{
> +	struct i2c_gpio_platform_data *pdata = data;
> +
> +	gpio_set_value(pdata->sda_pin, state);
> +}
> +
> +/* Toggle SCL by changing the direction of the pin. */
> +static void i2c_gpio_setscl_dir(void *data, int state)
> +{
> +	struct i2c_gpio_platform_data *pdata = data;
> +
> +	if (state)
> +		gpio_direction_input(pdata->scl_pin);
> +	else
> +		gpio_direction_output(pdata->scl_pin, 0);
> +}
> +
> +/*
> + * Toggle SCL by changing the output value of the pin. This is used
> + * for pins that are configured as open drain and for output-only
> + * pins. The latter case will break the i2c protocol, but it will
> + * often work in practice.
> + */
> +static void i2c_gpio_setscl_val(void *data, int state)
> +{
> +	struct i2c_gpio_platform_data *pdata = data;
> +
> +	gpio_set_value(pdata->scl_pin, state);
> +}
> +
> +int i2c_gpio_getsda(void *data)
> +{
> +	struct i2c_gpio_platform_data *pdata = data;
> +
> +	return gpio_get_value(pdata->sda_pin);
> +}
> +
> +int i2c_gpio_getscl(void *data)
> +{
> +	struct i2c_gpio_platform_data *pdata = data;
> +
> +	return gpio_get_value(pdata->scl_pin);
> +}
> +
> +static int __init i2c_gpio_probe(struct platform_device *pdev)
> +{
> +	struct i2c_gpio_platform_data *pdata;
> +	struct i2c_algo_bit_data *bit_data;
> +	struct i2c_adapter *adap;
> +	int ret;
> +
> +	pdata = pdev->dev.platform_data;
> +	if (!pdata)
> +		return -ENXIO;
> +
> +	ret = -ENOMEM;
> +	adap = kzalloc(sizeof(struct i2c_adapter), GFP_KERNEL);
> +	if (!adap)
> +		goto err_alloc_adap;
> +	bit_data = kzalloc(sizeof(struct i2c_algo_bit_data), GFP_KERNEL);
> +	if (!bit_data)
> +		goto err_alloc_bit_data;
> +
> +	ret = gpio_request(pdata->sda_pin, "sda");
> +	if (ret)
> +		goto err_request_sda;
> +	ret = gpio_request(pdata->scl_pin, "scl");
> +	if (ret)
> +		goto err_request_scl;
> +
> +	if (pdata->sda_is_open_drain) {
> +		gpio_direction_output(pdata->sda_pin, 1);
> +		bit_data->setsda = i2c_gpio_setsda_val;
> +	} else {
> +		gpio_direction_input(pdata->sda_pin);
> +		bit_data->setsda = i2c_gpio_setsda_dir;
> +	}
> +
> +	if (pdata->scl_is_open_drain || pdata->scl_is_output_only) {
> +		gpio_direction_output(pdata->scl_pin, 1);
> +		bit_data->setscl = i2c_gpio_setscl_val;
> +	} else {
> +		gpio_direction_input(pdata->scl_pin);
> +		bit_data->setscl = i2c_gpio_setscl_dir;
> +	}
> +
> +	if (!pdata->scl_is_output_only)
> +		bit_data->getscl = i2c_gpio_getscl;
> +	bit_data->getsda = i2c_gpio_getsda;
> +
> +	if (pdata->udelay)
> +		bit_data->udelay = pdata->udelay;
> +	else if (pdata->scl_is_output_only)
> +		bit_data->udelay = 50;			/* 6.6 kHz */
> +	else
> +		bit_data->udelay = 5;			/* 66 kHz */

For your information, I've been reworking the i2c-algo-bit driver quite
a bit since our last discussion. It now has a 50/50 SCL duty cycle, so
udelay = 50 leads to a 10 kHz clock (which is fine, as this is the
minimum allowed for SMBus compatibility) and udelay = 5 leads to 100
kHz, the max for standard-mode I2C and SMBus.

http://lists.lm-sensors.org/pipermail/i2c/2007-March/001014.html

So your default values are OK, but I'll update the comments so that
they match the behavior of the updated i2c-algo-bit driver.

> +
> +	if (pdata->timeout)
> +		bit_data->timeout = pdata->timeout;
> +	else
> +		bit_data->timeout = HZ / 10;		/* 100 ms */
> +
> +	bit_data->data = pdata;
> +
> +	adap->owner = THIS_MODULE;
> +	snprintf(adap->name, I2C_NAME_SIZE, "i2c-gpio%d", pdev->id);

Changed I2C_NAME_SIZE to sizeof(adap->name), in accordance to this
patch:
http://lists.lm-sensors.org/pipermail/i2c/2007-March/000881.html

> +	adap->algo_data = bit_data;
> +	adap->dev.parent = &pdev->dev;
> +
> +	ret = i2c_bit_add_bus(adap);

I suspect that you will soon want to use the new
i2c_bit_add_numbered_bus() instead, so that you can enumerate I2C
devices on the bus directly from the platform code.

http://lists.lm-sensors.org/pipermail/i2c/2007-March/000974.html

> +	if (ret)
> +		goto err_add_bus;
> +
> +	platform_set_drvdata(pdev, adap);
> +
> +	dev_info(&pdev->dev, "using pins %u (sda) and %u (scl%s)\n",
> +		 pdata->sda_pin, pdata->scl_pin,
> +		 pdata->scl_is_output_only
> +		 ? ", no clock stretching" : "");
> +
> +	return 0;
> +
> +err_add_bus:
> +	gpio_free(pdata->scl_pin);
> +err_request_scl:
> +	gpio_free(pdata->sda_pin);
> +err_request_sda:
> +	kfree(bit_data);
> +err_alloc_bit_data:
> +	kfree(adap);
> +err_alloc_adap:
> +	return ret;
> +}
> +
> +static int __exit i2c_gpio_remove(struct platform_device *pdev)
> +{
> +	struct i2c_gpio_platform_data *pdata;
> +	struct i2c_adapter *adap;
> +
> +	adap = platform_get_drvdata(pdev);
> +	pdata = pdev->dev.platform_data;
> +
> +	i2c_del_adapter(adap);
> +	gpio_free(pdata->scl_pin);
> +	gpio_free(pdata->sda_pin);
> +	kfree(adap->algo_data);
> +	kfree(adap);
> +
> +	return 0;
> +}
> +
> +static struct platform_driver i2c_gpio_driver = {
> +	.driver		= {
> +		.name	= "i2c-gpio",
> +		.owner	= THIS_MODULE,
> +	},
> +	.remove		= __exit_p(i2c_gpio_remove),
> +};
> +
> +static int __init i2c_gpio_init(void)
> +{
> +	int ret;
> +
> +	ret = platform_driver_probe(&i2c_gpio_driver, i2c_gpio_probe);
> +	if (ret)
> +		printk(KERN_ERR "i2c-gpio: probe failed: %d\n", ret);
> +
> +	return ret;
> +}
> +module_init(i2c_gpio_init);
> +
> +static void __exit i2c_gpio_exit(void)
> +{
> +	platform_driver_unregister(&i2c_gpio_driver);
> +}
> +module_exit(i2c_gpio_exit);
> +
> +MODULE_AUTHOR("Haavard Skinnemoen <hskinnemoen@atmel.com>");
> +MODULE_DESCRIPTION("Platform-independent bitbanging i2c driver");
> +MODULE_LICENSE("GPL");
> diff --git a/include/linux/i2c-gpio.h b/include/linux/i2c-gpio.h
> new file mode 100644
> index 0000000..7812407
> --- /dev/null
> +++ b/include/linux/i2c-gpio.h
> @@ -0,0 +1,38 @@
> +/*
> + * i2c-gpio interface to platform code
> + *
> + * Copyright (C) 2007 Atmel Corporation
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +#ifndef _LINUX_I2C_GPIO_H
> +#define _LINUX_I2C_GPIO_H
> +
> +/**
> + * struct i2c_gpio_platform_data - Platform-dependent data for i2c-gpio
> + * @sda_pin: GPIO pin ID to use for SDA
> + * @scl_pin: GPIO pin ID to use for SCL
> + * @udelay: signal toggle delay. SCL frequency is (333 / udelay) kHz

I changed that to (500 / udelay).

> + * @timeout: clock stretching timeout in jiffies. If the slave keeps
> + *	SCL low for longer than this, the transfer will time out.
> + * @sda_is_open_drain: SDA is configured as open drain, i.e. the pin
> + *	isn't actively driven high when setting the output value high.
> + *	gpio_get_value() must return the actual pin state even if the
> + *	pin is configured as an output.
> + * @scl_is_open_drain: SCL is set up as open drain. Same requirements
> + *	as for sda_is_open_drain apply.
> + * @scl_is_output_only: SCL output drivers cannot be turned off.
> + */
> +struct i2c_gpio_platform_data {
> +	unsigned int	sda_pin;
> +	unsigned int	scl_pin;
> +	int		udelay;
> +	int		timeout;
> +	unsigned int	sda_is_open_drain:1;
> +	unsigned int	scl_is_open_drain:1;
> +	unsigned int	scl_is_output_only:1;
> +};
> +
> +#endif /* _LINUX_I2C_GPIO_H */

Otherwise it looks OK to me, I take the patch. If others have comments
or objections, just speak up and submit incremental patches as needed.

Now I would like to see platform code actually using this.

-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3] Bitbanging i2c bus driver using the GPIO API
  2007-04-14 17:28   ` Jean Delvare
@ 2007-04-18 17:42     ` Lennart Sorensen
  2007-04-19  6:54       ` Jean Delvare
  0 siblings, 1 reply; 21+ messages in thread
From: Lennart Sorensen @ 2007-04-18 17:42 UTC (permalink / raw)
  To: Jean Delvare
  Cc: Haavard Skinnemoen, David Brownell, Bryan Wu, Andrew Morton,
	Deepak Saxena, linux-kernel

On Sat, Apr 14, 2007 at 07:28:07PM +0200, Jean Delvare wrote:
> Otherwise it looks OK to me, I take the patch. If others have comments
> or objections, just speak up and submit incremental patches as needed.
> 
> Now I would like to see platform code actually using this.

Any idea how similar this new driver is to the scx200_i2c driver?  As
far as I can tell that driver is already a bit banged i2c over gpio
lines.

--
Len Sorensen

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3] Bitbanging i2c bus driver using the GPIO API
  2007-04-18 17:42     ` Lennart Sorensen
@ 2007-04-19  6:54       ` Jean Delvare
  2007-04-19 14:27         ` Jordan Crouse
  2007-04-19 20:59         ` [PATCH v3] " Lennart Sorensen
  0 siblings, 2 replies; 21+ messages in thread
From: Jean Delvare @ 2007-04-19  6:54 UTC (permalink / raw)
  To: Lennart Sorensen
  Cc: Haavard Skinnemoen, David Brownell, Bryan Wu, Andrew Morton,
	Deepak Saxena, linux-kernel, Christer Weinigel, Jordan Crouse

Hi Len,

On Wed, 18 Apr 2007 13:42:56 -0400, Lennart Sorensen wrote:
> On Sat, Apr 14, 2007 at 07:28:07PM +0200, Jean Delvare wrote:
> > Otherwise it looks OK to me, I take the patch. If others have comments
> > or objections, just speak up and submit incremental patches as needed.
> > 
> > Now I would like to see platform code actually using this.
> 
> Any idea how similar this new driver is to the scx200_i2c driver?  As
> far as I can tell that driver is already a bit banged i2c over gpio
> lines.

The major difference is that the implementation in scx200_i2c is
hardware-specific, while the i2c-gpio driver is a generic one, so it's
a lot better.

What this means is that i2c-gpio obsoletes scx200_i2c, so I am inclined
to delete scx200_i2c right away. I'm not even sure anyone still uses it
now that scx200_acb has been fixed and is reported to work very well.
If anyone really needs to do I2C over GPIO pins on SCx200, this should
be reimplemented on top of i2c-gpio.

It also looks to me like i2c-ixp2000 and i2c-ixp4xx are obsoleted by
i2c-gpio. Deepak, can you please try using i2c-gpio instead and confirm
that i2c-ixp2000 and i2c-ixp4xx can be deleted?

Thanks,
-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Bitbanging i2c bus driver using the GPIO API
  2007-04-19  6:54       ` Jean Delvare
@ 2007-04-19 14:27         ` Jordan Crouse
  2007-04-19 20:59         ` [PATCH v3] " Lennart Sorensen
  1 sibling, 0 replies; 21+ messages in thread
From: Jordan Crouse @ 2007-04-19 14:27 UTC (permalink / raw)
  To: Jean Delvare
  Cc: Lennart Sorensen, Haavard Skinnemoen, David Brownell, Bryan Wu,
	Andrew Morton, Deepak Saxena, linux-kernel, Christer Weinigel

On 19/04/07 08:54 +0200, Jean Delvare wrote:
> Hi Len,
> 
> On Wed, 18 Apr 2007 13:42:56 -0400, Lennart Sorensen wrote:
> > On Sat, Apr 14, 2007 at 07:28:07PM +0200, Jean Delvare wrote:
> > > Otherwise it looks OK to me, I take the patch. If others have comments
> > > or objections, just speak up and submit incremental patches as needed.
> > > 
> > > Now I would like to see platform code actually using this.
> > 
> > Any idea how similar this new driver is to the scx200_i2c driver?  As
> > far as I can tell that driver is already a bit banged i2c over gpio
> > lines.
> 
> The major difference is that the implementation in scx200_i2c is
> hardware-specific, while the i2c-gpio driver is a generic one, so it's
> a lot better.
> 
> What this means is that i2c-gpio obsoletes scx200_i2c, so I am inclined
> to delete scx200_i2c right away. I'm not even sure anyone still uses it
> now that scx200_acb has been fixed and is reported to work very well.
> If anyone really needs to do I2C over GPIO pins on SCx200, this should
> be reimplemented on top of i2c-gpio.

It would also force us to move the Geode GPIO pins to the generic 
infrastructure, so that would be good.  I say delete it - if anybody needs
that functionality, then we'll do it the right way.

Jordan



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3] Bitbanging i2c bus driver using the GPIO API
  2007-04-19  6:54       ` Jean Delvare
  2007-04-19 14:27         ` Jordan Crouse
@ 2007-04-19 20:59         ` Lennart Sorensen
  2007-04-20 17:49           ` Jean Delvare
  1 sibling, 1 reply; 21+ messages in thread
From: Lennart Sorensen @ 2007-04-19 20:59 UTC (permalink / raw)
  To: Jean Delvare
  Cc: Haavard Skinnemoen, David Brownell, Bryan Wu, Andrew Morton,
	Deepak Saxena, linux-kernel, Christer Weinigel, Jordan Crouse

On Thu, Apr 19, 2007 at 08:54:13AM +0200, Jean Delvare wrote:
> The major difference is that the implementation in scx200_i2c is
> hardware-specific, while the i2c-gpio driver is a generic one, so it's
> a lot better.
> 
> What this means is that i2c-gpio obsoletes scx200_i2c, so I am inclined
> to delete scx200_i2c right away. I'm not even sure anyone still uses it
> now that scx200_acb has been fixed and is reported to work very well.
> If anyone really needs to do I2C over GPIO pins on SCx200, this should
> be reimplemented on top of i2c-gpio.

I use scx200_i2c.  The SBC I am using doesn't work with the scx200_acb
(different pins on the cpu after all).  I would love to see it
reimplemented using the generic interface, since there isn't that many
lines of code involved as far as I can tell.  Well scx200_acb works fine
on a Geode LX board, but not on a Geode SC1200 board.  Unless it has
been fixed since 2.6.18, then it still doesn't work, but scx200_i2c
works perfectly fine.

> It also looks to me like i2c-ixp2000 and i2c-ixp4xx are obsoleted by
> i2c-gpio. Deepak, can you please try using i2c-gpio instead and confirm
> that i2c-ixp2000 and i2c-ixp4xx can be deleted?

--
Len Sorensen

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3] Bitbanging i2c bus driver using the GPIO API
  2007-04-19 20:59         ` [PATCH v3] " Lennart Sorensen
@ 2007-04-20 17:49           ` Jean Delvare
  2007-04-22 15:41             ` Lennart Sorensen
  0 siblings, 1 reply; 21+ messages in thread
From: Jean Delvare @ 2007-04-20 17:49 UTC (permalink / raw)
  To: Lennart Sorensen
  Cc: Haavard Skinnemoen, David Brownell, Bryan Wu, Andrew Morton,
	Deepak Saxena, linux-kernel, Christer Weinigel, Jordan Crouse

Hi Lennart,

On Thu, 19 Apr 2007 16:59:42 -0400, Lennart Sorensen wrote:
> On Thu, Apr 19, 2007 at 08:54:13AM +0200, Jean Delvare wrote:
> > The major difference is that the implementation in scx200_i2c is
> > hardware-specific, while the i2c-gpio driver is a generic one, so it's
> > a lot better.
> > 
> > What this means is that i2c-gpio obsoletes scx200_i2c, so I am inclined
> > to delete scx200_i2c right away. I'm not even sure anyone still uses it
> > now that scx200_acb has been fixed and is reported to work very well.
> > If anyone really needs to do I2C over GPIO pins on SCx200, this should
> > be reimplemented on top of i2c-gpio.
> 
> I use scx200_i2c.  The SBC I am using doesn't work with the scx200_acb
> (different pins on the cpu after all).  I would love to see it
> reimplemented using the generic interface, since there isn't that many
> lines of code involved as far as I can tell.  Well scx200_acb works fine
> on a Geode LX board, but not on a Geode SC1200 board.  Unless it has
> been fixed since 2.6.18, then it still doesn't work, but scx200_i2c
> works perfectly fine.

The scx200_acb driver was heavily modified in 2.6.17 and 2.6.18, not
much since then. I am not familiar with the hardware so I can't comment
on which chips are supposed to work and which aren't.

-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3] Bitbanging i2c bus driver using the GPIO API
  2007-04-20 17:49           ` Jean Delvare
@ 2007-04-22 15:41             ` Lennart Sorensen
  2007-04-22 23:41               ` Jordan Crouse
  2007-04-23  9:42               ` [PATCH v3] " Jean Delvare
  0 siblings, 2 replies; 21+ messages in thread
From: Lennart Sorensen @ 2007-04-22 15:41 UTC (permalink / raw)
  To: Jean Delvare
  Cc: Haavard Skinnemoen, David Brownell, Bryan Wu, Andrew Morton,
	Deepak Saxena, linux-kernel, Christer Weinigel, Jordan Crouse

On Fri, Apr 20, 2007 at 07:49:33PM +0200, Jean Delvare wrote:
> The scx200_acb driver was heavily modified in 2.6.17 and 2.6.18, not
> much since then. I am not familiar with the hardware so I can't comment
> on which chips are supposed to work and which aren't.

Well 2.6.18's scx200_acb works on the geode LX module I have, but no on
the geode sc1200 module (where scx200_i2c does work).

scx200_acb doesn't detect any device that it can drive (nothing in dmesg
at all when loaded) on the sc1200.  I believe the main changes that
happened to scx200_acb was adding support for the newer CSxxxx chipsets,
such as the one used with the geode LX (which does work now).

--
Len Sorensen

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Bitbanging i2c bus driver using the GPIO API
  2007-04-22 15:41             ` Lennart Sorensen
@ 2007-04-22 23:41               ` Jordan Crouse
  2007-04-23  9:42               ` [PATCH v3] " Jean Delvare
  1 sibling, 0 replies; 21+ messages in thread
From: Jordan Crouse @ 2007-04-22 23:41 UTC (permalink / raw)
  To: lsorense
  Cc: Jean Delvare, Haavard Skinnemoen, David Brownell, Bryan Wu,
	Andrew Morton, Deepak Saxena, linux-kernel, Christer Weinigel

On 22/04/07 11:41 -0400, lsorense@csclub.uwaterloo.ca wrote:
> scx200_acb doesn't detect any device that it can drive (nothing in dmesg
> at all when loaded) on the sc1200.  I believe the main changes that
> happened to scx200_acb was adding support for the newer CSxxxx chipsets,
> such as the one used with the geode LX (which does work now).

That ISA detection is almost definately suffering from severe bit rot.
Once you get past that though, you should be fine - the silicon behind
the ACB hasn't changed since the MediaGX days.

Jordan

-- 
Jordan Crouse
Senior Linux Engineer
Advanced Micro Devices, Inc.
<www.amd.com/embeddedprocessors>



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH v3] Bitbanging i2c bus driver using the GPIO API
  2007-04-22 15:41             ` Lennart Sorensen
  2007-04-22 23:41               ` Jordan Crouse
@ 2007-04-23  9:42               ` Jean Delvare
  2007-04-23 14:47                 ` Jordan Crouse
  1 sibling, 1 reply; 21+ messages in thread
From: Jean Delvare @ 2007-04-23  9:42 UTC (permalink / raw)
  To: Lennart Sorensen
  Cc: Haavard Skinnemoen, David Brownell, Bryan Wu, Andrew Morton,
	Deepak Saxena, linux-kernel, Christer Weinigel, Jordan Crouse

Lennart,

On Sun, 22 Apr 2007 11:41:51 -0400, Lennart Sorensen wrote:
> On Fri, Apr 20, 2007 at 07:49:33PM +0200, Jean Delvare wrote:
> > The scx200_acb driver was heavily modified in 2.6.17 and 2.6.18, not
> > much since then. I am not familiar with the hardware so I can't comment
> > on which chips are supposed to work and which aren't.
> 
> Well 2.6.18's scx200_acb works on the geode LX module I have, but no on
> the geode sc1200 module (where scx200_i2c does work).
> 
> scx200_acb doesn't detect any device that it can drive (nothing in dmesg
> at all when loaded) on the sc1200.

On the SCx200, the scx200_acb driver doesn't actually detect the
device. It uses arbitrary I/O addresses and hopes for the best. By
default, two buses are created, at 0x820 and 0x840. This might simply
not be the right addresses for your board. See
Documentation/i2c/busses/scx200_acb.

You should enable CONFIG_I2C_DEBUG_BUS and see what the driver says
when being loaded.

I seem to remember there has been a patch floating around to
auto-detect the right ports back in June 2006, but it seems to have
been lost somehow. Jordan, do you remember?

> I believe the main changes that
> happened to scx200_acb was adding support for the newer CSxxxx chipsets,
> such as the one used with the geode LX (which does work now).

Not only. There was also a log of bug fixing.

-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Bitbanging i2c bus driver using the GPIO API
  2007-04-23  9:42               ` [PATCH v3] " Jean Delvare
@ 2007-04-23 14:47                 ` Jordan Crouse
  2007-04-26 12:56                   ` Jean Delvare
  0 siblings, 1 reply; 21+ messages in thread
From: Jordan Crouse @ 2007-04-23 14:47 UTC (permalink / raw)
  To: Jean Delvare
  Cc: Lennart Sorensen, Haavard Skinnemoen, David Brownell, Bryan Wu,
	Andrew Morton, Deepak Saxena, linux-kernel, Christer Weinigel

On 23/04/07 11:42 +0200, Jean Delvare wrote:
> I seem to remember there has been a patch floating around to
> auto-detect the right ports back in June 2006, but it seems to have
> been lost somehow. Jordan, do you remember?

I don't remember that, and Google isn't helping, either.  Regardless,
randomly hitting ISA ports seems scary to me.  I know its a pain to use
the module params all the time, but thats really probably the cleanest way
to to it without carrying around a special patch for your system.

Jordan

-- 
Jordan Crouse
Senior Linux Engineer
Advanced Micro Devices, Inc.
<www.amd.com/embeddedprocessors>



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Bitbanging i2c bus driver using the GPIO API
  2007-04-23 14:47                 ` Jordan Crouse
@ 2007-04-26 12:56                   ` Jean Delvare
  2007-04-26 13:29                     ` Lennart Sorensen
  0 siblings, 1 reply; 21+ messages in thread
From: Jean Delvare @ 2007-04-26 12:56 UTC (permalink / raw)
  To: Jordan Crouse
  Cc: Lennart Sorensen, Haavard Skinnemoen, David Brownell, Bryan Wu,
	Andrew Morton, Deepak Saxena, linux-kernel, Christer Weinigel

On Mon, 23 Apr 2007 08:47:10 -0600, Jordan Crouse wrote:
> On 23/04/07 11:42 +0200, Jean Delvare wrote:
> > I seem to remember there has been a patch floating around to
> > auto-detect the right ports back in June 2006, but it seems to have
> > been lost somehow. Jordan, do you remember?
> 
> I don't remember that, and Google isn't helping, either.  Regardless,
> randomly hitting ISA ports seems scary to me.  I know its a pain to use
> the module params all the time, but thats really probably the cleanest way
> to to it without carrying around a special patch for your system.

After digging some more, I finally managed to get my hands back on it:
http://lists.lm-sensors.org/pipermail/lm-sensors/2006-April/016009.html
http://lists.lm-sensors.org/pipermail/lm-sensors/2006-May/016053.html

This isn't "randomly hitting ISA ports", this is reading the base I/O
addresses from LPC configuration space. That's much better than letting
the user set the addresses using module parameters.

Lennart, can you please provide the output of the following commands on
your system?

isadump 0x2e 0x2f 5
isadump 0x2e 0x2f 6
isadump 0x4e 0x4f 5
isadump 0x4e 0x4f 6

(isadump is part of the lm_sensors package.)

-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Bitbanging i2c bus driver using the GPIO API
  2007-04-26 12:56                   ` Jean Delvare
@ 2007-04-26 13:29                     ` Lennart Sorensen
  2007-04-26 13:39                       ` Jordan Crouse
  0 siblings, 1 reply; 21+ messages in thread
From: Lennart Sorensen @ 2007-04-26 13:29 UTC (permalink / raw)
  To: Jean Delvare
  Cc: Jordan Crouse, Haavard Skinnemoen, David Brownell, Bryan Wu,
	Andrew Morton, Deepak Saxena, linux-kernel, Christer Weinigel

On Thu, Apr 26, 2007 at 02:56:34PM +0200, Jean Delvare wrote:
> After digging some more, I finally managed to get my hands back on it:
> http://lists.lm-sensors.org/pipermail/lm-sensors/2006-April/016009.html
> http://lists.lm-sensors.org/pipermail/lm-sensors/2006-May/016053.html
> 
> This isn't "randomly hitting ISA ports", this is reading the base I/O
> addresses from LPC configuration space. That's much better than letting
> the user set the addresses using module parameters.
> 
> Lennart, can you please provide the output of the following commands on
> your system?
> 
> isadump 0x2e 0x2f 5
> isadump 0x2e 0x2f 6

These return all 0xff.  For example:

router2:~# isadump 0x2e 0x2f 5
WARNING! Running this program can cause system crashes, data loss and worse!
I will probe address register 0x2e and data register 0x2f.
Probing bank 5 using bank register 0x07.
Continue? [Y/n]
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
10: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
90: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

> isadump 0x4e 0x4f 5
> isadump 0x4e 0x4f 6

These return all 0x00

On the Geode LX800 where scx200_acb does work all 4 commands return all
0xff.

--
Len Sorensen

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Bitbanging i2c bus driver using the GPIO API
  2007-04-26 13:29                     ` Lennart Sorensen
@ 2007-04-26 13:39                       ` Jordan Crouse
  2007-04-26 14:03                         ` Lennart Sorensen
  0 siblings, 1 reply; 21+ messages in thread
From: Jordan Crouse @ 2007-04-26 13:39 UTC (permalink / raw)
  To: lsorense
  Cc: Jean Delvare, Haavard Skinnemoen, David Brownell, Bryan Wu,
	Andrew Morton, Deepak Saxena, linux-kernel, Christer Weinigel

On 26/04/07 09:29 -0400, lsorense@csclub.uwaterloo.ca wrote:
> 
> These return all 0x00
> 
> On the Geode LX800 where scx200_acb does work all 4 commands return all
> 0xff.

There is no ISA on the LX.

-- 
Jordan Crouse
Senior Linux Engineer
Advanced Micro Devices, Inc.
<www.amd.com/embeddedprocessors>



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Bitbanging i2c bus driver using the GPIO API
  2007-04-26 13:39                       ` Jordan Crouse
@ 2007-04-26 14:03                         ` Lennart Sorensen
  2007-04-27  8:02                           ` Jean Delvare
  0 siblings, 1 reply; 21+ messages in thread
From: Lennart Sorensen @ 2007-04-26 14:03 UTC (permalink / raw)
  To: Jordan Crouse
  Cc: Jean Delvare, Haavard Skinnemoen, David Brownell, Bryan Wu,
	Andrew Morton, Deepak Saxena, linux-kernel, Christer Weinigel

On Thu, Apr 26, 2007 at 07:39:20AM -0600, Jordan Crouse wrote:
> There is no ISA on the LX.

Isn't LPC a good equivalant?

--
Len Sorensen

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Bitbanging i2c bus driver using the GPIO API
  2007-04-26 14:03                         ` Lennart Sorensen
@ 2007-04-27  8:02                           ` Jean Delvare
  2007-04-27 14:19                             ` Lennart Sorensen
  2007-04-27 14:49                             ` Jordan Crouse
  0 siblings, 2 replies; 21+ messages in thread
From: Jean Delvare @ 2007-04-27  8:02 UTC (permalink / raw)
  To: Lennart Sorensen
  Cc: Jordan Crouse, Haavard Skinnemoen, David Brownell, Bryan Wu,
	Andrew Morton, Deepak Saxena, linux-kernel, Christer Weinigel

On Thu, 26 Apr 2007 10:03:23 -0400, Lennart Sorensen wrote:
> On Thu, Apr 26, 2007 at 07:39:20AM -0600, Jordan Crouse wrote:
> > There is no ISA on the LX.
> 
> Isn't LPC a good equivalant?

I suspect that Jordan meant that there is no LPC either. In which case,
of course, there's no way scx200_acb will ever work on that system, and
GPIO-based bitbanging is the way to go. Just using i2c-gpio rather than
scx200_i2c.

-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Bitbanging i2c bus driver using the GPIO API
  2007-04-27  8:02                           ` Jean Delvare
@ 2007-04-27 14:19                             ` Lennart Sorensen
  2007-04-27 14:49                             ` Jordan Crouse
  1 sibling, 0 replies; 21+ messages in thread
From: Lennart Sorensen @ 2007-04-27 14:19 UTC (permalink / raw)
  To: Jean Delvare
  Cc: Jordan Crouse, Haavard Skinnemoen, David Brownell, Bryan Wu,
	Andrew Morton, Deepak Saxena, linux-kernel, Christer Weinigel

On Fri, Apr 27, 2007 at 10:02:04AM +0200, Jean Delvare wrote:
> I suspect that Jordan meant that there is no LPC either. In which case,
> of course, there's no way scx200_acb will ever work on that system, and
> GPIO-based bitbanging is the way to go. Just using i2c-gpio rather than
> scx200_i2c.

Ehm, there most certainly is LPC on a Geode LX800 + CS5536.  I am
currently using the LPC bus on it, and scx200_acb in 2.6.18 works
perfectly with the I2C on it too.

--
Len Sorensen

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Bitbanging i2c bus driver using the GPIO API
  2007-04-27  8:02                           ` Jean Delvare
  2007-04-27 14:19                             ` Lennart Sorensen
@ 2007-04-27 14:49                             ` Jordan Crouse
  2007-04-27 18:53                               ` Lennart Sorensen
  1 sibling, 1 reply; 21+ messages in thread
From: Jordan Crouse @ 2007-04-27 14:49 UTC (permalink / raw)
  To: Jean Delvare
  Cc: Lennart Sorensen, Haavard Skinnemoen, David Brownell, Bryan Wu,
	Andrew Morton, Deepak Saxena, linux-kernel, Christer Weinigel

On 27/04/07 10:02 +0200, Jean Delvare wrote:
> On Thu, 26 Apr 2007 10:03:23 -0400, Lennart Sorensen wrote:
> > On Thu, Apr 26, 2007 at 07:39:20AM -0600, Jordan Crouse wrote:
> > > There is no ISA on the LX.
> > 
> > Isn't LPC a good equivalent?
> 
> I suspect that Jordan meant that there is no LPC either. In which case,
> of course, there's no way scx200_acb will ever work on that system, and
> GPIO-based bitbanging is the way to go. Just using i2c-gpio rather than
> scx200_i2c.

This is getting confusing... :)  On the sc1200 and and GX1, the ACB
bus is accessed through ISA ports.  There is no ISA on the cs5535/cs5536
companion chips (accompanying the GX and LX processors), and the ACB
is accessed through PCI.  All the platforms have LPC, but that really
doesn't matter for the purposes of this discussion.

The silicon block that implements the ACB has been generally unchanged
over the last 6 or 7 years, so the same driver should support any of
the platforms, assuming one can invoke the magic spells to get at the
hardware.  Jean and I have been concentrating most of our effort on 
getting the GX and LX to work through PCI, and really haven't concentrated
our efforts on the older processors.  Thats not to say it won't work,
but its probably not plug and play.

Jordan

-- 
Jordan Crouse
Senior Linux Engineer
Advanced Micro Devices, Inc.
<www.amd.com/embeddedprocessors>



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Bitbanging i2c bus driver using the GPIO API
  2007-04-27 14:49                             ` Jordan Crouse
@ 2007-04-27 18:53                               ` Lennart Sorensen
  2007-05-06  9:24                                 ` Jean Delvare
  0 siblings, 1 reply; 21+ messages in thread
From: Lennart Sorensen @ 2007-04-27 18:53 UTC (permalink / raw)
  To: Jordan Crouse
  Cc: Jean Delvare, Haavard Skinnemoen, David Brownell, Bryan Wu,
	Andrew Morton, Deepak Saxena, linux-kernel, Christer Weinigel

On Fri, Apr 27, 2007 at 08:49:49AM -0600, Jordan Crouse wrote:
> This is getting confusing... :)  On the sc1200 and and GX1, the ACB
> bus is accessed through ISA ports.  There is no ISA on the cs5535/cs5536
> companion chips (accompanying the GX and LX processors), and the ACB
> is accessed through PCI.  All the platforms have LPC, but that really
> doesn't matter for the purposes of this discussion.
> 
> The silicon block that implements the ACB has been generally unchanged
> over the last 6 or 7 years, so the same driver should support any of
> the platforms, assuming one can invoke the magic spells to get at the
> hardware.  Jean and I have been concentrating most of our effort on 
> getting the GX and LX to work through PCI, and really haven't concentrated
> our efforts on the older processors.  Thats not to say it won't work,
> but its probably not plug and play.

Well the SC1200 has an ACB but it is disabled by default through one of
the gpio multiplex selector bits.  According to the data sheet only the
bios knows where that is.  So instead the gpio's (12 and 13) that are
multiplexed with acb #2 are driven by scx200_i2c using the bit banged
interface.  Makes it work for those of us that don't have access to
changing the bios.

Unfortuantely I don't think the scx200 gpio's have been rewritten to use
the new gpio interface.  If it was I would try to see if the new i2c
driver would work if told to use gpio 12 and 13.

scx200_i2c does depend on i2c-algo-bit so there is really very little
code inside scx200_i2c itself.  Does the new driver replace
i2c-algo-bit as well or does it use it?

--
Len Sorensen

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: Bitbanging i2c bus driver using the GPIO API
  2007-04-27 18:53                               ` Lennart Sorensen
@ 2007-05-06  9:24                                 ` Jean Delvare
  0 siblings, 0 replies; 21+ messages in thread
From: Jean Delvare @ 2007-05-06  9:24 UTC (permalink / raw)
  To: Lennart Sorensen
  Cc: Jordan Crouse, Haavard Skinnemoen, David Brownell, Bryan Wu,
	Andrew Morton, Deepak Saxena, linux-kernel, Christer Weinigel

On Fri, 27 Apr 2007 14:53:31 -0400, Lennart Sorensen wrote:
> scx200_i2c does depend on i2c-algo-bit so there is really very little
> code inside scx200_i2c itself.  Does the new driver replace
> i2c-algo-bit as well or does it use it?

It uses it.

-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2007-05-06  9:23 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-14 12:56 [PATCH v3] Bitbanging i2c bus driver using the GPIO API Haavard Skinnemoen
2007-04-14 14:34 ` Haavard Skinnemoen
2007-04-14 17:28   ` Jean Delvare
2007-04-18 17:42     ` Lennart Sorensen
2007-04-19  6:54       ` Jean Delvare
2007-04-19 14:27         ` Jordan Crouse
2007-04-19 20:59         ` [PATCH v3] " Lennart Sorensen
2007-04-20 17:49           ` Jean Delvare
2007-04-22 15:41             ` Lennart Sorensen
2007-04-22 23:41               ` Jordan Crouse
2007-04-23  9:42               ` [PATCH v3] " Jean Delvare
2007-04-23 14:47                 ` Jordan Crouse
2007-04-26 12:56                   ` Jean Delvare
2007-04-26 13:29                     ` Lennart Sorensen
2007-04-26 13:39                       ` Jordan Crouse
2007-04-26 14:03                         ` Lennart Sorensen
2007-04-27  8:02                           ` Jean Delvare
2007-04-27 14:19                             ` Lennart Sorensen
2007-04-27 14:49                             ` Jordan Crouse
2007-04-27 18:53                               ` Lennart Sorensen
2007-05-06  9:24                                 ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).