linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: Kishon Vijay Abraham I <kishon@ti.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH] phy: renesas: rcar-gen3-usb2: fix imbalance powered flag
Date: Wed, 5 Jun 2019 15:08:10 +0200	[thread overview]
Message-ID: <CAMuHMdVHpOULpusZeOJvRs8OMoC2JopOqrK9Q8KeCxtyEbz0qA@mail.gmail.com> (raw)
In-Reply-To: <OSAPR01MB30897161EF40942B1E561232D8160@OSAPR01MB3089.jpnprd01.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 950 bytes --]

Hi Shimoda-san,

On Wed, Jun 5, 2019 at 2:12 PM Yoshihiro Shimoda
<yoshihiro.shimoda.uh@renesas.com> wrote:
> > From: Geert Uytterhoeven, Sent: Wednesday, June 5, 2019 6:25 PM
> <snip>
> > Thank you, this seems to fix the warning, so
> > Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Thank you for the testing!
>
> > However, the other imbalance (phy-ee080200.usb-phy.6 enabling its
> > regulator during each system resume phase, but never touching it
> > otherwise) is still present.
>
> Umm, since I'd like to investigate this,
> would you share your debug print patch?

Attached.

Thanks!

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

[-- Attachment #2: phy-rcar-gen3-usb2-debug.patch --]
[-- Type: text/x-patch, Size: 1080 bytes --]

diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
index dd2d7290cfade28d..1d7d28cf0a7730e2 100644
--- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
@@ -443,10 +443,13 @@ static int rcar_gen3_phy_usb2_power_on(struct phy *p)
 		goto out;
 
 	if (channel->vbus) {
+dev_info(&p->dev, "%s: Enabling regulator\n", __func__);
 		ret = regulator_enable(channel->vbus);
+dev_info(&p->dev, "%s: regulator_enable() returned %d\n", __func__, ret);
 		if (ret)
 			goto out;
 	}
+else dev_info(&p->dev, "%s: Not enabling regulator\n", __func__);
 
 	val = readl(usb2_base + USB2_USBCTR);
 	val |= USB2_USBCTR_PLL_RST;
@@ -473,7 +476,12 @@ static int rcar_gen3_phy_usb2_power_off(struct phy *p)
 		return 0;
 
 	if (channel->vbus)
+{
+dev_info(&p->dev, "%s: Disabling regulator\n", __func__);
 		ret = regulator_disable(channel->vbus);
+dev_info(&p->dev, "%s: regulator_disable() returned %d\n", __func__, ret);
+}
+else dev_info(&p->dev, "%s: Not disabling regulator\n", __func__);
 
 	return ret;
 }

  reply	other threads:[~2019-06-05 13:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-05  4:49 [PATCH] phy: renesas: rcar-gen3-usb2: fix imbalance powered flag Yoshihiro Shimoda
2019-06-05  9:25 ` Geert Uytterhoeven
2019-06-05 12:12   ` Yoshihiro Shimoda
2019-06-05 13:08     ` Geert Uytterhoeven [this message]
2019-06-07  9:00       ` Yoshihiro Shimoda

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=CAMuHMdVHpOULpusZeOJvRs8OMoC2JopOqrK9Q8KeCxtyEbz0qA@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=geert+renesas@glider.be \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.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).