All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: bryan.wu@analog.com
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
	Sonic Zhang <sonic.adi@gmail.com>,
	Mike Frysinger <vapier.adi@gmail.com>,
	khali@linux-fr.org, linux-kernel@vger.kernel.org, mhfan@ustc.edu,
	Roman Zippel <zippel@linux-m68k.org>
Subject: Re: [PATCH -mm] Blackfin: blackfin i2c driver
Date: Tue, 6 Mar 2007 23:02:15 -0800	[thread overview]
Message-ID: <20070306230215.0fab528b.akpm@linux-foundation.org> (raw)
In-Reply-To: <1173247078.28531.24.camel@roc-desktop>

On Wed, 07 Mar 2007 13:57:58 +0800 "Wu, Bryan" <bryan.wu@analog.com> wrote:

> Here is the updated blackfin i2c driver.
> 
> [PATCH] Blackfin: blackfin i2c driver
> 
> The i2c linux driver for blackfin architecture which supports both GPIO
> i2c operation and blackfin on-chip TWI controller i2c operation.
> 
> Signed-off-by: Bryan Wu <bryan.wu@analog.com> 
> ---
>  drivers/i2c/busses/Kconfig         |   47 ++++
>  drivers/i2c/busses/i2c-bfin-gpio.c |   98 +++++++++
>  drivers/i2c/busses/i2c-bfin-twi.c  |  589 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 734 insertions(+)
> 
> Index: linux-2.6/drivers/i2c/busses/Kconfig
> ===================================================================
> --- linux-2.6.orig/drivers/i2c/busses/Kconfig	2007-03-07 13:32:02.000000000 +0800
> +++ linux-2.6/drivers/i2c/busses/Kconfig	2007-03-07 13:44:19.000000000 +0800
> @@ -5,6 +5,53 @@
>  menu "I2C Hardware Bus support"
>  	depends on I2C
>  
> +config I2C_BFIN_GPIO
> +	tristate "Generic Blackfin and HHBF533/561 development board I2C support"
> +	depends on I2C && EXPERIMENTAL
> +	select I2C_ALGOBIT
> +	help
> +	--
> +
> +menu "BFIN I2C SDA/SCL Selection"
> +	depends on I2C_BFIN_GPIO
> +config BFIN_SDA
> +	int "SDA is GPIO Number"
> +	range 0 15 if (BF533 || BF532 || BF531) 
> +	range 0 47 if (BF534 || BF536 || BF537)
> +	range 0 47 if BF561
> +	default 2 if (BF533 || BF532 || BF531) 
> +
> +config BFIN_SCL
> +	int "SCL is GPIO Number"
> +	range 0 15 if (BF533 || BF532 || BF531) 
> +	range 0 47 if (BF534 || BF536 || BF537)
> +	range 0 47 if BF561
> +	default 3 
> +endmenu
> +
> +config I2C_BFIN_GPIO_CYCLE_DELAY
> +	int "Cycle Delay in usec"
> +	depends on I2C_BFIN_GPIO
> +	range 1 100 
> +	default 40
> +
> +config I2C_BFIN_TWI
> +	tristate "Blackfin TWI I2C support"
> +	depends on I2C && (BF534 || BF536 || BF537)
> +	help
> +	  This the TWI I2C device driver for Blackfin 534/536/537.
> +
> +	  This driver can also be built as a module.  If so, the module
> +	  will be called i2c-bfin-twi.
> +
> +config TWICLK_KHZ
> +	int "TWI clock (kHZ)"
> +	depends on I2C_BFIN_TWI
> +	default 50
> +	help
> +	  The unit of the TWI clock is kilo HZ. Please divide the clock 
> +	  by 1024 if you count it in HZ. The value should be less than 400.
> +

Well that's cute.  This patch causes an i386 `make allmodconfig' to spew
these:

    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 
    SDA is GPIO Number (BFIN_SDA) [] (NEW) 

out at about 1,000,000/sec, infinitely.

I'll put a `depends on BFIN' in there to shut it up, but I think you've
tickled a Kconfig bug.


      parent reply	other threads:[~2007-03-07  7:02 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-06  6:54 [PATCH -mm] Blackfin: blackfin i2c driver Wu, Bryan
2007-03-06  7:18 ` Andrew Morton
2007-03-07  5:17   ` Sonic Zhang
2007-03-07  6:06     ` Andrew Morton
2007-03-07  6:38       ` Wu, Bryan
2007-03-06 21:43 ` Alexey Dobriyan
2007-03-06 23:04   ` Mike Frysinger
2007-03-07  5:57   ` Wu, Bryan
2007-03-07  6:58     ` Jean Delvare
2007-03-07  7:14       ` Andrew Morton
2007-03-07  7:39         ` Wu, Bryan
2007-03-07  7:45           ` Andrew Morton
2007-03-08  3:57             ` trailing whitespace killing (Re: [PATCH -mm] Blackfin: blackfin i2c driver) Oleg Verych
2007-03-08  7:35             ` [PATCH -mm] Blackfin: blackfin i2c driver Jean Delvare
2007-03-07  9:53       ` Wu, Bryan
2007-03-08  9:27         ` Jean Delvare
2007-03-09  4:04           ` Sonic Zhang
2007-03-09  9:47             ` Jean Delvare
2007-03-07  7:02     ` Andrew Morton [this message]

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=20070306230215.0fab528b.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=adobriyan@gmail.com \
    --cc=bryan.wu@analog.com \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhfan@ustc.edu \
    --cc=sonic.adi@gmail.com \
    --cc=vapier.adi@gmail.com \
    --cc=zippel@linux-m68k.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.