Linux USB
 help / color / mirror / Atom feed
From: "Ramuthevar, Vadivel MuruganX"  <vadivel.muruganx.ramuthevar@linux.intel.com>
To: Philipp Zabel <p.zabel@pengutronix.de>,
	linux-kernel@vger.kernel.org, balbi@kernel.org
Cc: gregkh@linuxfoundation.org, robh@kernel.org,
	devicetree@vger.kernel.org, linux-usb@vger.kernel.org,
	cheol.yong.kim@intel.com, qi-ming.wu@intel.com,
	yin1.li@intel.com, andriy.shevchenko@intel.com
Subject: Re: [PATCH v1 2/2] usb: phy: Add USB3 PHY support for Intel LGM SoC
Date: Wed, 10 Jun 2020 09:06:40 +0800	[thread overview]
Message-ID: <1ecf98d8-25f5-8f2b-1b6b-8d6f8f758761@linux.intel.com> (raw)
In-Reply-To: <d2f30dbde89050e428b61092a1e5bbcf8d257129.camel@pengutronix.de>

Hi Philipp,

Thank you very much for review comments and your time...

On 9/6/2020 8:14 pm, Philipp Zabel wrote:
>> +
>> +	for (i = 0; i < ARRAY_SIZE(CTL_RESETS); i++) {
>> +		resets[i] = devm_reset_control_get(dev, CTL_RESETS[i]);
> Please use devm_reset_control_get_exclusive() instead.
Noted, will use it.
> 
>> +		if (IS_ERR(resets[i])) {
>> +			dev_err(dev, "%s reset not found\n", CTL_RESETS[i]);
>> +			return PTR_ERR(resets[i]);
>> +		}
>> +		reset_control_assert(resets[i]);
>> +	}
> You should request all reset controls first, and only then start
> asserting / deasserting, otherwise you may end up with partially
> asserted resets in case a later reset control is not found.
Agreed!, re-write the assert/de-assert logic as you have suggested.
> 
>> +
>> +	for (i = 0; i < ARRAY_SIZE(PHY_RESETS); i++) {
>> +		ta->resets[i] = devm_reset_control_get(dev, PHY_RESETS[i]);
> Same as above.
> 
>> +		if (IS_ERR(ta->resets[i])) {
>> +			dev_err(dev, "%s reset not found\n", PHY_RESETS[i]);
>> +			return PTR_ERR(ta->resets[i]);
>> +		}
>> +		reset_control_assert(ta->resets[i]);
>> +	}
>> +
>> +	for (i = 0; i < ARRAY_SIZE(CTL_RESETS); i++)
>> +		reset_control_deassert(resets[i]);
>> +	/* Need to wait at least 20us before de-assert the PHY */
>> +	usleep_range(20, 100);
> This waits 20us after de-asserting the reset, not before. Is this in the
> correct place?
yes, you are right, it's in wrong place, Thanks!

Regards
Vadivel
> 

  reply	other threads:[~2020-06-10  1:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-09 11:08 [PATCH v1 0/2] usb : phy: Add USB PHY support on Intel LGM SoC Ramuthevar,Vadivel MuruganX
2020-06-09 11:08 ` [PATCH v1 1/2] dt-bindings: usb: Add USB PHY support for " Ramuthevar,Vadivel MuruganX
2020-06-09 11:08 ` [PATCH v1 2/2] usb: phy: Add USB3 " Ramuthevar,Vadivel MuruganX
2020-06-09 12:14   ` Philipp Zabel
2020-06-10  1:06     ` Ramuthevar, Vadivel MuruganX [this message]
2020-06-10  2:11     ` Ramuthevar, Vadivel MuruganX
2020-06-09 13:11   ` kernel test robot
2020-06-09 17:10   ` kernel test robot

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=1ecf98d8-25f5-8f2b-1b6b-8d6f8f758761@linux.intel.com \
    --to=vadivel.muruganx.ramuthevar@linux.intel.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=balbi@kernel.org \
    --cc=cheol.yong.kim@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=qi-ming.wu@intel.com \
    --cc=robh@kernel.org \
    --cc=yin1.li@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