Re: [PATCH v4 1/2] usb: host: ehci-sunplus: Add driver for ehci in Sunplus SP7021

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux