All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: bryan.wu@analog.com, 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 v2] Bitbanging i2c bus driver using the GPIO API
Date: Mon, 12 Mar 2007 16:11:09 +0100	[thread overview]
Message-ID: <20070312161109.749c6d69.khali@linux-fr.org> (raw)
In-Reply-To: <20070312155359.39020c80@dhcp-252-105.norway.atmel.com>

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 <hskinnemoen@atmel.com> 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 customer to choose these according their specific requirement. We
> > > use Kconfig to do this, but Jean and David don't like the idea, -:(  
> > 
> > Yeah, they need to be a bit more configurable than they currently are.
> > And I think it makes sense to pass them from the board setup code, since
> > this is where things depending on board-specific details (signal quality
> > issues, pullup resistor values, etc.) are supposed to go.
> 
> 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 parameter to the platform struct for  now.

No, it's not hardcoded. I know it looks confusing. struct i2c_adapter
has a timeout field, that's the one being set to 100 in i2c-algo-bit,
but i2c-algo-bit uses the i2c_algo_bit_data timeout field. The
i2c_adapter timeout field is unused.

This is clearly calling for a cleanup but I don't have time for this
right now.

-- 
Jean Delvare

  reply	other threads:[~2007-03-12 15:13 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
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 [this message]
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=20070312161109.749c6d69.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=hskinnemoen@atmel.com \
    --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 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.