Re: [PATCH 3/3] usb: mxs-phy: register phy as USB_PHY_TYPE_USB2

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

 



On 08/27/2012 12:27 PM, Richard Zhao wrote:
> On Mon, Aug 27, 2012 at 03:01:43PM +0530, ABRAHAM, KISHON VIJAY wrote:
>> Hi,
>>
>> On Mon, Aug 27, 2012 at 12:55 PM, Richard Zhao
>> <richard.zhao@xxxxxxxxxxxxx> wrote:
>>> On Mon, Aug 27, 2012 at 11:04:58AM +0530, ABRAHAM, KISHON VIJAY wrote:
>>>> Hi,
>>>>
>>>> On Sat, Aug 25, 2012 at 3:33 PM, Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> wrote:
>>>>> On 08/24/2012 08:51 AM, Richard Zhao wrote:
>>>>>> On Thu, Aug 23, 2012 at 07:22:54PM +0200, Marc Kleine-Budde wrote:
>>>>>>> This patch registers the msx-phy as an USB_PHY_TYPE_USB2. This is needed to get
>>>>>>> reference to the phy with devm_usb_get_phy_by_phandle(), which will be added in
>>>>>>> a later patch.
>>>>>>>
>>>>>>> Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
>>>>>>> ---
>>>>>>>  drivers/usb/otg/mxs-phy.c |    5 ++++-
>>>>>>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>>>>>>
>>>>>>> diff --git a/drivers/usb/otg/mxs-phy.c b/drivers/usb/otg/mxs-phy.c
>>>>>>> index c1a67cb..240b945 100644
>>>>>>> --- a/drivers/usb/otg/mxs-phy.c
>>>>>>> +++ b/drivers/usb/otg/mxs-phy.c
>>>>>>> @@ -141,11 +141,14 @@ static int mxs_phy_probe(struct platform_device *pdev)
>>>>>>>
>>>>>>>      platform_set_drvdata(pdev, &mxs_phy->phy);
>>>>>>>
>>>>>>> -    return 0;
>>>>>>> +    return usb_add_phy(&mxs_phy->phy, USB_PHY_TYPE_USB2);
>>>>>> Why is it usb2? It's kind of USB_PHY_TYPE_DT.
>>>>>
>>>>> For now there is USB_PHY_TYPE_USB2, USB_PHY_TYPE_USB3 and undefined. On
>>>>> the one hand it's an USB2 type phy on the other the type is not relevant
>>>>> if you get the phy by a phandle. I think it should be USB2. Kishon, what
>>>>> do you think?
>>>>
>>>> IMHO, USB_PHY_TYPE_DT does not qualify to be a phy type.
>>>> USB_PHY_TYPE_USB2 makes more sense to me.
>>> Why is USB_PHY_TYPE_USB2 better? It might not be attached to usb2.
>>> undefined may be better, if it's not used to check re-initialization.
>>
>> What I meant is, the type should be something that qualifies the phy
>> ip. For example, USB_PHY_TYPE_USB2 specifies a phy that connects to a
>> usb2/usb3 controller to provide usb2 functionality. If a specific type
>> of phy can't be qualified with a type (which ideally shouldn't be the
>> case), UNDEFINED can be used.
> Ah, I though usb2 means the index of usb controller is 2. So, if usb2
> is usb version 2, how can usb_get_phy identify a unique controller. A
> SoC may have several usb2 controllers.

Via the get by phandle the previous patch adds.

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