mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] mci: add hint on how to resolve warning about vmmc-supply
@ 2022-07-24  6:39 Ahmad Fatoum
  2022-08-09  5:24 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2022-07-24  6:39 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

For legacy reasons, we do not fail the MCI registration when a regulator
can't be immediately requested, but we at least print a warning when
this happens. Add a comment guiding the user into how to resolve the
warning.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/mci/mci-core.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index b8f71e15986e..8c08a4f61f63 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -1941,6 +1941,16 @@ int mci_register(struct mci_host *host)
 
 	host->supply = regulator_get(hw_dev, "vmmc");
 	if (IS_ERR(host->supply)) {
+		/*
+		 * If you know your regulator to be always online on boot, but
+		 * can't easily add a barebox driver for it, you may use
+		 * barebox,allow-dummy-supply in your board's regulator device
+		 * tree node to side step this warning.
+		 *
+		 * If you run into this warning, because your regulator driver
+		 * hasn't probed the device yet, consider enabling deep probe
+		 * for your board, to probe dependencies on demand.
+		 */
 		dev_warn(hw_dev, "Failed to get 'vmmc' regulator (ignored).\n");
 		host->supply = NULL;
 	}
-- 
2.30.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mci: add hint on how to resolve warning about vmmc-supply
  2022-07-24  6:39 [PATCH] mci: add hint on how to resolve warning about vmmc-supply Ahmad Fatoum
@ 2022-08-09  5:24 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2022-08-09  5:24 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Sun, Jul 24, 2022 at 08:39:20AM +0200, Ahmad Fatoum wrote:
> For legacy reasons, we do not fail the MCI registration when a regulator
> can't be immediately requested, but we at least print a warning when
> this happens. Add a comment guiding the user into how to resolve the
> warning.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  drivers/mci/mci-core.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)

Applied, thanks

Sascha

> 
> diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
> index b8f71e15986e..8c08a4f61f63 100644
> --- a/drivers/mci/mci-core.c
> +++ b/drivers/mci/mci-core.c
> @@ -1941,6 +1941,16 @@ int mci_register(struct mci_host *host)
>  
>  	host->supply = regulator_get(hw_dev, "vmmc");
>  	if (IS_ERR(host->supply)) {
> +		/*
> +		 * If you know your regulator to be always online on boot, but
> +		 * can't easily add a barebox driver for it, you may use
> +		 * barebox,allow-dummy-supply in your board's regulator device
> +		 * tree node to side step this warning.
> +		 *
> +		 * If you run into this warning, because your regulator driver
> +		 * hasn't probed the device yet, consider enabling deep probe
> +		 * for your board, to probe dependencies on demand.
> +		 */
>  		dev_warn(hw_dev, "Failed to get 'vmmc' regulator (ignored).\n");
>  		host->supply = NULL;
>  	}
> -- 
> 2.30.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-09  5:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-24  6:39 [PATCH] mci: add hint on how to resolve warning about vmmc-supply Ahmad Fatoum
2022-08-09  5:24 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox