linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@ti.com>
To: Peter Chen <peter.chen@nxp.com>
Cc: Pawel Laszczak <pawell@cadence.com>,
	"felipe.balbi@linux.intel.com" <felipe.balbi@linux.intel.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"nsekhar@ti.com" <nsekhar@ti.com>,
	Rahul Kumar <kurahul@cadence.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb: cdns3: gadget: Don't manage pullups
Date: Tue, 29 Oct 2019 11:37:31 +0200	[thread overview]
Message-ID: <0c2c901c-a6f2-a81b-f5b1-e3f442d7c1ae@ti.com> (raw)
In-Reply-To: <20191029031223.GA26815@b29397-desktop>



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.

cheers,
-roger

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

  reply	other threads:[~2019-10-29  9:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-23  9:02 [PATCH] usb: cdns3: gadget: Don't manage pullups Roger Quadros
2019-10-23  9:17 ` Pawel Laszczak
2019-10-25  3:13   ` Peter Chen
2019-10-25  9:59     ` Roger Quadros
2019-10-25 10:14       ` Felipe Balbi
2019-10-29  3:12       ` Peter Chen
2019-10-29  9:37         ` Roger Quadros [this message]
2019-10-29 10:33           ` Felipe Balbi
2019-10-30  1:15           ` Peter Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0c2c901c-a6f2-a81b-f5b1-e3f442d7c1ae@ti.com \
    --to=rogerq@ti.com \
    --cc=felipe.balbi@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kurahul@cadence.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=pawell@cadence.com \
    --cc=peter.chen@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).