[PATCH v1] regulator: core: Convert warning to debug print

From: Ninad Palsule
Date: Thu Oct 12 2023 - 13:42:49 EST


There are some boards without the vcc regulators for eeprom or other
devices. In such cases, we should not see the following warning and
this confuses the user. We want to see this only when it is compiled
with CONFIG_REGULATOR_DEBUG option.

[0.747347] at24 6-0055: supply vcc not found, using dummy regulator
[0.752877] pca953x 6-0074: supply vcc not found, using dummy regulator

Signed-off-by: Ninad Palsule <ninad@xxxxxxxxxxxxx>
---
drivers/regulator/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index d8e1caaf207e..7d2e2495234e 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2204,7 +2204,7 @@ struct regulator *_regulator_get(struct device *dev, const char *id,
* enabled, even if it isn't hooked up, and just
* provide a dummy.
*/
- dev_warn(dev, "supply %s not found, using dummy regulator\n", id);
+ dev_dbg(dev, "supply %s not found, using dummy regulator\n", id);
rdev = dummy_regulator_rdev;
get_device(&rdev->dev);
break;
--
2.39.2