All of lore.kernel.org
 help / color / mirror / Atom feed
From: george.cherian@ti.com (George Cherian)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] usb: dwc3: Add Keystone specific glue layer
Date: Wed, 27 Nov 2013 14:49:54 +0530	[thread overview]
Message-ID: <5295B93A.3040400@ti.com> (raw)
In-Reply-To: <1385410581-12148-2-git-send-email-w-kwok2@ti.com>

On 11/26/2013 1:46 AM, WingMan Kwok wrote:
> Add Keystone platform specific glue layer to support
> USB3 Host mode.
>
> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Cc: Felipe Balbi <balbi@ti.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
> ---
>   drivers/usb/dwc3/Kconfig         |    7 +
>   drivers/usb/dwc3/Makefile        |    1 +
>   drivers/usb/dwc3/dwc3-keystone.c |  272 ++++++++++++++++++++++++++++++++++++++
>   3 files changed, 280 insertions(+)
>   create mode 100644 drivers/usb/dwc3/dwc3-keystone.c

<snip>
> +	error = of_platform_populate(node, NULL, NULL, dev);
> +	if (error) {
> +		dev_err(&pdev->dev, "failed to create dwc3 core\n");
> +		goto err_core;
> +	}
> +
> +	return 0;
> +
> +err_core:
> +	kdwc3_disable_irqs(kdwc);
> +err_irq:
> +	kdwc3_disable(kdwc);
> +
> +	return error;
> +}
> +
> +static int kdwc3_remove(struct platform_device *pdev)
> +{
> +	struct dwc3_keystone *kdwc = platform_get_drvdata(pdev);
> +
> +	if (kdwc) {
> +		kdwc3_disable_irqs(kdwc);
> +		kdwc3_disable(kdwc);
> +		platform_set_drvdata(pdev, NULL);
> +	}
> +	return 0;
> +}
> +

You need to unregister the child nodes in remove.
Also why can't the dwc3-omap driver be reused, Felipe??
I believe the TI wrapper for Keystone is similar to that of AM437x or 
OMAP5.
> +static const struct of_device_id kdwc3_of_match[] = {
> +	{ .compatible = "ti,keystone-dwc3", },
> +	{},
> +};
> +MODULE_DEVICE_TABLE(of, kdwc3_of_match);
> +
> +static struct platform_driver kdwc3_driver = {
> +	.probe		= kdwc3_probe,
> +	.remove		= kdwc3_remove,
> +	.driver		= {
> +		.name	= "keystone-dwc3",
> +		.owner	        = THIS_MODULE,
> +		.of_match_table	= kdwc3_of_match,
> +	},
> +};
> +
> +module_platform_driver(kdwc3_driver);
> +
> +MODULE_ALIAS("platform:keystone-dwc3");
> +MODULE_AUTHOR("WingMan Kwok <w-kwok2@ti.com>");
> +MODULE_LICENSE("GPL v2");
> +MODULE_DESCRIPTION("DesignWare USB3 KEYSTONE Glue Layer");


-- 
-George

  parent reply	other threads:[~2013-11-27  9:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-25 20:16 [PATCH 0/3] Kesytone II USB support WingMan Kwok
2013-11-25 20:16 ` [PATCH 1/3] usb: dwc3: Add Keystone specific glue layer WingMan Kwok
2013-11-25 20:39   ` Felipe Balbi
2013-11-26  0:49     ` Santosh Shilimkar
2013-11-26 17:16       ` Felipe Balbi
2013-11-26 18:21         ` Santosh Shilimkar
2013-11-27  9:19   ` George Cherian [this message]
2013-11-27 17:41     ` Felipe Balbi
2013-11-27 18:32       ` Santosh Shilimkar
2013-11-27 19:39         ` Felipe Balbi
2013-11-25 20:16 ` [PATCH 2/3] ARM: dts: keystone: Add usb devicetree bindings WingMan Kwok
2013-11-25 20:42   ` Felipe Balbi
2013-11-25 21:04     ` Santosh Shilimkar
2013-11-25 21:06       ` Felipe Balbi
2013-11-27  9:59   ` George Cherian
2013-11-27 20:24     ` Santosh Shilimkar
2013-11-25 20:16 ` [PATCH 3/3] ARM: keystone: defconfig: enable USB host mode support WingMan Kwok
2013-11-25 20:43   ` Felipe Balbi

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=5295B93A.3040400@ti.com \
    --to=george.cherian@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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.