public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Sowjanya Komatineni <skomatineni@nvidia.com>,
	thierry.reding@gmail.com, mkarthik@nvidia.com,
	smohammed@nvidia.com, talho@nvidia.com
Cc: linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-i2c@vger.kernel.org
Subject: Re: [PATCH V1] i2c: tegra: increase transfer timeout
Date: Fri, 18 Jan 2019 09:20:14 +0000	[thread overview]
Message-ID: <c6ba237c-d271-c9d7-1c30-9901ba6bb1a0@nvidia.com> (raw)
In-Reply-To: <1547757572-29075-1-git-send-email-skomatineni@nvidia.com>


On 17/01/2019 20:39, Sowjanya Komatineni wrote:
> increase transfer timeout to 10s to allow enough time during max
> transfer size.
> 
> Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
> ---
>  drivers/i2c/busses/i2c-tegra.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
> index e417ebf7628c..ca7c581fb4c0 100644
> --- a/drivers/i2c/busses/i2c-tegra.c
> +++ b/drivers/i2c/busses/i2c-tegra.c
> @@ -25,7 +25,7 @@
>  
>  #include <asm/unaligned.h>
>  
> -#define TEGRA_I2C_TIMEOUT (msecs_to_jiffies(1000))
> +#define TEGRA_I2C_TIMEOUT (msecs_to_jiffies(10000))
>  #define BYTES_PER_FIFO_WORD 4
>  
>  #define I2C_CNFG				0x000

Should the timeout be set depending on the max transfer size? 10s seems
an age if the max transfer size is 4KB. In other words, we should this
only be applied for T194+?

Furthermore, in tegra_i2c_xfer_msg() we know the len of the message and
so maybe it would be better to dynamically set the timeout depending on
length?

Cheers
Jon

-- 
nvpublic

  reply	other threads:[~2019-01-18  9:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-17 20:39 [PATCH V1] i2c: tegra: increase transfer timeout Sowjanya Komatineni
2019-01-18  9:20 ` Jon Hunter [this message]
2019-01-18 17:21   ` Sowjanya Komatineni
2019-01-21  9:38     ` Thierry Reding

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=c6ba237c-d271-c9d7-1c30-9901ba6bb1a0@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mkarthik@nvidia.com \
    --cc=skomatineni@nvidia.com \
    --cc=smohammed@nvidia.com \
    --cc=talho@nvidia.com \
    --cc=thierry.reding@gmail.com \
    /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