devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Vincent Shih <vincent.sunplus@gmail.com>,
	gregkh@linuxfoundation.org, stern@rowland.harvard.edu,
	davem@davemloft.net, vladimir.oltean@nxp.com,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	devicetree@vger.kernel.org, wells.lu@sunplus.com
Subject: Re: [PATCH v4 1/2] usb: host: ehci-sunplus: Add driver for ehci in Sunplus SP7021
Date: Fri, 29 Apr 2022 14:07:08 +0200	[thread overview]
Message-ID: <6776293c80bf3f48d7a72a3c9f73e93abee2b369.camel@pengutronix.de> (raw)
In-Reply-To: <1651220876-26705-2-git-send-email-vincent.sunplus@gmail.com>

Hi Vincent,

On Fr, 2022-04-29 at 16:27 +0800, Vincent Shih wrote:
[...]
> +static int sp_ehci_platform_power_on(struct platform_device *pdev)
> +{
> +	struct usb_hcd *hcd = platform_get_drvdata(pdev);
> +	struct sp_ehci_priv *sp_priv = hcd_to_sp_ehci_priv(hcd);
> +	int ret;
> +
> +	ret = clk_prepare_enable(sp_priv->ehci_clk);
> +	if (ret)
> +		goto err_ehci_clk;

This should be:

		return ret;

> +
> +	ret = reset_control_deassert(sp_priv->ehci_rstc);
> +	if (ret)
> +		goto err_ehci_reset;

And this should be:

		goto err_ehci_clk;

> +
> +	ret = phy_init(sp_priv->phy);
> +	if (ret)
> +		goto err_ehci_reset;
> +
> +	ret = phy_power_on(sp_priv->phy);
> +	if (ret)
> +		goto err_phy_exit;
> +
> +	return 0;
> +
> +err_phy_exit:
> +	phy_exit(sp_priv->phy);
> +err_ehci_reset:
> +	reset_control_assert(sp_priv->ehci_rstc);
> +err_ehci_clk:
> +	clk_disable_unprepare(sp_priv->ehci_clk);
> +
> +	return ret;
> +}
> +
> +static void sp_ehci_platform_power_off(struct platform_device *pdev)
> +{
> +	struct usb_hcd *hcd = platform_get_drvdata(pdev);
> +	struct sp_ehci_priv *sp_priv = hcd_to_sp_ehci_priv(hcd);
> +
> +	phy_power_off(sp_priv->phy);
> +	phy_exit(sp_priv->phy);
> +
> +	reset_control_assert(sp_priv->ehci_rstc);
> +	clk_disable_unprepare(sp_priv->ehci_clk);
> +}
> +
> +static struct usb_ehci_pdata usb_ehci_pdata = {
> +	.has_tt = 1,
> +	.has_synopsys_hc_bug = 1,
> +	.big_endian_desc = 1,
> +	.big_endian_mmio = 1,
> +	.power_on = sp_ehci_platform_power_on,
> +	.power_suspend = sp_ehci_platform_power_off,
> +	.power_off = sp_ehci_platform_power_off,
> +

Superfluous whitespace.


regards
Philipp

  reply	other threads:[~2022-04-29 12:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29  8:27 [PATCH v4 0/2] Add driver for EHCI in Sunplus SP7021 Vincent Shih
2022-04-29  8:27 ` [PATCH v4 1/2] usb: host: ehci-sunplus: Add driver for ehci " Vincent Shih
2022-04-29 12:07   ` Philipp Zabel [this message]
2022-04-29 15:37   ` Alan Stern
2022-04-30  1:26   ` Alan Stern
2022-04-29  8:27 ` [PATCH v4 2/2] dt-bindings: usb: Add bindings doc for Sunplus EHCI driver Vincent Shih
2022-04-29 20:53   ` Krzysztof Kozlowski

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=6776293c80bf3f48d7a72a3c9f73e93abee2b369.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=vincent.sunplus@gmail.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=wells.lu@sunplus.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).