public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Stefan Eichenberger <stefan.eichenberger@toradex.com>
Cc: Francesco Dolcini <francesco@dolcini.it>,
	Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Felipe Balbi <balbi@ti.com>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Francesco Dolcini <francesco.dolcini@toradex.com>
Subject: Re: [PATCH v1] USB: dwc3: only call usb_phy_set_suspend in suspend/resume
Date: Mon, 6 Nov 2023 09:20:48 +0100	[thread overview]
Message-ID: <ZUih4BJLkslLIMx5@hovoldconsulting.com> (raw)
In-Reply-To: <GV0P278MB0589921FFF5487D2F94D3FF2E8A4A@GV0P278MB0589.CHEP278.PROD.OUTLOOK.COM>

On Sat, Nov 04, 2023 at 11:51:22AM +0000, Stefan Eichenberger wrote:
> > From: Johan Hovold <johan@kernel.org>

> > When reviewing the driver I did find a bug in the xhci-plat driver which
> > is likely the cause for the imbalance you're seeing. I just sent a fix
> > here in case you want to give it a try:
> > 
> >         https://lore.kernel.org/lkml/20231103164323.14294-1-johan+linaro@kernel.org/
> 
> I tested it and it solves the issue we have. Thanks a lot for the fix!
> Before the use count for our regulator always went up to 2 and now it is
> 1 as expected.
> root@verdin-imx8mp-14773241:~# cat /sys/kernel/debug/regulator/CTRL_SLEEP_MOCI#/use_count
> 1
> 
> Also when going to suspend the regulator is turned off now. With the
> suspend patch applied from us the use count will be one more but
> everything still works as expected.

Thanks for testing.

> > But, also, why are you using legacy PHYs? Which platform is this for?
> 
> We have an external hub that we want to turn off when the system goes
> into suspend. For the i.MX8MM we use the phy-generic driver to achieve
> this. When I saw that the dwc3 driver would support the phy-generic via
> usb-phy, I thought we could use the same approach for the i.MX8MP and,
> in the future, the AM62. Maybe I misunderstood, would the right solution
> be to add a suspend function to the fsl,imx8mp-usb-phy driver and use
> vbus instead? But what would we do for the AM62, as it doesn't have a
> phy driver if I'm not mistaken.

That's not how the phy driver is supposed be used, and for on-board hubs
we now have:

	drivers/usb/misc/onboard_usb_hub.c

Have you tried using that one instead?

Johan

  reply	other threads:[~2023-11-06  8:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-03 10:22 [PATCH v1] USB: dwc3: only call usb_phy_set_suspend in suspend/resume Francesco Dolcini
2023-11-03 11:05 ` Greg Kroah-Hartman
2023-11-03 16:49 ` Johan Hovold
2023-11-04 11:51   ` Stefan Eichenberger
2023-11-06  8:20     ` Johan Hovold [this message]
2023-11-07  9:42       ` Stefan Eichenberger

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=ZUih4BJLkslLIMx5@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=balbi@ti.com \
    --cc=francesco.dolcini@toradex.com \
    --cc=francesco@dolcini.it \
    --cc=gregkh@linuxfoundation.org \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=stefan.eichenberger@toradex.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