From: Roger Quadros <rogerq@ti.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Peter Chen <peter.chen@freescale.com>,
"Balbi, Felipe" <balbi@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Dan Williams <dan.j.williams@intel.com>,
Li Jun <jun.li@freescale.com>,
Mathias Nyman <mathias.nyman@linux.intel.com>,
Tony Lindgren <tony@atomide.com>, <Joao.Pinto@synopsys.com>,
Andrew Bresticker <abrestic@chromium.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
<linux-omap@vger.kernel.org>
Subject: Re: [PATCH v4 07/13] usb: otg: add OTG core
Date: Wed, 9 Sep 2015 14:10:57 +0300 [thread overview]
Message-ID: <55F013C1.9080400@ti.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1509081334190.1298-100000@iolanthe.rowland.org>
(adding back folks in cc)
On 08/09/15 20:35, Alan Stern wrote:
> On Tue, 8 Sep 2015, Roger Quadros wrote:
>
>>>> What if there is another architecture like so?
>>>>
>>>> C:
>>>> [Parent]
>>>> |
>>>> |
>>>> |------------------|--------------|
>>>> [OTG core] [gadget] [host]
>>>>
>>>> We need a more flexible mechanism to link the gadget and
>>>> host device to the otg core for non DT case.
>>>>
>>>> How about adding struct usb_otg parameter to usb_otg_register_hcd()?
>>>>
>>>> e.g.
>>>> int usb_otg_register_hcd(struct usb_otg *otg, struct usb_hcd *hcd, ..)
>>>>
>>>> If otg is NULL it will try DT otg-controller property or parent to
>>>> get the otg controller.
>>>
>>> This seems a lot like something Peter and I discussed recently. See
>>>
>>> http://marc.info/?l=linux-usb&m=143977568021328&w=2
>>>
>>> and the following messages in that thread.
>>>
>>
>> If I understood right, your proposal was to add a usb_pointers data
>> struct to the device's drvdata?
>
> Right.
>
>> This is fine only if the otg/gadget/host share the same device.
>> It does not solve the problem where each have different platform devices.
>
> Why not? Each of the platform devices can store a pointer to the same
> usb_pointers structure. Wouldn't that be suitable?
>
I didn't understand how all of them get the reference to the
same usb_pointer structure (or contents) when their respective platform devices
get created so that they can store it in their respective drvdata.
Worst case, the 3 devices could be totally independent of each other without a
common parent, and get registered at different times.
The common resource here is the physical USB port for which the 3 drivers
otg/host/gadget are being registered.
There should be a mechanism for each device to tell that it is part of
this particular USB port. (or usb_pointers struct)
cheers,
-roger
next parent reply other threads:[~2015-09-09 11:11 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.44L0.1509081334190.1298-100000@iolanthe.rowland.org>
2015-09-09 11:10 ` Roger Quadros [this message]
2015-09-09 15:26 ` Alan Stern
2015-08-24 13:21 [PATCH v4 00/13] USB: OTG/DRD Core functionality Roger Quadros
2015-08-24 13:21 ` [PATCH v4 07/13] usb: otg: add OTG core Roger Quadros
2015-09-07 1:23 ` Peter Chen
2015-09-07 10:23 ` Roger Quadros
2015-09-08 8:31 ` Peter Chen
2015-09-08 12:25 ` Roger Quadros
2015-09-08 14:34 ` Alan Stern
2015-09-08 17:29 ` Roger Quadros
2015-09-09 2:21 ` Peter Chen
2015-09-09 9:08 ` Roger Quadros
2015-09-09 8:13 ` Peter Chen
2015-09-09 9:33 ` Roger Quadros
2015-09-09 8:45 ` Peter Chen
2015-09-09 10:21 ` Roger Quadros
2015-09-10 5:35 ` Peter Chen
2015-09-10 14:17 ` Roger Quadros
2015-09-11 1:50 ` Peter Chen
2015-09-07 7:40 ` Li Jun
2015-09-07 10:53 ` Roger Quadros
2015-09-09 6:20 ` Li Jun
2015-09-09 10:01 ` Roger Quadros
2015-09-10 9:28 ` Li Jun
2015-09-10 14:14 ` Roger Quadros
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55F013C1.9080400@ti.com \
--to=rogerq@ti.com \
--cc=Joao.Pinto@synopsys.com \
--cc=abrestic@chromium.org \
--cc=balbi@ti.com \
--cc=dan.j.williams@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jun.li@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
--cc=peter.chen@freescale.com \
--cc=stern@rowland.harvard.edu \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome