All of lore.kernel.org
 help / color / mirror / Atom feed
From: wwang <wei_wang@realsil.com.cn>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: cjb@laptop.org, sameo@linux.intel.com,
	gregkh@linuxfoundation.org, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org, rogerable@realtek.com,
	devel@linuxdriverproject.org
Subject: Re: [PATCH] mfd:rtsx: Support RTS5249
Date: Mon, 25 Mar 2013 14:23:45 +0800	[thread overview]
Message-ID: <514FED71.8020307@realsil.com.cn> (raw)
In-Reply-To: <20130325060038.GD9138@mwanda>

于 2013年03月25日 14:00, Dan Carpenter 写道:
> On Mon, Mar 25, 2013 at 10:13:56AM +0800, wei_wang@realsil.com.cn wrote:
>> +static int rts5249_optimize_phy(struct rtsx_pcr *pcr)
>> +{
>> +	int err;
>> +
>> +	err = rtsx_pci_write_phy_register(pcr, 0x19, 0xFE46);
>> +	if (err < 0)
>> +		return err;
>> +
>> +	mdelay(1);
> Why do we have the mdelay() and the later msleep(5)?
> rtsx_pci_write_phy_register() busy loops until the write succeeds or
> it returns -ETIMEOUT.  The extra wait here seems unnecessary.
>
> regards,
> dan carpenter
>
>
> .
>   

Hi,

The busy loops in rtsx_pci_write_phy_register only tell us that the 
write sequence succeeds. The device still needs to wait for a while 
until the internal signal stable. Or else the timing won't fit the 
requirement.
All of the delays in the driver are necessary.

BR,
Wei

WARNING: multiple messages have this Message-ID (diff)
From: wwang <wei_wang@realsil.com.cn>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: <cjb@laptop.org>, <sameo@linux.intel.com>,
	<gregkh@linuxfoundation.org>, <linux-mmc@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <rogerable@realtek.com>,
	<devel@linuxdriverproject.org>
Subject: Re: [PATCH] mfd:rtsx: Support RTS5249
Date: Mon, 25 Mar 2013 14:23:45 +0800	[thread overview]
Message-ID: <514FED71.8020307@realsil.com.cn> (raw)
In-Reply-To: <20130325060038.GD9138@mwanda>

于 2013年03月25日 14:00, Dan Carpenter 写道:
> On Mon, Mar 25, 2013 at 10:13:56AM +0800, wei_wang@realsil.com.cn wrote:
>> +static int rts5249_optimize_phy(struct rtsx_pcr *pcr)
>> +{
>> +	int err;
>> +
>> +	err = rtsx_pci_write_phy_register(pcr, 0x19, 0xFE46);
>> +	if (err < 0)
>> +		return err;
>> +
>> +	mdelay(1);
> Why do we have the mdelay() and the later msleep(5)?
> rtsx_pci_write_phy_register() busy loops until the write succeeds or
> it returns -ETIMEOUT.  The extra wait here seems unnecessary.
>
> regards,
> dan carpenter
>
>
> .
>   

Hi,

The busy loops in rtsx_pci_write_phy_register only tell us that the 
write sequence succeeds. The device still needs to wait for a while 
until the internal signal stable. Or else the timing won't fit the 
requirement.
All of the delays in the driver are necessary.

BR,
Wei

  reply	other threads:[~2013-03-25  6:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-25  2:13 [PATCH] mfd:rtsx: Support RTS5249 wei_wang
2013-03-25  2:13 ` wei_wang
2013-03-25  6:00 ` Dan Carpenter
2013-03-25  6:23   ` wwang [this message]
2013-03-25  6:23     ` wwang
2013-03-25  6:29     ` Dan Carpenter
2013-04-09  9:49 ` Samuel Ortiz

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=514FED71.8020307@realsil.com.cn \
    --to=wei_wang@realsil.com.cn \
    --cc=cjb@laptop.org \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=rogerable@realtek.com \
    --cc=sameo@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.