[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160613075632.GE19728@shlinux2>
Date: Mon, 13 Jun 2016 15:56:32 +0800
From: Peter Chen <hzpeterchen@...il.com>
To: Roger Quadros <rogerq@...com>
Cc: peter.chen@...escale.com, balbi@...nel.org, tony@...mide.com,
gregkh@...uxfoundation.org, dan.j.williams@...el.com,
mathias.nyman@...ux.intel.com, Joao.Pinto@...opsys.com,
sergei.shtylyov@...entembedded.com, jun.li@...escale.com,
grygorii.strashko@...com, yoshihiro.shimoda.uh@...esas.com,
robh@...nel.org, nsekhar@...com, b-liu@...com, joe@...ches.com,
linux-usb@...r.kernel.org, linux-omap@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v11 13/14] usb: gadget: udc: adapt to OTG core
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@....com>
> 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@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Best Regards,
Peter Chen
Powered by blists - more mailing lists