linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Jan Glauber <jglauber@cavium.com>
Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
	David Daney <ddaney@caviumnetworks.com>
Subject: Re: [PATCH v4 03/14] i2c-octeon: Change adapter timeout and retry default values
Date: Wed, 23 Mar 2016 20:55:18 +0100	[thread overview]
Message-ID: <20160323195517.GE19849@katana> (raw)
In-Reply-To: <dd3af500365eeeac662a097441259e90a0d3e303.1458289385.git.jglauber@cavium.com>

[-- Attachment #1: Type: text/plain, Size: 1334 bytes --]

On Fri, Mar 18, 2016 at 09:46:28AM +0100, Jan Glauber wrote:
> Convert the adapter timeout to 2 ms instead of a fixed number of
> jiffies and set retries to 10.

You describe what you change, but not why this is needed. Why 10
retries? And shouldn't that be 20ms seeing the HZ/50 ?

Also, please use "i2c: octeon: " as prefix in the subject.

Thanks,

   Wolfram

> 
> Signed-off-by: Jan Glauber <jglauber@cavium.com>
> ---
>  drivers/i2c/busses/i2c-octeon.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-octeon.c b/drivers/i2c/busses/i2c-octeon.c
> index 9240037..e616e4c 100644
> --- a/drivers/i2c/busses/i2c-octeon.c
> +++ b/drivers/i2c/busses/i2c-octeon.c
> @@ -414,7 +414,6 @@ static struct i2c_adapter octeon_i2c_ops = {
>  	.owner = THIS_MODULE,
>  	.name = "OCTEON adapter",
>  	.algo = &octeon_i2c_algo,
> -	.timeout = HZ / 50,
>  };
>  
>  /* calculate and set clock divisors */
> @@ -541,6 +540,8 @@ static int octeon_i2c_probe(struct platform_device *pdev)
>  	octeon_i2c_set_clock(i2c);
>  
>  	i2c->adap = octeon_i2c_ops;
> +	i2c->adap.timeout = msecs_to_jiffies(2);
> +	i2c->adap.retries = 10;
>  	i2c->adap.dev.parent = &pdev->dev;
>  	i2c->adap.dev.of_node = node;
>  	i2c_set_adapdata(&i2c->adap, i2c);
> -- 
> 1.9.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-03-23 19:55 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-18  8:46 [PATCH v4 00/14] i2c-octeon and i2c-thunderx drivers Jan Glauber
2016-03-18  8:46 ` [PATCH v4 01/14] i2c-octeon: Cleanup i2c-octeon driver Jan Glauber
2016-03-23 19:51   ` Wolfram Sang
2016-03-18  8:46 ` [PATCH v4 02/14] i2c-octeon: Cleanup resource allocation code Jan Glauber
2016-03-23 19:52   ` Wolfram Sang
2016-03-18  8:46 ` [PATCH v4 03/14] i2c-octeon: Change adapter timeout and retry default values Jan Glauber
2016-03-23 19:55   ` Wolfram Sang [this message]
2016-03-31 10:13     ` Jan Glauber
2016-03-18  8:46 ` [PATCH v4 04/14] i2c-octeon: Support I2C_M_RECV_LEN Jan Glauber
2016-03-23 19:52   ` Wolfram Sang
2016-03-18  8:46 ` [PATCH v4 05/14] i2c-octeon: Enable high-level controller and improve on bus contention Jan Glauber
2016-03-23 20:32   ` Wolfram Sang
2016-03-31 10:24     ` Jan Glauber
2016-03-18  8:46 ` [PATCH v4 06/14] dt-bindings: i2c: Add Octeon cn78xx TWSI Jan Glauber
2016-03-18  8:46 ` [PATCH v4 07/14] i2c-octeon: Add support for cn78xx chips Jan Glauber
2016-03-18  8:46 ` [PATCH v4 08/14] i2c-octeon: Flush TWSI writes with readback Jan Glauber
2016-03-18  8:46 ` [PATCH v4 09/14] i2c-octeon: Faster operation when IFLG signals late Jan Glauber
2016-03-18  8:46 ` [PATCH v4 10/14] i2c-octeon: Add workaround for broken irqs on CN3860 Jan Glauber
2016-03-18  8:46 ` [PATCH v4 11/14] i2c-octeon: Rename driver to prepare for split Jan Glauber
2016-03-18 17:11   ` David Daney
2016-03-18  8:46 ` [PATCH v4 12/14] i2c-octeon: Split the driver into two parts Jan Glauber
2016-03-18  8:46 ` [PATCH v4 13/14] i2c-thunderx: Add i2c driver for ThunderX SOC Jan Glauber
2016-03-18  8:46 ` [PATCH v4 14/14] i2c-thunderx: Add smbus alert support Jan Glauber

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=20160323195517.GE19849@katana \
    --to=wsa@the-dreams.de \
    --cc=ddaney@caviumnetworks.com \
    --cc=jglauber@cavium.com \
    --cc=linux-i2c@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).