lkml.org 
[lkml]   [2019]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] usb: cdns3: gadget: Don't manage pullups
Date

Hi,

Roger Quadros <rogerq@ti.com> writes:

> On 29/10/2019 05:12, Peter Chen wrote:
>> On 19-10-25 12:59:17, Roger Quadros wrote:
>>> Peter,
>>>
>>> On 25/10/2019 06:13, Peter Chen wrote:
>>>> On 19-10-23 09:17:45, Pawel Laszczak wrote:
>>>>> Hi,
>>>>>
>>>>> Reviewed-by: Pawel Laszczak <pawell@cadence.com>
>>>>
>>>> Hi Roger & Pawel,
>>>>
>>>> Assume gadget function has already enabled, if you switch host mode
>>>> to device mode, with your changes, where the device mode will be enabled
>>>> again?
>>>
>>> When it switches from device mode to host the UDC is removed. When we switch
>>> back from host to device mode the UDC is added, so,
>>>
>>> usb_add_gadget_udc_release()-> check_pending_gadget_drivers()->
>>> udc_bind_to_driver()->usb_udc_connect_control()->usb_gadget_connect()->
>>> gadget->ops->pullup()
>>
>> Thanks. I have another question how you decide when to store UDC name
>> to /sys/kernel/config/usb_gadget/g1/UDC? Do you have a user daemon program
>> to monitor VBUS or external connector? At host mode, the store operation
>> will fail due to there is NO UDC.
>>
>
> Yes, user space needs to monitor /sys/class/usb_role/6000000.usb-role-switch/role
>
> When it becomes "device" the UDC is available and it can prepare to configure
> the UDC.
>
> Could you please give your Ack for this patch if it is OK? Thanks.

this is already in its way to Linus' tree:

https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?h=usb-linus&id=f3fb802efaef3662744a2215a51294d52a7cfc0e

--
balbi
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-10-29 11:34    [W:0.062 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site