From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 25 Jun 2014 08:08:23 +0200 Subject: [U-Boot] [PATCH RFC 0/2] usb: host: Add a wrapper layer for mutiple host support In-Reply-To: References: <1403619022-15662-1-git-send-email-gautam.vivek@samsung.com> <201406241626.56345.marex@denx.de> Message-ID: <201406250808.23420.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wednesday, June 25, 2014 at 07:11:42 AM, Vivek Gautam wrote: > Hi Marek, > > On Tue, Jun 24, 2014 at 7:56 PM, Marek Vasut wrote: > > On Tuesday, June 24, 2014 at 04:10:20 PM, Vivek Gautam wrote: > >> Hi Marek, > >> > >> It's been very long since we had discussion for introducing the wrapper > >> layer to enable using multiple usb controller types. > >> Its been unfortunate that i had been busy with other tasks, and couldn't > >> look into this. > >> Now that i got sometime, i have prepared a simple RFC patch which right > >> now supports APIs translation for submit_control_msg(), > >> submit_bulk_msg(), submit_int_msg(), and usb_lowlevel_init() as well as > >> usb_lowlevel_stop(). This was the simplest approach that could > >> differentiate between controller types. > >> > >> I had thought of another approach too, wherein there's a 'list' passed > >> by the usb core layer, which would be filled with 'host_controller_drv' > >> structure, that would contain information about the driver. And then > >> each host controller driver will register certain callbacks that can be > >> called from the upper layers. If you say i will send an RFC for this > >> approach. > > > > I think this approach in this patchset will not play well with the driver > > model. Instead, I'd love to see a mean to instantiate each *HCI > > controller and have a USB core which would track those instances. The > > USB core would then be able to call whatever generic ops on those > > instances as needed. Does that make sense please ? > > True, i understand your point here. I think the second approach i was > talking of, goes in this direction. > I think i could not put it well in words there. > > I will prepare an RFC patch for that, and post it as soon as its > ready, so that you can have > a look. Ah, this would be so very appreciated! Thank you! Best regards, Marek Vasut