From: Wolfram Sang <wsa@the-dreams.de>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
ben-linux@fluff.org, Jean Delvare <khali@linux-fr.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Christian Ruppert <christian.ruppert@abilis.com>
Subject: Re: [5/7] i2c-designware: enable/disable the controller properly
Date: Tue, 9 Apr 2013 11:09:14 +0200 [thread overview]
Message-ID: <20130409090914.GD28509@the-dreams.de> (raw)
In-Reply-To: <1363867800-23861-5-git-send-email-mika.westerberg@linux.intel.com>
> +static void __i2c_dw_enable(struct dw_i2c_dev *dev, bool enable)
> +{
> + int timeout = 100;
> +
> + do {
> + dw_writel(dev, enable, DW_IC_ENABLE);
> + if ((dw_readl(dev, DW_IC_ENABLE_STATUS) & 1) == enable)
> + return;
> +
> + usleep_range(25, 250);
This would wait 25ms max. Is there a timeout value specified in the docs?
> + } while (timeout-- > 0);
while (timeout--)?
next prev parent reply other threads:[~2013-04-09 9:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-21 12:09 [PATCH 1/7] i2c-designware: move to managed functions (devm_*) Mika Westerberg
2013-03-21 12:09 ` [PATCH 3/7] i2c-designware-pci: use managed functions pcim_* and devm_* Mika Westerberg
[not found] ` <1363867800-23861-3-git-send-email-mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-04-09 9:03 ` [3/7] " Wolfram Sang
2013-03-21 12:09 ` [PATCH 4/7] i2c-designware: use dynamic adapter numbering on Lynxpoint Mika Westerberg
[not found] ` <1363867800-23861-4-git-send-email-mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-04-09 9:06 ` [4/7] " Wolfram Sang
2013-04-09 9:23 ` Mika Westerberg
2013-04-09 9:29 ` Wolfram Sang
[not found] ` <20130409092923.GF3624-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2013-04-09 9:37 ` Mika Westerberg
2013-03-21 12:09 ` [PATCH 5/7] i2c-designware: enable/disable the controller properly Mika Westerberg
2013-04-09 9:09 ` Wolfram Sang [this message]
2013-04-09 9:28 ` [5/7] " Mika Westerberg
2013-04-09 9:28 ` Wolfram Sang
[not found] ` <20130409092857.GE3624-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2013-04-09 9:39 ` Mika Westerberg
2013-03-21 12:09 ` [PATCH 6/7] i2c-designware: use usleep_range() in the busy-loop Mika Westerberg
2013-03-21 12:10 ` [PATCH 7/7] i2c-designware: switch to use runtime PM autosuspend Mika Westerberg
[not found] ` <1363867800-23861-1-git-send-email-mika.westerberg-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2013-03-21 12:09 ` [PATCH 2/7] i2c-designware-pci: use dev_err() instead of printk() Mika Westerberg
2013-04-08 11:04 ` [PATCH 1/7] i2c-designware: move to managed functions (devm_*) Mika Westerberg
2013-04-09 9:00 ` [1/7] " Wolfram Sang
2013-04-09 9:22 ` Mika Westerberg
2013-04-09 9:20 ` Wolfram Sang
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=20130409090914.GD28509@the-dreams.de \
--to=wsa@the-dreams.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=ben-linux@fluff.org \
--cc=christian.ruppert@abilis.com \
--cc=khali@linux-fr.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.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;
as well as URLs for NNTP newsgroup(s).