From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753488AbcFLL1P (ORCPT ); Sun, 12 Jun 2016 07:27:15 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:35339 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751843AbcFLL1M (ORCPT ); Sun, 12 Jun 2016 07:27:12 -0400 Date: Sun, 12 Jun 2016 19:21:05 +0800 From: Peter Chen To: Roger Quadros Cc: peter.chen@freescale.com, balbi@kernel.org, tony@atomide.com, gregkh@linuxfoundation.org, dan.j.williams@intel.com, mathias.nyman@linux.intel.com, Joao.Pinto@synopsys.com, sergei.shtylyov@cogentembedded.com, jun.li@freescale.com, grygorii.strashko@ti.com, yoshihiro.shimoda.uh@renesas.com, robh@kernel.org, nsekhar@ti.com, b-liu@ti.com, joe@perches.com, linux-usb@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v10 08/14] usb: otg: add OTG/dual-role core Message-ID: <20160612112105.GB32615@shlinux2> References: <1465564043-27163-1-git-send-email-rogerq@ti.com> <1465564043-27163-9-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1465564043-27163-9-git-send-email-rogerq@ti.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 10, 2016 at 04:07:17PM +0300, Roger Quadros wrote: > index dca7856..03f7204 100644 > --- a/drivers/usb/Makefile > +++ b/drivers/usb/Makefile > @@ -59,5 +59,6 @@ obj-$(CONFIG_USB_RENESAS_USBHS) += renesas_usbhs/ > obj-$(CONFIG_USB_GADGET) += gadget/ > > obj-$(CONFIG_USB_COMMON) += common/ > +obj-$(CONFIG_USB_OTG_CORE) += common/ I don't think you need to make above change, why you do it? > + > +/** > + * usb_otg_get_data() - get usb_otg data structa %s/structa/structure > + > +/** > + * usb_otg_kick_fsm() - Kick the OTG state machine > + * @otg_dev: OTG controller device > + * > + * Used by USB host/gadget stack to sync OTG related > + * events to the OTG state machine. > + * e.g. change in host_bus->b_hnp_enable, gadget->b_hnp_enable > + * > + * Return: 0 on success, error value otherwise. > + */ > +int usb_otg_kick_fsm(struct device *otg_dev) > +{ > + struct usb_otg *otg; > + > + mutex_lock(&otg_list_mutex); > + otg = usb_otg_get_data(otg_dev); > + mutex_unlock(&otg_list_mutex); > + if (!otg) { > + dev_dbg(otg_dev, "otg: %s: invalid otg device\n", > + __func__); > + return -ENODEV; > + } > + > + usb_otg_sync_inputs(otg); > + > + return 0; > +} > +EXPORT_SYMBOL_GPL(usb_otg_kick_fsm); Do you have any users for this API? If no, please delete it in this version. > + > +/** > + * usb_otg_register_hcd() - Register the host controller to OTG core > + * @hcd: host controller > + * @irqnum: interrupt number > + * @irqflags: interrupt flags > + * @ops: HCD ops to interface with the HCD > + * > + * This is used by the USB Host stack to register the host controller > + * to the OTG core. Host controller must not be started by the > + * caller as it is left upto the OTG state machine to do so. %s/upto/up to > + > +/** > + * usb_otg_register_gadget() - Register the gadget controller to OTG core > + * @gadget: gadget controller instance > + * @ops: gadget interface ops > + * > + * This is used by the USB gadget stack to register the gadget controller > + * to the OTG core. Gadget controller must not be started by the > + * caller as it is left upto the OTG state machine to do so. > + * %s/upto/up to -- Best Regards, Peter Chen