From: mkl@pengutronix.de (Marc Kleine-Budde)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 12/14] usb: chipidea: permit driver bindings pass phy pointer
Date: Thu, 21 Jun 2012 09:18:22 +0200 [thread overview]
Message-ID: <4FE2CABE.7050708@pengutronix.de> (raw)
In-Reply-To: <1340260875-21934-13-git-send-email-richard.zhao@freescale.com>
On 06/21/2012 08:41 AM, Richard Zhao wrote:
> Sometimes, the driver bindings may know what phy they use.
> For example, when using device tree, the usb controller may have a
> phandler pointing to usb phy.
>
> Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
> Reviewed-by: Marek Vasut <marex@denx.de>
> Acked-by: Felipe Balbi <balbi@ti.com>
> Tested-by: Subodh Nijsure <snijsure@grid-net.com>
[...]
> --- a/drivers/usb/chipidea/udc.c
> +++ b/drivers/usb/chipidea/udc.c
> @@ -1684,7 +1684,8 @@ static int udc_start(struct ci13xxx *ci)
>
> ci->gadget.ep0 = &ci->ep0in->ep;
>
> - ci->transceiver = usb_get_transceiver();
> + if (ci->global_phy) {
^^^
This doesn't compile, closing curly brackets are missing.
> + ci->transceiver = usb_get_transceiver();
>
> if (ci->platdata->flags & CI13XXX_REQUIRE_TRANSCEIVER) {
> if (ci->transceiver == NULL) {
> @@ -1728,7 +1729,8 @@ static int udc_start(struct ci13xxx *ci)
> remove_trans:
> if (ci->transceiver) {
> otg_set_peripheral(ci->transceiver->otg, &ci->gadget);
> - usb_put_transceiver(ci->transceiver);
> + if (ci->global_phy)
> + usb_put_transceiver(ci->transceiver);
> }
>
> dev_err(dev, "error = %i\n", retval);
> @@ -1737,7 +1739,7 @@ remove_dbg:
> unreg_device:
> device_unregister(&ci->gadget.dev);
> put_transceiver:
> - if (ci->transceiver)
> + if (ci->transceiver && ci->global_phy)
> usb_put_transceiver(ci->transceiver);
> free_pools:
> dma_pool_destroy(ci->td_pool);
> @@ -1771,7 +1773,8 @@ static void udc_stop(struct ci13xxx *ci)
>
> if (ci->transceiver) {
> otg_set_peripheral(ci->transceiver->otg, NULL);
> - usb_put_transceiver(ci->transceiver);
> + if (ci->global_phy)
> + usb_put_transceiver(ci->transceiver);
> }
> dbg_remove_files(&ci->gadget.dev);
> device_unregister(&ci->gadget.dev);
> diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h
> index be078f0..544825d 100644
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120621/92e518aa/attachment.sig>
WARNING: multiple messages have this Message-ID (diff)
From: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
B29397-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
B20596-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
marex-ynQEQJNshbs@public.gmane.org,
shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org,
alexander.shishkin-VuQAYsv1563Yd54FQh9/CA@public.gmane.org,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
dong.aisheng-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org,
linuxzsc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
balbi-l0cyMroinI0@public.gmane.org
Subject: Re: [PATCH v6 12/14] usb: chipidea: permit driver bindings pass phy pointer
Date: Thu, 21 Jun 2012 09:18:22 +0200 [thread overview]
Message-ID: <4FE2CABE.7050708@pengutronix.de> (raw)
In-Reply-To: <1340260875-21934-13-git-send-email-richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2400 bytes --]
On 06/21/2012 08:41 AM, Richard Zhao wrote:
> Sometimes, the driver bindings may know what phy they use.
> For example, when using device tree, the usb controller may have a
> phandler pointing to usb phy.
>
> Signed-off-by: Richard Zhao <richard.zhao-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> Reviewed-by: Marek Vasut <marex-ynQEQJNshbs@public.gmane.org>
> Acked-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
> Tested-by: Subodh Nijsure <snijsure-4jo+YWezP1RWk0Htik3J/w@public.gmane.org>
[...]
> --- a/drivers/usb/chipidea/udc.c
> +++ b/drivers/usb/chipidea/udc.c
> @@ -1684,7 +1684,8 @@ static int udc_start(struct ci13xxx *ci)
>
> ci->gadget.ep0 = &ci->ep0in->ep;
>
> - ci->transceiver = usb_get_transceiver();
> + if (ci->global_phy) {
^^^
This doesn't compile, closing curly brackets are missing.
> + ci->transceiver = usb_get_transceiver();
>
> if (ci->platdata->flags & CI13XXX_REQUIRE_TRANSCEIVER) {
> if (ci->transceiver == NULL) {
> @@ -1728,7 +1729,8 @@ static int udc_start(struct ci13xxx *ci)
> remove_trans:
> if (ci->transceiver) {
> otg_set_peripheral(ci->transceiver->otg, &ci->gadget);
> - usb_put_transceiver(ci->transceiver);
> + if (ci->global_phy)
> + usb_put_transceiver(ci->transceiver);
> }
>
> dev_err(dev, "error = %i\n", retval);
> @@ -1737,7 +1739,7 @@ remove_dbg:
> unreg_device:
> device_unregister(&ci->gadget.dev);
> put_transceiver:
> - if (ci->transceiver)
> + if (ci->transceiver && ci->global_phy)
> usb_put_transceiver(ci->transceiver);
> free_pools:
> dma_pool_destroy(ci->td_pool);
> @@ -1771,7 +1773,8 @@ static void udc_stop(struct ci13xxx *ci)
>
> if (ci->transceiver) {
> otg_set_peripheral(ci->transceiver->otg, NULL);
> - usb_put_transceiver(ci->transceiver);
> + if (ci->global_phy)
> + usb_put_transceiver(ci->transceiver);
> }
> dbg_remove_files(&ci->gadget.dev);
> device_unregister(&ci->gadget.dev);
> diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h
> index be078f0..544825d 100644
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
next prev parent reply other threads:[~2012-06-21 7:18 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-21 6:41 [PATCH v6 00/14] add imx usb driver based on Greg next tree Richard Zhao
2012-06-21 6:41 ` Richard Zhao
2012-06-21 6:41 ` [PATCH v6 01/14] usb: chipidea: remove unneeded NULL check Richard Zhao
2012-06-21 6:41 ` Richard Zhao
2012-06-21 6:41 ` [PATCH v6 02/14] usb: chipidea: drop useless arch-check Richard Zhao
2012-06-21 6:41 ` Richard Zhao
2012-06-21 6:41 ` [PATCH v6 03/14] usb: chipidea: msm: add missing section annotation Richard Zhao
2012-06-21 6:41 ` Richard Zhao
2012-06-21 6:41 ` [PATCH v6 04/14] usb: chipidea: msm: add remove method Richard Zhao
2012-06-21 6:41 ` Richard Zhao
2012-06-21 6:41 ` [PATCH v6 05/14] USB: Chipidea: rename struct ci13xxx_udc_driver to struct ci13xxx_platform_data Richard Zhao
2012-06-21 6:41 ` Richard Zhao
2012-06-21 6:41 ` [PATCH v6 06/14] USB: Chipidea: rename struct ci13xxx variables from udc to ci Richard Zhao
2012-06-21 6:41 ` Richard Zhao
2012-06-21 6:41 ` [PATCH v6 07/14] USB: Chipidea: add unified ci13xxx_{add, remove}_device for platform drivers Richard Zhao
2012-06-21 6:41 ` [PATCH v6 07/14] USB: Chipidea: add unified ci13xxx_{add,remove}_device " Richard Zhao
2012-06-25 3:08 ` Richard Zhao
2012-06-25 3:08 ` Richard Zhao
2012-06-21 6:41 ` [PATCH v6 08/14] USB: Chipidea: add ci13xxx device id management Richard Zhao
2012-06-21 6:41 ` Richard Zhao
2012-06-21 6:41 ` [PATCH v6 09/14] usb: chipidea: select USB_EHCI_ROOT_HUB_TT in USB_CHIPIDEA_HOST of Kconfig Richard Zhao
2012-06-21 6:41 ` Richard Zhao
2012-06-21 6:41 ` [PATCH v6 10/14] usb: otg: add notify_connect/notify_disconnect callback Richard Zhao
2012-06-21 6:41 ` Richard Zhao
2012-06-21 6:41 ` [PATCH v6 11/14] USB: notify phy when root hub port connect change Richard Zhao
2012-06-21 6:41 ` Richard Zhao
2012-06-21 6:41 ` [PATCH v6 12/14] usb: chipidea: permit driver bindings pass phy pointer Richard Zhao
2012-06-21 6:41 ` Richard Zhao
2012-06-21 7:18 ` Marc Kleine-Budde [this message]
2012-06-21 7:18 ` Marc Kleine-Budde
2012-06-21 8:38 ` Richard Zhao
2012-06-21 8:38 ` Richard Zhao
2012-06-21 8:51 ` [PATCH v7] " Richard Zhao
2012-06-21 8:51 ` Richard Zhao
2012-06-21 20:42 ` Marc Kleine-Budde
2012-06-21 20:42 ` Marc Kleine-Budde
2012-06-25 3:07 ` Richard Zhao
2012-06-25 3:07 ` Richard Zhao
2012-06-21 6:41 ` [PATCH v6 13/14] usb: otg: add basic mxs phy driver support Richard Zhao
2012-06-21 6:41 ` Richard Zhao
2012-06-26 9:15 ` Alexander Shishkin
2012-06-26 9:15 ` Alexander Shishkin
2012-06-27 6:47 ` Richard Zhao
2012-06-27 6:47 ` Richard Zhao
2012-06-21 6:41 ` [PATCH v6 14/14] usb: chipidea: add imx platform driver Richard Zhao
2012-06-21 6:41 ` Richard Zhao
2012-06-21 15:23 ` Richard Zhao
2012-06-21 15:23 ` Richard Zhao
2012-06-21 7:24 ` [PATCH v6 00/14] add imx usb driver based on Greg next tree Marc Kleine-Budde
2012-06-21 7:24 ` Marc Kleine-Budde
2012-06-21 8:52 ` Richard Zhao
2012-06-21 8:52 ` Richard Zhao
2012-06-21 9:10 ` Marc Kleine-Budde
2012-06-21 9:10 ` Marc Kleine-Budde
2012-06-25 3:00 ` Richard Zhao
2012-06-25 3:00 ` Richard Zhao
2012-06-25 16:18 ` Fabio Estevam
2012-06-25 16:18 ` Fabio Estevam
2012-06-26 2:37 ` Shawn Guo
2012-06-26 2:37 ` Shawn Guo
2012-06-26 12:25 ` Marek Vasut
2012-06-26 12:25 ` Marek Vasut
2012-07-30 22:27 ` Fabio Estevam
2012-07-30 22:27 ` Fabio Estevam
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=4FE2CABE.7050708@pengutronix.de \
--to=mkl@pengutronix.de \
--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.