linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: srinidhi.kasagar@stericsson.com (Srinidhi Kasagar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/1] i2c: Add default configuration into the Nomadik I2C driver
Date: Mon, 6 Aug 2012 17:13:51 +0530	[thread overview]
Message-ID: <20120806114351.GA10412@bnru02> (raw)
In-Reply-To: <20120806102151.GB16996@gmail.com>

On Mon, Aug 06, 2012 at 12:21:52 +0200, Lee Jones wrote:
> From: Lee Jones <lee.jones@linaro.org>
> Date: Mon, 6 Aug 2012 11:04:14 +0100
> Subject: [PATCH 1/1] i2c: Add default configuration into the Nomadik I2C
>  driver.
> 
> At this moment in time there is only one known configuration for the
> Nomadik I2C driver. By not holding that configuration in the driver
> adds some unnecessary overhead in platform code. The configuration
> as already been removed from platform code, this patch checks for any
> over-riding configurations. If there aren't any, the default is used.
> 
> Cc: linux-i2c at vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/i2c/busses/i2c-nomadik.c |   24 ++++++++++++++++++------
>  1 file changed, 18 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-nomadik.c b/drivers/i2c/busses/i2c-nomadik.c
> index a92440d..86aa73d 100644
> --- a/drivers/i2c/busses/i2c-nomadik.c
> +++ b/drivers/i2c/busses/i2c-nomadik.c
> @@ -333,10 +333,6 @@ static void setup_i2c_controller(struct nmk_i2c_dev *dev)
>  
>  	i2c_clk = clk_get_rate(dev->clk);
>  
> -	/* fallback to std. mode if machine has not provided it */
> -	if (dev->cfg.clk_freq == 0)
> -		dev->cfg.clk_freq = 100000;
> -
>  	/*
>  	 * The spec says, in case of std. mode the divider is
>  	 * 2 whereas it is 3 for fast and fastplus mode of
> @@ -899,15 +895,31 @@ static const struct i2c_algorithm nmk_i2c_algo = {
>  	.functionality	= nmk_i2c_functionality
>  };
>  
> +static struct nmk_i2c_controller u8500_i2c = {
> +	/*
> +	 * Slave data setup time; 250ns, 100ns, and 10ns, which
> +	 * is 14, 6 and 2 respectively for a 48Mhz i2c clock.
> +	 */
> +	.slsu           = 0xe,
> +	.tft            = 1,      /* Tx FIFO threshold */
> +	.rft            = 8,      /* Rx FIFO threshold */
> +	.clk_freq       = 400000, /* std. mode operation */
"Fast mode operation" in comment, or use your favorite "upto" keyword.

Otherwise it is Acked-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com>

/srinidhi

  parent reply	other threads:[~2012-08-06 11:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-06  8:52 [PATCH] ARM: ux500: resurrect I2C platform data Linus Walleij
2012-08-06  9:51 ` Lee Jones
2012-08-06 11:37   ` Linus Walleij
2012-08-06 10:21 ` [PATCH 1/1] i2c: Add default configuration into the Nomadik I2C driver Lee Jones
2012-08-06 11:23   ` Linus Walleij
2012-08-06 11:43   ` Srinidhi Kasagar [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-08-06 12:25 Lee Jones
2012-08-06 14:00 ` Linus Walleij
2012-08-06 14:11   ` Lee Jones
2012-08-06 15:18   ` Lee Jones
2012-08-06 15:17 Lee Jones

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=20120806114351.GA10412@bnru02 \
    --to=srinidhi.kasagar@stericsson.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).