All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@baylibre.com>
To: Marek Vasut <marex@denx.de>, u-boot@lists.denx.de
Cc: Marek Vasut <marex@denx.de>, Alice Guo <alice.guo@nxp.com>,
	Fabio Estevam <festevam@gmail.com>,
	Mathieu Othacehe <othacehe@gnu.org>, Peng Fan <peng.fan@nxp.com>,
	Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH 2/2] usb: ehci-mx6: Use regulator_set_enable_if_allowed
Date: Wed, 08 Jan 2025 09:20:45 +0100	[thread overview]
Message-ID: <8734htd8de.fsf@baylibre.com> (raw)
In-Reply-To: <20250107225616.195878-2-marex@denx.de>

Hi Marek,

Thank you for the patch.

On mar., janv. 07, 2025 at 23:56, Marek Vasut <marex@denx.de> wrote:

> With the commit 4fcba5d556b4 ("regulator: implement basic reference
> counter") the return value of regulator_set_enable may be EALREADY or
> EBUSY for fixed/gpio regulators.
>
> Change to use the more relaxed regulator_set_enable_if_allowed to
> continue if regulator already was enabled or disabled.
>
> Based on 335799b7252a ("usb: dwc2: Use regulator_set_enable_if_allowed")
>
> Signed-off-by: Marek Vasut <marex@denx.de>

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>

> ---
> Cc: Alice Guo <alice.guo@nxp.com>
> Cc: Fabio Estevam <festevam@gmail.com>
> Cc: Mathieu Othacehe <othacehe@gnu.org>
> Cc: Mattijs Korpershoek <mkorpershoek@baylibre.com>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Tom Rini <trini@konsulko.com>
> Cc: u-boot@lists.denx.de
> ---
>  drivers/usb/host/ehci-mx6.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
> index a93fa5d5455..a8748cef7ad 100644
> --- a/drivers/usb/host/ehci-mx6.c
> +++ b/drivers/usb/host/ehci-mx6.c
> @@ -479,9 +479,9 @@ static int mx6_init_after_reset(struct ehci_ctrl *dev)
>  #if CONFIG_IS_ENABLED(DM_REGULATOR)
>  	if (priv->vbus_supply) {
>  		int ret;
> -		ret = regulator_set_enable(priv->vbus_supply,
> -					   (type == USB_INIT_DEVICE) ?
> -					   false : true);
> +		ret = regulator_set_enable_if_allowed(priv->vbus_supply,
> +						      (type == USB_INIT_DEVICE) ?
> +						      false : true);
>  		if (ret && ret != -ENOSYS) {
>  			printf("Error enabling VBUS supply (ret=%i)\n", ret);
>  			return ret;
> -- 
> 2.45.2

  parent reply	other threads:[~2025-01-08  8:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-07 22:56 [PATCH 1/2] usb: ehci-mx5: Use regulator_set_enable_if_allowed Marek Vasut
2025-01-07 22:56 ` [PATCH 2/2] usb: ehci-mx6: " Marek Vasut
2025-01-08  1:20   ` Fabio Estevam
2025-01-08  8:20   ` Mattijs Korpershoek [this message]
2025-01-08  1:19 ` [PATCH 1/2] usb: ehci-mx5: " Fabio Estevam
2025-01-08  8:20 ` Mattijs Korpershoek

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=8734htd8de.fsf@baylibre.com \
    --to=mkorpershoek@baylibre.com \
    --cc=alice.guo@nxp.com \
    --cc=festevam@gmail.com \
    --cc=marex@denx.de \
    --cc=othacehe@gnu.org \
    --cc=peng.fan@nxp.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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.