[PATCH v2 2/3] usb: phy: add lubbock phy driver

Dmitry Eremin-Solenikov dbaryshkov at gmail.com
Wed Jan 14 17:45:08 PST 2015


Hello,

2015-01-13 9:10 GMT+03:00 Kishon Vijay Abraham I <kishon at ti.com>:
> Hi,
>
> On Tuesday 13 January 2015 03:21 AM, Felipe Balbi wrote:
>> On Sun, Jan 11, 2015 at 10:44:59PM +0400, Dmitry Eremin-Solenikov wrote:
>>> Hello,
>>>
>>> 2015-01-08 19:58 GMT+03:00 Felipe Balbi <balbi at ti.com>:
>>>> On Sun, Nov 30, 2014 at 01:02:04AM +0300, Dmitry Eremin-Solenikov wrote:
>>>>> Extract lubbock-specific code from pxa25x_udc driver. As a bonus, phy
>>>>> driver determines connector/VBUS status by reading CPLD register. Also
>>>>> it uses a work to call into udc stack, instead of pinging vbus session
>>>>> right from irq handler.
>>>>>
>>>>> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
>>>>> ---
>>>>>  drivers/usb/phy/Kconfig       |  10 ++
>>>>>  drivers/usb/phy/Makefile      |   1 +
>>>>
>>>> new phy drivers under drivers/phy only, sorry.
>>>
>>> Hmm. How do drivers/phy drivers coordinate with usb gadget subsystem?
>>> I see none of them calling usb_gadget_vbus_connect/disconnect().
>>
>> I'll leave that to Kishon, since he wrote drivers/phy. Kishon, any
>> hints?
>
> Extcon framework can be used to detect the connector status. So the PHY driver
> should register with the extcon framework if it has the capability to determine
> the connector status and the gadget driver should register with the extcon
> framework if it has to receive the connector status.

If I understand correctly, this means the whole usb gadget/otg subsystem needs
to be redesigned/refactored to support extconn drivers. Is it planned already?
Can we still submit drivers to an old usb-phy subsystem as 'new phy' subsystem
does not provide us necessary integration with usb-gadget subsystem?

>
> I'm not sure if we should be adding these extcon APIs inside the PHY framework
> itself as all PHYs might not have the capability to detect the connector status.

In fact I have several devices for which I had to implement a simple usb-phy
that is able to control D+ pullup, but isn't able to detect VBUS presense
and thus has to assume that the device is always connected.

-- 
With best wishes
Dmitry



More information about the linux-arm-kernel mailing list