From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933013AbcFHLmi (ORCPT ); Wed, 8 Jun 2016 07:42:38 -0400 Received: from mail-lf0-f45.google.com ([209.85.215.45]:34551 "EHLO mail-lf0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932603AbcFHLmg (ORCPT ); Wed, 8 Jun 2016 07:42:36 -0400 Subject: Re: [PATCH v9 12/14] usb: hcd: Adapt to OTG core To: Roger Quadros , peter.chen@freescale.com References: <1465376626-30122-1-git-send-email-rogerq@ti.com> <1465376626-30122-13-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, jun.li@freescale.com, grygorii.strashko@ti.com, yoshihiro.shimoda.uh@renesas.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: Sergei Shtylyov Message-ID: <22442eeb-e927-d7ac-52c6-3aebd2106837@cogentembedded.com> Date: Wed, 8 Jun 2016 14:42:32 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <1465376626-30122-13-git-send-email-rogerq@ti.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/8/2016 12:03 PM, Roger Quadros wrote: > Introduce usb_otg_add/remove_hcd() for use by host > controllers that are part of OTG/dual-role port. > > Non Device tree platforms can use the otg_dev argument > to specify the OTG controller device. If otg_dev is NULL > then the device tree node's otg-controller property is used to > get the otg_dev device. > > Signed-off-by: Roger Quadros > Acked-by: Peter Chen > --- > drivers/usb/core/hcd.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ > include/linux/usb/hcd.h | 4 ++++ > 2 files changed, 59 insertions(+) > > diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c > index ae6c76d..c6f4155 100644 > --- a/drivers/usb/core/hcd.c > +++ b/drivers/usb/core/hcd.c [...] > @@ -3025,6 +3030,56 @@ void usb_remove_hcd(struct usb_hcd *hcd) > } > EXPORT_SYMBOL_GPL(usb_remove_hcd); > > +static struct otg_hcd_ops otg_hcd_intf = { > + .add = usb_add_hcd, > + .remove = usb_remove_hcd, > + .usb_bus_start_enum = usb_bus_start_enum, > + .usb_control_msg = usb_control_msg, > + .usb_hub_find_child = usb_hub_find_child, > +}; > + > +/** > + * usb_otg_add_hcd - Register the HCD with OTG core. > + * @hcd: the usb_hcd structure to initialize > + * @irqnum: Interrupt line to allocate > + * @irqflags: Interrupt type flags > + * @otg_dev: OTG controller device managing this HCD Device managing a driver? That's interesting. :-) [...] MBR, Sergei