Re: [PATCH v11 13/14] usb: gadget: udc: adapt to OTG core

From: Peter Chen
Date: Mon Jun 13 2016 - 04:02:49 EST


On Mon, Jun 13, 2016 at 10:55:12AM +0300, Roger Quadros wrote:
> err1:
> - if (ret != -EISNAM)
> + if ((ret != -EISNAM))

Since you do not need above change.

Expect above, I am ok with this patch.

Acked-by: Peter Chen <peter.chen@xxxxxxx>

> dev_err(&udc->dev, "failed to start %s: %d\n",
> udc->driver->function, ret);
> udc->driver = NULL;
> @@ -1389,6 +1565,12 @@ static ssize_t usb_udc_softconn_store(struct device *dev,
> return -EOPNOTSUPP;
> }
>
> + /* In OTG/dual-role mode, soft-connect should be handled by OTG core */
> + if (udc->gadget->otg_dev) {
> + dev_err(dev, "soft-connect not supported in OTG mode\n");
> + return -EOPNOTSUPP;
> + }
> +
> if (sysfs_streq(buf, "connect")) {
> usb_gadget_udc_start(udc);
> usb_gadget_connect(udc->gadget);
> diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
> index 1d74fb8..8c6880d 100644
> --- a/include/linux/usb/gadget.h
> +++ b/include/linux/usb/gadget.h
> @@ -701,6 +701,10 @@ extern int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget);
> extern void usb_del_gadget_udc(struct usb_gadget *gadget);
> extern char *usb_get_gadget_udc_name(void);
>
> +extern int usb_otg_add_gadget_udc(struct device *parent,
> + struct usb_gadget *gadget,
> + struct device *otg_dev);
> +
> /*-------------------------------------------------------------------------*/
>
> /* utility to simplify dealing with string descriptors */
> --
> 2.7.4
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html

--

Best Regards,
Peter Chen