Re: [RFC PATCH 1/2] usb: Add physical layer utility code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 08, 2011 at 09:21:21AM +0530, Pavan Kondeti wrote:
> On 8/5/2011 6:12 PM, Sascha Hauer wrote:
> > Yes, that's clear to me. I just wondered what exact names we should use
> > to register a phy.
> > 
> > Consider a phy registering itself with
> > 
> > 	usb_register_transceiver(recv) with recv->name = "mxc-ehci.0"
> > 
> > (where recv->name could be passed from platform_data)
> > 
> > Then the mxc-ehci driver could get its receiver using
> > 
> > 	usb_get_transceiver(dev_name(&pdev->dev))
> > 
> > or with
> > 
> > 	usb_get_transceiver(&pdev->dev);
> > 
> > when we do what I suggested. This would be similar to the clocks which
> > get the clocks associated to a device with clk_get(&pdev->dev, id).
> > 
> > This would change the behaviour of usb_get_transceiver() from "give me
> > the phy with this name" to "give me the transceiver associated with this
> > device". It would prevent us from inventing arbitrary phy names.
> > 
> I like this idea.
> 
> How does this work if both gadget and host are active. What name should
> be passed to transceiver? "mxc-ehci" or "mxc-udc"

Neither of both. There should be a device which handles the ehci
resource and which either registers the otg, host or device part
depending on platform data. This device should also handle the phy.

Currently we have the situation that host and device driver are
completely unaware of each other, at least on most architectures.
>From what we have in the tree I like the msm usb otg best, apart
from the fact that it's a platform specific solution. It's even
not complicsted to make it work on i.MX and therefore probably
on other architectures aswell.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux