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

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

 



Hi,

On Fri, Aug 05, 2011 at 08:59:55AM +0200, Sascha Hauer wrote:
> On Mon, Aug 01, 2011 at 05:29:14PM +0300, Heikki Krogerus wrote:
> > This is only the idea. Work in progress.
> > 
> > Adds struct usb_transceiver and functions to interact with
> > the controller drivers. This also introduces very basic
> > support for multiple transceivers.
> 
> +1, we really need this to properly handle phys. The current single
> transceiver support depends on the fact that there may be only one
> otg port, which is true. Other host only ports often have a transceiver
> aswell though.

And there can be more the one transceiver even for one otg port. Take
a look at RX-51 platform.

> > +/*
> > + * usb_get_transceiver - find a USB transceiver
> > + * @name: the name of the transceiver driver
> > + *
> > + * Returns a transceiver driver matching the name, or NULL, and gets
> > + * refcount to it. The caller is responsible for calling
> > + * usb_put_transceiver() to release that count.
> > + */
> > +struct usb_transceiver *usb_get_transceiver(const char *name)
> > +{
> 
> What are drivers supposed to pass as name? I would say dev_name(dev),
> right? In this case we might want to pass a struct device here.

For this function? Well, this would be used by the controller drivers
and what ever needs a handle to the transceiver. I don't believe we
can use struct device here. It would mean the controller drivers would
have the struct device of the transceivers beforehand.

So the transceiver drivers would use usb_register_transceiver(struct
usb_transceiver *) to add a themselves to the list. The controller
drivers would use this function, usb_get_transceiver(), to get a
handle to the transceiver.

I hope this answers your question, or maybe I totally misunderstand it
:).

Br,

-- 
heikki
--
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