Re: [RFC PATCH] drivers: usb: otg: add device tree support to otg library

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

 



On 06/26/2012 04:15 PM, ABRAHAM, KISHON VIJAY wrote:
>>>>> This is like bypassing the otg_library to add or get the phy :-(
>>>>
>>>> The problem is, we don't have _the_ phy, we have one phy per usb port
>>>> and we have two USB ports.
>>>
>>> I think then this patch would solve your problem as it allows to add
>>> multiple-phys of the same type?
>>
>> We have two USB ports, a OTG capable and a host-only one. Each one has a
>> phy, which is used in the host mode and (if the USB port supports) in
>> the peripheral mode.
>>
>> I didn't follow you multi phy patches closely, what's the exact meaning
>> of type here. If this has already been discussed you can point me to the
>> appropriate thread.
> 
> What we were doing in multi-phy patch is, whenever a phy driver
> registers itself in the otg library using usb_add_phy, it has to give
> a phy type along with it (USB2 PHY, USB3 PHY,..). We weren't allowing
> multiple phys of the same type, meaning in a system there cant be two
> users who calls usb_add_phy(USB2PHY) because there wasn't any
> reasonable way to get the phy.
> The complete discussion thread is @
> http://www.spinics.net/lists/linux-usb/msg63385.html

Thanks, as Sascha pointed out, we have a strict phy<->usb relation, but
there are two phys and two usbs in our system. However a generic phy
layer would even be better.

>>>>> Ideally you should make use of the otg library function for it. Having
>>>>> a generic function in the otg library to get phy by phandle will help
>>>>> other phy users to use it instead of implementing their own version of
>>>>> get_phy from phandle.
>>>>
>>>> +1
>>>>
>>>> The code I pointed you at is the topmost patch in:
>>>> https://github.com/riczhao/kernel-imx/commits/topics/usb-driver
>>>> As soon as your code is available, let's convert it to use your generic
>>>> function.
>>>
>>> Cool. Thanks :-)
>>
>> I pointed you to the code to make sure it fits our use case. To be
>> precise, we have two of these usb to usbphy links in the dev-tree:
> 
> yeah. So in the probe of your phy driver (fsl,imx28-usbphy), call
> usb_add_phy. Then you can call devm_get_phy_by_phandle in the usb

But we have two USB2 phys in the system, will 2 usb_add_phy() work?

> controller driver (fsl,imx28-usb)..

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

Attachment: signature.asc
Description: OpenPGP digital signature


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

  Powered by Linux