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@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox