From: hdegoede@redhat.com (Hans de Goede)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH resend 5/5] phy-sun4i-usb: Warn when external vbus is detected
Date: Wed, 7 Sep 2016 22:20:41 +0200 [thread overview]
Message-ID: <20160907202041.17656-6-hdegoede@redhat.com> (raw)
In-Reply-To: <20160907202041.17656-1-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>
---
Changes in v2:
-No changes
Changes in v3:
-No changes
---
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 af42f8d..03f030b 100644
--- a/drivers/phy/phy-sun4i-usb.c
+++ b/drivers/phy/phy-sun4i-usb.c
@@ -390,8 +390,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.9.3
prev parent reply other threads:[~2016-09-07 20:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-07 20:20 [PATCH resend 0/5] phy-sun4i-usb: Add support for phy_set_mode Hans de Goede
2016-09-07 20:20 ` [PATCH resend 1/5] phy-sun4i-usb: Use bool where appropriate Hans de Goede
2016-09-07 20:20 ` [PATCH resend 2/5] phy-sun4i-usb: Refactor forced session ending Hans de Goede
2016-09-07 20:20 ` [PATCH resend 3/5] phy-sun4i-usb: Simplify missing dr_mode handling Hans de Goede
2016-09-07 20:20 ` [PATCH resend 4/5] phy-sun4i-usb: Add support for phy_set_mode Hans de Goede
2016-09-07 20:20 ` Hans de Goede [this message]
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=20160907202041.17656-6-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).