linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manuel Lauss <manuel.lauss-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
To: Shubhrajyoti <shubhrajyoti-l0cyMroinI0@public.gmane.org>
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org
Subject: Re: Fwd: [PATCH 3/4] i2c/au1550: increase timeout limit
Date: Mon, 18 Jul 2011 13:12:09 +0200	[thread overview]
Message-ID: <CAOLZvyHy+GF+Aye6Ytw34dKx9zQs_-wXvrPwP-3AE-m3MPBZbA@mail.gmail.com> (raw)
In-Reply-To: <4E23FD8A.50600-l0cyMroinI0@public.gmane.org>

On Mon, Jul 18, 2011 at 11:31 AM, Shubhrajyoti <shubhrajyoti-l0cyMroinI0@public.gmane.org> wrote:
> Hi Manuel,
>>
>> From: *Manuel Lauss* <manuel.lauss-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
>> <mailto:manuel.lauss-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>>
>> Date: Thu, Jul 14, 2011 at 2:26 PM
>> Subject: [PATCH 3/4] i2c/au1550: increase timeout limit
>> To: Linux-I2C <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> <mailto:linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>>, Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org
>> <mailto:ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>>
>> Cc: Manuel Lauss <manuel.lauss-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
>> <mailto:manuel.lauss-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>>
>>
>>
>> The timeout waiting for various events to occur is tailored for
>> a module clock of 50MHz.  On the DB1300 board only 48MHz can be
>> supplied to the i2c module, which results in the timeout aborting
>> complex transfers to slaves slightly too early if they employ
>> for example clock stretching.
>>
>> With this change the WM8731 codec on the DB1300 board is correctly
>> detected and initialized.
>>
>> Signed-off-by: Manuel Lauss <manuel.lauss-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org
>> <mailto:manuel.lauss-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>>
>> ---
>>  drivers/i2c/busses/i2c-au1550.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/i2c/busses/i2c-au1550.c
>> b/drivers/i2c/busses/i2c-au1550.c
>> index 98ee11a..36d1b29 100644
>> --- a/drivers/i2c/busses/i2c-au1550.c
>> +++ b/drivers/i2c/busses/i2c-au1550.c
>> @@ -344,7 +344,7 @@ i2c_au1550_probe(struct platform_device *pdev)
>>               ret = -EIO;
>>               goto out_map;
>>       }
>> -       priv->xfer_timeout = 200;
>> +       priv->xfer_timeout = 400;
>
> What is the unit of the timeout. If it is in usec then how is it dependent
> on the clock
> supplied to the i2c module.
>
> Am I missing something.

It's used as a loop counter, with udelay()s in the various loops.
On the DB1300 board I observed that the function "wait_master_done()"
returns an error due to the loop counter reaching zero when accessing
the WM8731; an adm1025 hwmon actually works without this patch.
That timeout is more or less a safeguard against busy waiting forever
on various event bits.

Manuel

  parent reply	other threads:[~2011-07-18 11:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-14  8:56 [PATCH 0/4] i2c: i2c-au1550 updates Manuel Lauss
     [not found] ` <1310633815-18817-1-git-send-email-manuel.lauss-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2011-07-14  8:56   ` [PATCH 1/4] i2c/au1550: remove usage of volatile keyword Manuel Lauss
2011-07-14  8:56   ` [PATCH 2/4] i2c/au1550: remove unused ack_timeout Manuel Lauss
2011-07-14  8:56   ` [PATCH 3/4] i2c/au1550: increase timeout limit Manuel Lauss
     [not found]     ` <CAM=Q2csugEfNxLQ=byjqgWb4y34_AXqJJJay_kP6dfTHLUZTeA@mail.gmail.com>
     [not found]       ` <CAM=Q2csugEfNxLQ=byjqgWb4y34_AXqJJJay_kP6dfTHLUZTeA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-07-18  9:31         ` Fwd: " Shubhrajyoti
     [not found]           ` <4E23FD8A.50600-l0cyMroinI0@public.gmane.org>
2011-07-18 11:12             ` Manuel Lauss [this message]
2011-07-14  8:56   ` [PATCH 4/4] i2c/au1550: dev_pm_ops conversion Manuel Lauss

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=CAOLZvyHy+GF+Aye6Ytw34dKx9zQs_-wXvrPwP-3AE-m3MPBZbA@mail.gmail.com \
    --to=manuel.lauss-gm/ye1e23mwn+bqq9rbeug@public.gmane.org \
    --cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
    --cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=shubhrajyoti-l0cyMroinI0@public.gmane.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).