All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	barebox@lists.infradead.org, Jason Cooper <jason@lakedaemon.net>,
	Andrew Lunn <andrew@lunn.ch>
Subject: Re: [PATCH RFC 1/4] usb: add Marvell MVEBU USB support
Date: Mon, 30 Jun 2014 08:30:06 +0200	[thread overview]
Message-ID: <20140630063006.GD14257@pengutronix.de> (raw)
In-Reply-To: <1403705328-9924-2-git-send-email-sebastian.hesselbarth@gmail.com>

Hi Sebastian,


> +	if (usb->mode == USB_DR_MODE_HOST &&
> +	    IS_ENABLED(CONFIG_USB_MVEBU_HOST)) {
> +		ret = regulator_enable(usb->vbus);
> +		if (ret)
> +			return ret;
> +		ret = ehci_register(dev, &usb->ehci);
> +		if (ret)
> +			regulator_disable(usb->vbus);
> +	} else if (usb->mode == USB_DR_MODE_PERIPHERAL &&
> +		   IS_ENABLED(CONFIG_USB_MVEBU_DEVICE)) {
> +		ret = regulator_disable(usb->vbus);
> +		if (ret)
> +			return ret;
> +		ret = ci_udc_register(dev, usb->base);
> +	} else {
> +		dev_err(dev, "Unsupported USB role\n");
> +		ret = -ENODEV;
> +	}

This should probably be shared between i.MX and mvebu. I have a patch
somewhere which implements a device parameter to switch between host and
device mode. It could be used for both i.MX and mvebu.

Otherwise the series looks fine to me.

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 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2014-06-30  6:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-25 14:08 [PATCH RFC 0/4] MVEBU SoC full USB support Sebastian Hesselbarth
2014-06-25 14:08 ` [PATCH RFC 1/4] usb: add Marvell MVEBU " Sebastian Hesselbarth
2014-06-30  6:30   ` Sascha Hauer [this message]
2014-06-30  7:46     ` Sebastian Hesselbarth
2014-06-25 14:08 ` [PATCH RFC 2/4] ARM: dts: add new USB nodes to Kirkwood Guruplug Sebastian Hesselbarth
2014-06-25 14:08 ` [PATCH RFC 3/4] ARM: dts: add new USB nodes to Dove CuBox Sebastian Hesselbarth
2014-06-25 14:08 ` [PATCH RFC 4/4] ARM: dts: add new USB nodes to Armada 370 Mirabox Sebastian Hesselbarth
2014-06-25 19:18 ` [PATCH RFC 0/4] MVEBU SoC full USB support Jason Cooper
2014-06-25 19:27   ` Sebastian Hesselbarth
2014-06-26 12:08     ` Sebastian Hesselbarth
2014-06-25 19:40 ` Thomas Petazzoni

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=20140630063006.GD14257@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=andrew@lunn.ch \
    --cc=barebox@lists.infradead.org \
    --cc=jason@lakedaemon.net \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=thomas.petazzoni@free-electrons.com \
    /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.