From: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
To: Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>
Cc: Peter Chen <peter.chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
"Balbi, Felipe" <balbi-l0cyMroinI0@public.gmane.org>,
Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Dan Williams
<dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Li Jun <jun.li-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
Mathias Nyman
<mathias.nyman-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
Joao.Pinto-HKixBCOQz3hWk0Htik3J/w@public.gmane.org,
Andrew Bresticker
<abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
"linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.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-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.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
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
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:10 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.44L0.1509081334190.1298-100000@iolanthe.rowland.org>
[not found] ` <Pine.LNX.4.44L0.1509081334190.1298-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2015-09-09 11:10 ` Roger Quadros [this message]
2015-09-09 11:10 ` [PATCH v4 07/13] usb: otg: add OTG core Roger Quadros
[not found] ` <55F013C1.9080400-l0cyMroinI0@public.gmane.org>
2015-09-09 15:26 ` Alan Stern
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-08-24 13:21 ` Roger Quadros
2015-09-07 1:23 ` Peter Chen
2015-09-07 1:23 ` Peter Chen
2015-09-07 10:23 ` Roger Quadros
2015-09-07 10:23 ` Roger Quadros
[not found] ` <55ED6585.5050200-l0cyMroinI0@public.gmane.org>
2015-09-08 8:31 ` Peter Chen
2015-09-08 8:31 ` Peter Chen
2015-09-08 12:25 ` Roger Quadros
2015-09-08 12:25 ` Roger Quadros
[not found] ` <55EED3B5.5030806-l0cyMroinI0@public.gmane.org>
2015-09-08 14:34 ` Alan Stern
2015-09-08 14:34 ` Alan Stern
2015-09-08 17:29 ` Roger Quadros
2015-09-08 17:29 ` Roger Quadros
2015-09-09 2:21 ` Peter Chen
2015-09-09 2:21 ` Peter Chen
2015-09-09 9:08 ` Roger Quadros
2015-09-09 9:08 ` Roger Quadros
[not found] ` <55EFF6FA.1000705-l0cyMroinI0@public.gmane.org>
2015-09-09 8:13 ` Peter Chen
2015-09-09 8:13 ` Peter Chen
2015-09-09 9:33 ` Roger Quadros
2015-09-09 9:33 ` Roger Quadros
2015-09-09 8:45 ` Peter Chen
2015-09-09 8:45 ` Peter Chen
2015-09-09 10:21 ` Roger Quadros
2015-09-09 10:21 ` Roger Quadros
2015-09-10 5:35 ` Peter Chen
2015-09-10 5:35 ` Peter Chen
2015-09-10 14:17 ` Roger Quadros
2015-09-10 14:17 ` Roger Quadros
2015-09-11 1:50 ` Peter Chen
2015-09-11 1:50 ` Peter Chen
[not found] ` <1440422484-4737-8-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
2015-09-07 7:40 ` Li Jun
2015-09-07 7:40 ` Li Jun
2015-09-07 10:53 ` Roger Quadros
2015-09-07 10:53 ` Roger Quadros
[not found] ` <55ED6C9F.2000502-l0cyMroinI0@public.gmane.org>
2015-09-09 6:20 ` Li Jun
2015-09-09 6:20 ` Li Jun
2015-09-09 10:01 ` Roger Quadros
2015-09-09 10:01 ` Roger Quadros
2015-09-10 9:28 ` Li Jun
2015-09-10 9:28 ` Li Jun
2015-09-10 14:14 ` Roger Quadros
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-l0cymroini0@public.gmane.org \
--cc=Joao.Pinto-HKixBCOQz3hWk0Htik3J/w@public.gmane.org \
--cc=abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=jun.li-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mathias.nyman-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=peter.chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org \
--cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.