linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: s.hauer@pengutronix.de (Sascha Hauer)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 2/7] usb: chipidea: add otg file
Date: Thu, 27 Dec 2012 11:47:58 +0100	[thread overview]
Message-ID: <20121227104758.GV26326@pengutronix.de> (raw)
In-Reply-To: <1356591603-23323-3-git-send-email-peter.chen@freescale.com>

On Thu, Dec 27, 2012 at 02:59:58PM +0800, Peter Chen wrote:
> Implement struct usb_otg, In that way, calling otg_set_peripheral
> will not be failed at udc.c.
> 
> Signed-off-by: Peter Chen <peter.chen@freescale.com>
> ---
> Changes for v4:
> - Some tiny changes, like delete unused header files
> 
>  drivers/usb/chipidea/Makefile |    2 +-
>  drivers/usb/chipidea/ci.h     |    2 +
>  drivers/usb/chipidea/otg.c    |   60 +++++++++++++++++++++++++++++++++++++++++
>  drivers/usb/chipidea/otg.h    |    6 ++++
>  4 files changed, 69 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/usb/chipidea/Makefile b/drivers/usb/chipidea/Makefile
> index d92ca32..11f513c 100644
> --- a/drivers/usb/chipidea/Makefile
> +++ b/drivers/usb/chipidea/Makefile
> @@ -2,7 +2,7 @@ ccflags-$(CONFIG_USB_CHIPIDEA_DEBUG) := -DDEBUG
>  
>  obj-$(CONFIG_USB_CHIPIDEA)		+= ci_hdrc.o
>  
> -ci_hdrc-y				:= core.o
> +ci_hdrc-y				:= core.o otg.o
>  ci_hdrc-$(CONFIG_USB_CHIPIDEA_UDC)	+= udc.o
>  ci_hdrc-$(CONFIG_USB_CHIPIDEA_HOST)	+= host.o
>  ci_hdrc-$(CONFIG_USB_CHIPIDEA_DEBUG)	+= debug.o
> diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h
> index d738603..8702871 100644
> --- a/drivers/usb/chipidea/ci.h
> +++ b/drivers/usb/chipidea/ci.h
> @@ -129,6 +129,7 @@ struct hw_bank {
>   * @vbus_active: is VBUS active
>   * @transceiver: pointer to USB PHY, if any
>   * @hcd: pointer to usb_hcd for ehci host driver
> + * @otg: for otg support
>   */
>  struct ci13xxx {
>  	struct device			*dev;
> @@ -164,6 +165,7 @@ struct ci13xxx {
>  	bool				global_phy;
>  	struct usb_phy			*transceiver;
>  	struct usb_hcd			*hcd;
> +	struct usb_otg      otg;

I'd really like to know how this is going to proceed.

The ULPI driver currently allocates a struct usb_otg and sets
otg->set_host and otg->set_vbus. Since now the chipidea driver uses its
own struct usb_otg, this will not work with ULPI support.

I see some ways out of this:

- Use a pointer above instead of an own struct usb_otg in the ci driver.
- move the set_host and set_vbus callbacks to struct usb_phy.

I'd like to have this solved before we merge this patch.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2012-12-27 10:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-27  6:59 [PATCH v4 0/7] Add fully tested id switch and vbus connect detect support for Chipidea Peter Chen
2012-12-27  6:59 ` [PATCH v4 1/7] Revert "USB: chipidea: add vbus detect for udc" Peter Chen
2012-12-27  6:59 ` [PATCH v4 2/7] usb: chipidea: add otg file Peter Chen
2012-12-27 10:47   ` Sascha Hauer [this message]
2012-12-28  2:14     ` Peter Chen
2012-12-27  6:59 ` [PATCH v4 3/7] usb: chipidea: add otg id switch and vbus connect/disconnect detect Peter Chen
2012-12-27  7:21   ` Marek Vasut
2012-12-27  8:20     ` Peter Chen
2012-12-27  8:31       ` Marek Vasut
2012-12-27  7:00 ` [PATCH v4 4/7] usb: chipidea: consolidate ci_role_driver's API for both roles Peter Chen
2012-12-27  7:00 ` [PATCH v4 5/7] usb: chipidea: udc: add pullup/pulldown dp at hw_device_state Peter Chen
2012-12-27  7:00 ` [PATCH v4 6/7] usb: chipidea: udc: retire the flag CI13_PULLUP_ON_VBUS Peter Chen
2012-12-27  7:00 ` [PATCH v4 7/7] usb: chipidea: imx: add internal vbus regulator control Peter Chen
2013-01-08 15:27 ` [PATCH v4 0/7] Add fully tested id switch and vbus connect detect support for Chipidea Maxime Ripard
2013-01-09  3:23   ` Peter Chen
2013-01-09 11:43     ` Maxime Ripard
2013-01-10  1:38       ` Peter Chen

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=20121227104758.GV26326@pengutronix.de \
    --to=s.hauer@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 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).