Re: [PATCH v1 3/9] usb: chipidea: Add support for Tegra20/30/114/124

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

 



On Wed, Jul 05, 2017 at 08:19:52PM +0300, Dmitry Osipenko wrote:
> +	/* setup and register ChipIdea HDRC device */
> +	udc->data.name = "tegra-udc";
> +	udc->data.capoffset = DEF_CAPOFFSET;
> +	udc->data.flags = 0;
> +	udc->data.usb_phy = udc->phy;
> +
> +	/* setup device specific quirks */
> +	soc = id->data;
> +
> +	if (!soc->supports_unaligned_dma)
> +		udc->data.flags |= CI_HDRC_REQUIRES_ALIGNED_DMA;
> +
> +	/* power on UDC controller */
> +	usb_phy_set_suspend(udc->phy, 0);

Why above is needed? The chipidea core will do usb_phy_init for power
on.

> +
> +	udc->dev = ci_hdrc_add_device(&pdev->dev, pdev->resource,
> +				      pdev->num_resources, &udc->data);
> +	if (IS_ERR(udc->dev)) {
> +		err = PTR_ERR(udc->dev);
> +		dev_err(&pdev->dev, "failed to add HDRC device: %d\n", err);
> +		goto power_off;
> +	}
> +
> +	platform_set_drvdata(pdev, udc);
> +
> +	return 0;
> +
> +power_off:
> +	usb_phy_set_suspend(udc->phy, 1);

[...]

> +static int tegra_udc_remove(struct platform_device *pdev)
> +{
> +	struct tegra_udc *udc = platform_get_drvdata(pdev);
> +
> +	usb_phy_set_suspend(udc->phy, 1);

[...]

-- 

Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux