From: Jean Delvare <khali@linux-fr.org>
To: Bryan Wu <bryan.wu@analog.com>
Cc: David Brownell <david-b@pacbell.net>,
Andrew Morton <akpm@linux-foundation.org>,
Deepak Saxena <dsaxena@plexity.net>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] i2c-core: i2c bitbang gpio structure
Date: Fri, 9 Mar 2007 17:55:40 +0100 [thread overview]
Message-ID: <20070309175540.6bb22798.khali@linux-fr.org> (raw)
In-Reply-To: <1173435201.18580.17.camel@roc-desktop>
Hi Bryan,
On Fri, 09 Mar 2007 18:13:21 +0800, Wu, Bryan wrote:
> Hi folks,
>
> A new structure is added to i2c-core for GPIO-based I2C interface
> adapter. My latest GPIO based I2C adapter driver for Blackfin system
> will use this stuff. And also IXP4XX GPIO based I2C driver can also be
> moved to this.
>
> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
> ---
> include/linux/i2c.h | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> Index: include/linux/i2c.h
> ===================================================================
> --- include/linux/i2c.h (revision 2813)
> +++ include/linux/i2c.h (working copy)
> @@ -201,6 +201,26 @@ struct i2c_algorithm {
> };
>
> /*
> + * Some chips do not have an I2C unit, so GPIO lines are just used to
> + * Used as platform_data to provide GPIO pin information to this kind GPIO
> + * based I2C driver.
> + */
> +struct i2c_bitbang_gpio {
> + int sda;
> + int scl;
> +};
Why would this be included in the generic i2c.h header file? As far as
I can see this structure only makes sense for bit-banged I2C busses, so
this structure should be declared in i2c-algo-bit.h.
Also, this structure alone isn't very useful. I'm waiting to see
drivers actually making use of it before I will consider merging this
patch at all.
> +
> +static inline int i2c_bitbang_gpio_sda(struct i2c_bitbang_gpio *gpio)
> +{
> + return (gpio->sda);
> +}
> +
> +static inline int i2c_bitbang_gpio_scl(struct i2c_bitbang_gpio *gpio)
> +{
> + return (gpio->scl);
> +}
What's the point of these?
--
Jean Delvare
next prev parent reply other threads:[~2007-03-09 16:57 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-09 10:13 [PATCH] i2c-core: i2c bitbang gpio structure Wu, Bryan
2007-03-09 16:55 ` Jean Delvare [this message]
2007-03-09 17:45 ` David Brownell
2007-03-09 18:48 ` [PATCH] Bitbanging i2c bus driver using the GPIO API Haavard Skinnemoen
2007-03-09 19:30 ` David Brownell
2007-03-09 20:08 ` Russell King
2007-03-09 21:17 ` David Brownell
2007-03-09 20:43 ` Håvard Skinnemoen
2007-03-09 21:45 ` David Brownell
2007-03-10 13:13 ` [PATCH v2] " Haavard Skinnemoen
2007-03-10 20:15 ` Jean Delvare
2007-03-11 4:31 ` David Brownell
2007-03-12 14:11 ` Haavard Skinnemoen
2007-03-11 4:02 ` David Brownell
2007-03-12 10:07 ` Wu, Bryan
2007-03-12 14:34 ` Haavard Skinnemoen
2007-03-12 14:53 ` Haavard Skinnemoen
2007-03-12 15:11 ` Jean Delvare
2007-03-12 15:30 ` Haavard Skinnemoen
2007-03-10 19:15 ` [PATCH] " Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070309175540.6bb22798.khali@linux-fr.org \
--to=khali@linux-fr.org \
--cc=akpm@linux-foundation.org \
--cc=bryan.wu@analog.com \
--cc=david-b@pacbell.net \
--cc=dsaxena@plexity.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox