From: Peter Chen <peter.chen@nxp.com>
To: balbi@kernel.org
Cc: linux-usb@vger.kernel.org, linux-imx@nxp.com, pawell@cadence.com,
rogerq@ti.com, gregkh@linuxfoundation.org, jun.li@nxp.com,
Peter Chen <peter.chen@nxp.com>
Subject: [PATCH 1/5] usb: cdns3: core: quit if it uses role switch class
Date: Tue, 1 Sep 2020 10:33:48 +0800 [thread overview]
Message-ID: <20200901023352.25552-2-peter.chen@nxp.com> (raw)
In-Reply-To: <20200901023352.25552-1-peter.chen@nxp.com>
If the board uses role switch class for switching the role, it should
not depends on SoC OTG hardware siginal any more, so quit early.
Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
drivers/usb/cdns3/core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/usb/cdns3/core.c b/drivers/usb/cdns3/core.c
index faee5ec5fc20..96c2da4e20c5 100644
--- a/drivers/usb/cdns3/core.c
+++ b/drivers/usb/cdns3/core.c
@@ -280,6 +280,10 @@ 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;
--
2.17.1
next prev parent reply other threads:[~2020-09-01 2:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-01 2:33 [PATCH 0/5] usb: cdns3: misc improvements Peter Chen
2020-09-01 2:33 ` Peter Chen [this message]
2020-11-23 11:17 ` [PATCH 1/5] usb: cdns3: core: quit if it uses role switch class Roger Quadros
2020-09-01 2:33 ` [PATCH 2/5] usb: cdns3: gadget: set fast access bit Peter Chen
2020-09-01 2:33 ` [PATCH 3/5] usb: cdns3: gadget: clear the interrupt status when disconnect the host Peter Chen
2020-09-01 2:33 ` [PATCH 4/5] usb: cdns3: drd: call PHY .set_mode accordingly Peter Chen
2020-09-01 2:33 ` [PATCH 5/5] usb: cdns3: gadget: move wait configuration operation Peter Chen
2020-09-14 1:26 ` [PATCH 0/5] usb: cdns3: misc improvements 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=20200901023352.25552-2-peter.chen@nxp.com \
--to=peter.chen@nxp.com \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jun.li@nxp.com \
--cc=linux-imx@nxp.com \
--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;
as well as URLs for NNTP newsgroup(s).