From: Chunfeng Yun <chunfeng.yun@mediatek.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Felipe Balbi <felipe.balbi@linux.intel.com>,
Matthias Brugger <matthias.bgg@gmail.com>
Cc: Chunfeng Yun <chunfeng.yun@mediatek.com>,
linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: [PATCH 02/11] usb: mtu3: print useful information also for device and host modes
Date: Wed, 6 Mar 2019 19:46:14 +0800 [thread overview]
Message-ID: <1551872783-13707-3-git-send-email-chunfeng.yun@mediatek.com> (raw)
In-Reply-To: <1551872783-13707-1-git-send-email-chunfeng.yun@mediatek.com>
Print useful information not only dual-role mode but also
device mode and host mode.
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
drivers/usb/mtu3/mtu3_plat.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/mtu3/mtu3_plat.c b/drivers/usb/mtu3/mtu3_plat.c
index dee31d5eefe1..3a4a80f15957 100644
--- a/drivers/usb/mtu3/mtu3_plat.c
+++ b/drivers/usb/mtu3/mtu3_plat.c
@@ -286,7 +286,7 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
ssusb->dr_mode = USB_DR_MODE_OTG;
if (ssusb->dr_mode == USB_DR_MODE_PERIPHERAL)
- return 0;
+ goto out;
/* if host role is supported */
ret = ssusb_wakeup_of_property_parse(ssusb, node);
@@ -307,7 +307,7 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
otg_sx->vbus = vbus;
if (ssusb->dr_mode == USB_DR_MODE_HOST)
- return 0;
+ goto out;
/* if dual-role mode is supported */
otg_sx->is_u3_drd = of_property_read_bool(node, "mediatek,usb3-drd");
@@ -322,6 +322,7 @@ static int get_ssusb_rscs(struct platform_device *pdev, struct ssusb_mtk *ssusb)
}
}
+out:
dev_info(dev, "dr_mode: %d, is_u3_dr: %d, u3p_dis_msk: %x, drd: %s\n",
ssusb->dr_mode, otg_sx->is_u3_drd, ssusb->u3p_dis_msk,
otg_sx->manual_drd_enabled ? "manual" : "auto");
--
2.20.1
next prev parent reply other threads:[~2019-03-06 11:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-06 11:46 [PATCH 00/11] add debugfs consumers, tracepoints and rebuild QMU Chunfeng Yun
2019-03-06 11:46 ` [PATCH 01/11] usb: mtu3: check return value of devm_extcon_register_notifier() Chunfeng Yun
2019-03-06 11:46 ` Chunfeng Yun [this message]
2019-03-06 11:46 ` [PATCH 03/11] usb: mtu3: remove unnecessary local variable @req Chunfeng Yun
2019-03-06 11:46 ` [PATCH 04/11] usb: mtu3: rebuild the code of getting vbus regulator Chunfeng Yun
2019-03-06 11:46 ` [PATCH 05/11] usb: mtu3: fix transfer error of USB3 Gen2 isoc Chunfeng Yun
2019-03-06 11:46 ` [PATCH 06/11] usb: mtu3: rebuild qmu_gpd struct to prepare to support new QMU format Chunfeng Yun
2019-03-06 11:46 ` [PATCH 07/11] usb: mtu3: supports " Chunfeng Yun
2019-03-06 11:46 ` [PATCH 08/11] usb: mtu3: add debugfs interface files Chunfeng Yun
2019-03-06 11:46 ` [PATCH 09/11] usb: mtu3: move vbus and mode debugfs interfaces into mtu3_debugfs.c Chunfeng Yun
2019-03-06 11:46 ` [PATCH 10/11] usb: mtu3: add tracepoints to help debug Chunfeng Yun
2019-03-06 11:46 ` [PATCH 11/11] usb: mtu3: add a function to switch mailbox state to string Chunfeng Yun
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=1551872783-13707-3-git-send-email-chunfeng.yun@mediatek.com \
--to=chunfeng.yun@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=felipe.balbi@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=matthias.bgg@gmail.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).