public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Chen <peter.chen@nxp.com>
To: Roger Quadros <rogerq@ti.com>
Cc: "pawell@cadence.com" <pawell@cadence.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"balbi@kernel.org" <balbi@kernel.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Revert "usb: cdns3: core: quit if it uses role switch class"
Date: Tue, 24 Nov 2020 06:43:12 +0000	[thread overview]
Message-ID: <20201124064242.GA32310@b29397-desktop> (raw)
In-Reply-To: <20201123115051.30047-1-rogerq@ti.com>

On 20-11-23 13:50:51, Roger Quadros wrote:
> This reverts commit 50642709f6590fe40afa6d22c32f23f5b842aed5.
> 
> This commit breaks hardware based role switching on TI platforms.
> cdns->role_sw is always going to be non-zero as it is a pointer
> to the usb_role_switch instance. Some other means needs to be used
> if hardware based role switching is not required by the platform.
> 
> Signed-off-by: Roger Quadros <rogerq@ti.com>
> ---
>  drivers/usb/cdns3/core.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c
> index a0f73d4711ae..4c1445cf2ad0 100644
> --- a/drivers/usb/cdns3/core.c
> +++ b/drivers/usb/cdns3/core.c
> @@ -280,10 +280,6 @@ int cdns3_hw_role_switch(struct cdns3 *cdns)
>  	enum usb_role real_role, current_role;
>  	int ret = 0;
>  
> -	/* Depends on role switch class */
> -	if (cdns->role_sw)
> -		return 0;
> -
>  	pm_runtime_get_sync(cdns->dev);
>  
>  	current_role = cdns->role;
> -- 

Hi Roger,

I am sorry about that. Do you use role switch /sys entry, if you have
used, I prefer using "usb-role-switch" property at dts to judge if
SoC OTG signals or external signals for role switch. If you have not
used it, I prefer only setting cdns->role_sw for role switch use cases.

-- 

Thanks,
Peter Chen

  reply	other threads:[~2020-11-24  6:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-23 11:50 [PATCH] Revert "usb: cdns3: core: quit if it uses role switch class" Roger Quadros
2020-11-24  6:43 ` Peter Chen [this message]
2020-11-24  9:39   ` Roger Quadros
2020-11-24  9:57     ` Peter Chen
2020-11-24 10:33       ` Roger Quadros
2020-11-24 11:00         ` Heikki Krogerus
2020-11-24 11:47         ` Peter Chen
2020-11-24 12:22           ` Roger Quadros
2020-11-25  0:36             ` Peter Chen
2020-11-25  9:52               ` Roger Quadros
2020-11-25 10:14                 ` Pawel Laszczak

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=20201124064242.GA32310@b29397-desktop \
    --to=peter.chen@nxp.com \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=pawell@cadence.com \
    --cc=rogerq@ti.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