From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752574AbcFJHGp (ORCPT ); Fri, 10 Jun 2016 03:06:45 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:39306 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750871AbcFJHGn (ORCPT ); Fri, 10 Jun 2016 03:06:43 -0400 Subject: Re: [PATCH v9 13/14] usb: gadget: udc: adapt to OTG core To: Yoshihiro Shimoda , "peter.chen@freescale.com" References: <1465376626-30122-1-git-send-email-rogerq@ti.com> <1465376626-30122-14-git-send-email-rogerq@ti.com> CC: "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" , "robh@kernel.org" , "nsekhar@ti.com" , "b-liu@ti.com" , "linux-usb@vger.kernel.org" , "linux-omap@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" From: Roger Quadros Message-ID: <575A66F0.4090307@ti.com> Date: Fri, 10 Jun 2016 10:06:24 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Yoshihiro, On 09/06/16 13:49, Yoshihiro Shimoda wrote: > Hi Roger, > >> From: Roger Quadros >> Sent: Wednesday, June 08, 2016 6:04 PM >> >> The OTG state machine needs a mechanism to start and >> stop the gadget controller as well as connect/disconnect >> from the bus. Add usb_gadget_start(), usb_gadget_stop() >> and usb_gadget_connect_control(). >> >> Introduce usb_otg_add_gadget_udc() to allow controller drivers >> to register a gadget controller that is part of an OTG instance. >> >> Register with OTG core when UDC is added in usb_add_gadget_udc_release() >> and unregister on usb_del_gadget_udc(). >> >> Notify the OTG core when gadget function driver is available on >> udc_bind_to_driver() and when it is removed in usb_gadget_remove_driver(). >> >> We need to unlock the usb_lock mutex before calling >> usb_otg_register_gadget() else it will cause a circular >> locking dependency. >> >> Ignore softconnect sysfs control when we're in OTG >> mode as OTG FSM should care of gadget softconnect using >> the b_bus_req mechanism. >> >> Signed-off-by: Roger Quadros >> --- >> drivers/usb/gadget/udc/udc-core.c | 202 ++++++++++++++++++++++++++++++++++++-- >> include/linux/usb/gadget.h | 4 + >> 2 files changed, 196 insertions(+), 10 deletions(-) > > I tried to apply this patch on the Felipe's usb.git / testing/next branch, > but I couldn't apply because the udc-core.c was renamed to core.c. > https://git.kernel.org/cgit/linux/kernel/git/balbi/usb.git/commit/?h=testing/next&id=a22b539c7082b6a3046b3a9cebb356a047a2d81d > > I guess this patch needs rebase for that. OK. I'll respin the whole series on Felipe's usb.git /testing/next. cheers, -roger