From: icenowy@aosc.xyz (Icenowy Zheng)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 5/7] phy-sun4i-usb: Warn when external vbus is detected
Date: Sun, 21 Aug 2016 22:32:09 +0800 [thread overview]
Message-ID: <27711471789929@web21g.yandex.ru> (raw)
In-Reply-To: <1471781799-10457-5-git-send-email-hdegoede@redhat.com>
21.08.2016, 20:22, "Hans de Goede" <hdegoede@redhat.com>:
> Warn when external vbus is detected when we're trying to enable our
> own vbus.
Will it lead to a dmesg flood if a not-well-connected USB OTG Charging Hub
is present?
>
> 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.7.4
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Icenowy Zheng <icenowy@aosc.xyz>
To: Hans de Goede <hdegoede@redhat.com>, Bin Liu <b-liu@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kishon Vijay Abraham I <kishon@ti.com>
Cc: devicetree <devicetree@vger.kernel.org>,
Chen-Yu Tsai <wens@csie.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
Maxime Ripard <maxime.ripard@free-electrons.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3 5/7] phy-sun4i-usb: Warn when external vbus is detected
Date: Sun, 21 Aug 2016 22:32:09 +0800 [thread overview]
Message-ID: <27711471789929@web21g.yandex.ru> (raw)
In-Reply-To: <1471781799-10457-5-git-send-email-hdegoede@redhat.com>
21.08.2016, 20:22, "Hans de Goede" <hdegoede@redhat.com>:
> Warn when external vbus is detected when we're trying to enable our
> own vbus.
Will it lead to a dmesg flood if a not-well-connected USB OTG Charging Hub
is present?
>
> 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.7.4
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2016-08-21 14:32 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-21 12:16 [PATCH v3 1/7] phy-sun4i-usb: Use bool where appropriate Hans de Goede
2016-08-21 12:16 ` Hans de Goede
2016-08-21 12:16 ` [PATCH v3 2/7] phy-sun4i-usb: Refactor forced session ending Hans de Goede
2016-08-21 12:16 ` Hans de Goede
2016-08-21 12:16 ` [PATCH v3 3/7] phy-sun4i-usb: Simplify missing dr_mode handling Hans de Goede
2016-08-21 12:16 ` Hans de Goede
2016-08-21 12:16 ` [PATCH v3 4/7] phy-sun4i-usb: Add support for phy_set_mode Hans de Goede
2016-08-21 12:16 ` Hans de Goede
2016-08-21 12:16 ` [PATCH v3 5/7] phy-sun4i-usb: Warn when external vbus is detected Hans de Goede
2016-08-21 12:16 ` Hans de Goede
2016-08-21 14:32 ` Icenowy Zheng [this message]
2016-08-21 14:32 ` Icenowy Zheng
2016-08-21 15:20 ` Hans de Goede
2016-08-21 15:20 ` Hans de Goede
2016-08-21 12:16 ` [PATCH v3 6/7] phy-sun4i-usb: Add "allwinner, usb0-usb-a-connector" dt property Hans de Goede
2016-08-21 12:16 ` [PATCH v3 6/7] phy-sun4i-usb: Add "allwinner,usb0-usb-a-connector" " Hans de Goede
2016-08-23 18:00 ` Rob Herring
2016-08-23 18:00 ` Rob Herring
2016-08-23 18:26 ` Hans de Goede
2016-08-23 18:26 ` Hans de Goede
2016-08-21 12:16 ` [PATCH v3 7/7] musb: sunxi: Add support for platform_set_mode Hans de Goede
2016-08-21 12:16 ` 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=27711471789929@web21g.yandex.ru \
--to=icenowy@aosc.xyz \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.