From: hdegoede@redhat.com (Hans de Goede)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/7] phy-sun4i-usb: Warn when external vbus is detected
Date: Sun, 14 Aug 2016 20:27:59 +0200 [thread overview]
Message-ID: <1471199281-5494-6-git-send-email-hdegoede@redhat.com> (raw)
In-Reply-To: <1471199281-5494-1-git-send-email-hdegoede@redhat.com>
Warn when external vbus is detected when we're trying to enable our
own vbus.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/phy/phy-sun4i-usb.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c
index fd66991..ffe599e 100644
--- a/drivers/phy/phy-sun4i-usb.c
+++ b/drivers/phy/phy-sun4i-usb.c
@@ -389,8 +389,10 @@ static int sun4i_usb_phy_power_on(struct phy *_phy)
/* For phy0 only turn on Vbus if we don't have an ext. Vbus */
if (phy->index == 0 && sun4i_usb_phy0_have_vbus_det(data) &&
- data->vbus_det)
+ data->vbus_det) {
+ dev_warn(&_phy->dev, "External vbus detected, not enabling our own vbus\n");
return 0;
+ }
ret = regulator_enable(phy->vbus);
if (ret)
--
2.7.4
next prev parent reply other threads:[~2016-08-14 18:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-14 18:27 [PATCH 0/7] musb: sunxi: Add support for run-time changing dr-mode through sysfs Hans de Goede
2016-08-14 18:27 ` [PATCH 1/7] phy-sun4i-usb: Use bool where appropriate Hans de Goede
2016-08-14 18:27 ` [PATCH 2/7] phy-sun4i-usb: Refactor forced session ending Hans de Goede
2016-08-14 18:27 ` [PATCH 3/7] phy-sun4i-usb: Simplify missing dr_mode handling Hans de Goede
2016-08-14 18:27 ` [PATCH 4/7] phy-sun4i-usb: Add support for phy_set_mode Hans de Goede
2016-08-14 18:27 ` Hans de Goede [this message]
2016-08-14 18:28 ` [PATCH 6/7] musb: sunxi: Always register both host and udc when build with dual-role support Hans de Goede
2016-08-14 18:28 ` [PATCH 7/7] musb: sunxi: Add support for platform_set_mode Hans de Goede
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=1471199281-5494-6-git-send-email-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).