mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Felipe Balbi <balbi@ti.com>,
	"Munegowda, Keshava" <keshava_mgowda@ti.com>,
	Paul Walmsley <paul@pwsan.com>,
	linux-usb@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org, khilman@ti.com, b-cousson@ti.com,
	gadiyar@ti.com, sameo@linux.intel.com, parthab@india.ti.com,
	tony@atomide.com, johnstul@us.ibm.com, vishwanath.bs@ti.com,
	Greg KH <greg@kroah.com>
Subject: Re: [PATCH 1/5 v13] arm: omap: usb: ehci and ohci hwmod structures for omap4
Date: Tue, 11 Oct 2011 11:13:53 +0300	[thread overview]
Message-ID: <20111011081352.GC10155@legolas.emea.dhcp.ti.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1110102010310.28007-100000@netrider.rowland.org>

[-- Attachment #1: Type: text/plain, Size: 3257 bytes --]

Hi,

On Mon, Oct 10, 2011 at 08:15:29PM -0400, Alan Stern wrote:
> > > > > In fact we do already have sibling lists.  They are maintained as part 
> > > > > of the device_private structure.  What we are missing is a 
> > > > > device_for_each_sibling() routine.  It could be added pretty easily; it 
> > > > > would be similar to device_for_each_child().
> > > > 
> > > > care to point out where is ?
> > > > 
> > > > 68 struct device_private {
> > > > 69         struct klist klist_children;
> > > > 70         struct klist_node knode_parent;
> > > -------------^  Here.  The "parent" in the name refers to where the
> > >                 head of the list is stored.
> > > 
> > > > 71         struct klist_node knode_driver;
> > > > 72         struct klist_node knode_bus;
> > > > 73         void *driver_data;
> > > > 74         struct device *device;
> > > > 75 };
> > > 
> > > From device_add():
> > > 
> > > 	if (parent)
> > > 		klist_add_tail(&dev->p->knode_parent,
> > > 			       &parent->p->klist_children);
> > 
> > that's a parent -> child relationship. What we have on this case is:
> > 
> >  --------------                ---------------
> > |              |              |               |          |\
> > |   UHH        |  clocks, etc |    USBTLL     |          | |
> > |              | <==========> |               | <======> | | <====> ports
> > |     -------  |              | (Transceiver- |          | |
> > |    |  EHCI | |              | less Link)    |          |/
> > |     -------  |              |               |         Port MUX
> > |              |              |               |
> > |     -------  |              |               |
> > |    |  OHCI | |              |               |
> > |     -------  |              |               |
> > |              |              |               |
> >  --------------                ---------------
> > 
> > It doesn't shown here, but the TLL link is completely optional. It's
> > mainly used for modem integration, IIRC. Still, if we're using TLL, EHCI
> > and OHCI will depend on a clock provided by the USBTLL block.
> > 
> > Clearly, USBTLL isn't either a parent of UHH, nor a parent of EHCI/OHCI
> > blocks. We can, from a code perspective, make USBTLL into a parent of
> > UHH to make things simpler, but this will mean that calling
> > pm_runtime_get() will also unconditionaly turn on TLL clock, unless we
> > add some nasty hacks to allow TLL know if *HCI port is in TLL mode.
> > 
> > That's why I decided for making TLL and UHH siblings, because that's a
> > closer relationship than parent-child.
> > 
> > Can you see the problem now ?
> 
> Okay, now I understand better.  The word "sibling" implies that the two 
> objects have the same parent, so a different word would describe this 
> relationship better.  Something like "friend" or "associate".
> 
> Or maybe, following Paul's suggestion, the driver core doesn't have to 
> be changed at all.

I see... I just thought that if there are other similar cases, it might
make sense to have a more generic way to make those two devices talk to
each other. But if you all agree that an EXPORT_SYMBOL_GPL() is enough,
then it's ok ;-)

thanks

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2011-10-11  8:14 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-06 11:38 Keshava Munegowda
2011-10-07  9:06 ` Paul Walmsley
2011-10-07  9:21   ` Munegowda, Keshava
2011-10-07  9:35     ` Paul Walmsley
2011-10-07 10:33       ` Munegowda, Keshava
2011-10-10  8:52         ` Munegowda, Keshava
2011-10-10  9:03           ` Felipe Balbi
2011-10-10  9:17             ` Munegowda, Keshava
2011-10-10  9:26               ` Felipe Balbi
2011-10-10 10:05                 ` Felipe Balbi
2011-10-10 11:15                   ` Munegowda, Keshava
2011-10-10 15:19                   ` Alan Stern
2011-10-10 16:03                     ` Felipe Balbi
2011-10-10 19:55                       ` Alan Stern
2011-10-10 20:10                         ` Felipe Balbi
2011-10-11  0:15                           ` Alan Stern
2011-10-11  8:13                             ` Felipe Balbi [this message]
2011-10-11 14:04                               ` Alan Stern
2011-10-11 14:08                                 ` Felipe Balbi
2011-10-11 18:52                                   ` Paul Walmsley
2011-10-11 19:12                                     ` Felipe Balbi
2011-10-11 19:17                                       ` Paul Walmsley
2011-10-11 19:19                                         ` Felipe Balbi
2011-10-10 21:49             ` Paul Walmsley
2011-10-10 22:13               ` Paul Walmsley
2011-10-10 20:59           ` Paul Walmsley
2011-10-11  1:18             ` Paul Walmsley
2011-10-07 10:43       ` Munegowda, Keshava
2011-10-07 14:27         ` Munegowda, Keshava
2011-10-11  0:40 ` Paul Walmsley
2011-10-11  8:01   ` Cousson, Benoit

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=20111011081352.GC10155@legolas.emea.dhcp.ti.com \
    --to=balbi@ti.com \
    --cc=b-cousson@ti.com \
    --cc=gadiyar@ti.com \
    --cc=greg@kroah.com \
    --cc=johnstul@us.ibm.com \
    --cc=keshava_mgowda@ti.com \
    --cc=khilman@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=parthab@india.ti.com \
    --cc=paul@pwsan.com \
    --cc=sameo@linux.intel.com \
    --cc=stern@rowland.harvard.edu \
    --cc=tony@atomide.com \
    --cc=vishwanath.bs@ti.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

all inboxes | Powered by JetHome®