Re: [PATCH v2] Bitbanging i2c bus driver using the GPIO API

2007-03-12 Thread Haavard Skinnemoen
On Mon, 12 Mar 2007 16:11:09 +0100 Jean Delvare <[EMAIL PROTECTED]> wrote: > > By the way, timeout seems to be hardcoded to 100 jiffies in the > > i2c-algo-bit driver, so there's probably not much point passing it from > > the board code when it's going to be overridden anyway. I'll add just a >

Re: [PATCH v2] Bitbanging i2c bus driver using the GPIO API

2007-03-12 Thread Jean Delvare
Hi Haavard, On Mon, 12 Mar 2007 15:53:59 +0100, Haavard Skinnemoen wrote: > On Mon, 12 Mar 2007 15:34:57 +0100 > Haavard Skinnemoen <[EMAIL PROTECTED]> wrote: > > > > > + bit_data->udelay= 5,/* 100 kHz */ > > > > + bit_data->timeout = HZ / 10,

Re: [PATCH v2] Bitbanging i2c bus driver using the GPIO API

2007-03-12 Thread Haavard Skinnemoen
On Mon, 12 Mar 2007 15:34:57 +0100 Haavard Skinnemoen <[EMAIL PROTECTED]> wrote: > > > + bit_data->udelay= 5,/* 100 kHz */ > > > + bit_data->timeout = HZ / 10, /* 100 ms */ > > > > Can we add these udelay/timeout to struct i2c_gpio_platform_data?

Re: [PATCH v2] Bitbanging i2c bus driver using the GPIO API

2007-03-12 Thread Haavard Skinnemoen
On Mon, 12 Mar 2007 18:07:59 +0800 "Wu, Bryan" <[EMAIL PROTECTED]> wrote: > > static struct i2c_gpio_platform_data i2c_gpio_data = { > > .sda_pin= GPIO_PIN_FOO, > > .scl_pin= GPIO_PIN_BAR, > > }; > > Is this usage right, because 3 flags are added to this structure as >

Re: [PATCH v2] Bitbanging i2c bus driver using the GPIO API

2007-03-12 Thread Haavard Skinnemoen
On Sat, 10 Mar 2007 21:15:50 +0100 Jean Delvare <[EMAIL PROTECTED]> wrote: > I like the idea very much. Would this let us get rid of i2c-ixp2000? > i2c-ixp4xx? scx200_i2c? Other drivers? Any platform that implements the generic gpio api should be able to use this driver. So yes, I hope we might

Re: [PATCH v2] Bitbanging i2c bus driver using the GPIO API

2007-03-12 Thread Haavard Skinnemoen
On Sat, 10 Mar 2007 21:15:50 +0100 Jean Delvare [EMAIL PROTECTED] wrote: I like the idea very much. Would this let us get rid of i2c-ixp2000? i2c-ixp4xx? scx200_i2c? Other drivers? Any platform that implements the generic gpio api should be able to use this driver. So yes, I hope we might be

Re: [PATCH v2] Bitbanging i2c bus driver using the GPIO API

2007-03-12 Thread Haavard Skinnemoen
On Mon, 12 Mar 2007 18:07:59 +0800 Wu, Bryan [EMAIL PROTECTED] wrote: static struct i2c_gpio_platform_data i2c_gpio_data = { .sda_pin= GPIO_PIN_FOO, .scl_pin= GPIO_PIN_BAR, }; Is this usage right, because 3 flags are added to this structure as below:

Re: [PATCH v2] Bitbanging i2c bus driver using the GPIO API

2007-03-12 Thread Haavard Skinnemoen
On Mon, 12 Mar 2007 15:34:57 +0100 Haavard Skinnemoen [EMAIL PROTECTED] wrote: + bit_data-udelay= 5,/* 100 kHz */ + bit_data-timeout = HZ / 10, /* 100 ms */ Can we add these udelay/timeout to struct i2c_gpio_platform_data? And let

Re: [PATCH v2] Bitbanging i2c bus driver using the GPIO API

2007-03-12 Thread Jean Delvare
Hi Haavard, On Mon, 12 Mar 2007 15:53:59 +0100, Haavard Skinnemoen wrote: On Mon, 12 Mar 2007 15:34:57 +0100 Haavard Skinnemoen [EMAIL PROTECTED] wrote: + bit_data-udelay= 5,/* 100 kHz */ + bit_data-timeout = HZ / 10, /* 100

Re: [PATCH v2] Bitbanging i2c bus driver using the GPIO API

2007-03-12 Thread Haavard Skinnemoen
On Mon, 12 Mar 2007 16:11:09 +0100 Jean Delvare [EMAIL PROTECTED] wrote: By the way, timeout seems to be hardcoded to 100 jiffies in the i2c-algo-bit driver, so there's probably not much point passing it from the board code when it's going to be overridden anyway. I'll add just a udelay

Re: [PATCH v2] Bitbanging i2c bus driver using the GPIO API

2007-03-11 Thread Wu, Bryan
On Sat, 2007-03-10 at 14:13 +0100, Haavard Skinnemoen wrote: > 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. > Sorry for missing this hot

Re: [PATCH v2] Bitbanging i2c bus driver using the GPIO API

2007-03-11 Thread Wu, Bryan
On Sat, 2007-03-10 at 14:13 +0100, Haavard Skinnemoen wrote: 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. Sorry for missing this hot discussion.

Re: [PATCH v2] Bitbanging i2c bus driver using the GPIO API

2007-03-10 Thread David Brownell
On Saturday 10 March 2007 5:13 am, Haavard Skinnemoen wrote: > This is a very simple bitbanging i2c bus driver utilizing the new > arch-neutral GPIO API. ... > --- > This patch is different from the first patch in the following ways: > * Handles pins set up as open drain (aka multidrive) by

Re: [PATCH v2] Bitbanging i2c bus driver using the GPIO API

2007-03-10 Thread David Brownell
On Saturday 10 March 2007 12:15 pm, Jean Delvare wrote: > Hi Haavard, > > On Sat, 10 Mar 2007 14:13:28 +0100, Haavard Skinnemoen wrote: > > 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,

Re: [PATCH v2] Bitbanging i2c bus driver using the GPIO API

2007-03-10 Thread Jean Delvare
Hi Haavard, On Sat, 10 Mar 2007 14:13:28 +0100, Haavard Skinnemoen wrote: > 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

[PATCH v2] Bitbanging i2c bus driver using the GPIO API

2007-03-10 Thread 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

[PATCH v2] Bitbanging i2c bus driver using the GPIO API

2007-03-10 Thread 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

Re: [PATCH v2] Bitbanging i2c bus driver using the GPIO API

2007-03-10 Thread Jean Delvare
Hi Haavard, On Sat, 10 Mar 2007 14:13:28 +0100, Haavard Skinnemoen wrote: 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

Re: [PATCH v2] Bitbanging i2c bus driver using the GPIO API

2007-03-10 Thread David Brownell
On Saturday 10 March 2007 5:13 am, Haavard Skinnemoen wrote: This is a very simple bitbanging i2c bus driver utilizing the new arch-neutral GPIO API. ... --- This patch is different from the first patch in the following ways: * Handles pins set up as open drain (aka multidrive) by toggling

Re: [PATCH v2] Bitbanging i2c bus driver using the GPIO API

2007-03-10 Thread David Brownell
On Saturday 10 March 2007 12:15 pm, Jean Delvare wrote: Hi Haavard, On Sat, 10 Mar 2007 14:13:28 +0100, Haavard Skinnemoen wrote: 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,