mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1] regulator: core: Convert warning to debug print
@ 2023-10-12 17:42 Ninad Palsule
  2023-10-12 17:47 ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Ninad Palsule @ 2023-10-12 17:42 UTC (permalink / raw)
  To: joel, eajames, lgirdwood, broonie, linux-kernel, lakshmiy; +Cc: Ninad Palsule

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@linux.ibm.com>
---
 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


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

* Re: [PATCH v1] regulator: core: Convert warning to debug print
  2023-10-12 17:42 [PATCH v1] regulator: core: Convert warning to debug print Ninad Palsule
@ 2023-10-12 17:47 ` Mark Brown
  2023-10-12 21:45   ` Ninad Palsule
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2023-10-12 17:47 UTC (permalink / raw)
  To: Ninad Palsule; +Cc: joel, eajames, lgirdwood, linux-kernel, lakshmiy

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

On Thu, Oct 12, 2023 at 12:42:35PM -0500, Ninad Palsule wrote:
> 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

This is a warning saying that the firmware description for the system is
incomplete in case things go wrong later - it is vanishingly unlikely
that these devices actually do not require supplies, we'd probably have
heard about it if they did.  If a supply is not described properly we
may for example decide to power off what we think is an unused supply
with bad results.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v1] regulator: core: Convert warning to debug print
  2023-10-12 17:47 ` Mark Brown
@ 2023-10-12 21:45   ` Ninad Palsule
  2023-10-13 15:38     ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Ninad Palsule @ 2023-10-12 21:45 UTC (permalink / raw)
  To: Mark Brown; +Cc: joel, eajames, lgirdwood, linux-kernel, lakshmiy

Hello Mark,

Thanks for the review.

On 10/12/23 12:47, Mark Brown wrote:
> On Thu, Oct 12, 2023 at 12:42:35PM -0500, Ninad Palsule wrote:
>> 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
> This is a warning saying that the firmware description for the system is
> incomplete in case things go wrong later - it is vanishingly unlikely
> that these devices actually do not require supplies, we'd probably have
> heard about it if they did.  If a supply is not described properly we
> may for example decide to power off what we think is an unused supply
> with bad results.

You are right there are regulators for these supplies but they are 
managed by the
hardware hence not added in the device tree. I checked dts/aspeed 
directory and
non of the machine has “vcc-supply” defined and lot of them use eeprom.
Also, I thought that this message is only useful in the lab to indicate 
developer
whether they missed the device tree definition or not but its not useful 
in the
field.  Hence proposed to put it under DEBUG.

Please let me know if I missed something.

Thanks!

~ Ninad



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

* Re: [PATCH v1] regulator: core: Convert warning to debug print
  2023-10-12 21:45   ` Ninad Palsule
@ 2023-10-13 15:38     ` Mark Brown
  2023-10-16 12:24       ` Ninad Palsule
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2023-10-13 15:38 UTC (permalink / raw)
  To: Ninad Palsule; +Cc: joel, eajames, lgirdwood, linux-kernel, lakshmiy

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

On Thu, Oct 12, 2023 at 04:45:48PM -0500, Ninad Palsule wrote:

> You are right there are regulators for these supplies but they are managed
> by the
> hardware hence not added in the device tree. I checked dts/aspeed directory
> and
> non of the machine has “vcc-supply” defined and lot of them use eeprom.

Fixed voltage regulators can be used for this.

> Also, I thought that this message is only useful in the lab to indicate
> developer
> whether they missed the device tree definition or not but its not useful in
> the
> field.  Hence proposed to put it under DEBUG.

The theory is that it shouldn't come up in the field since people see it
during development and fix things then, are people actually looking at
these logs?  I think my understanding was that they're mostly BMCs
people interacted with via a UI of some kind.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v1] regulator: core: Convert warning to debug print
  2023-10-13 15:38     ` Mark Brown
@ 2023-10-16 12:24       ` Ninad Palsule
  0 siblings, 0 replies; 5+ messages in thread
From: Ninad Palsule @ 2023-10-16 12:24 UTC (permalink / raw)
  To: Mark Brown; +Cc: joel, eajames, lgirdwood, linux-kernel, lakshmiy

Hello Mark,

On 10/13/23 10:38, Mark Brown wrote:
> On Thu, Oct 12, 2023 at 04:45:48PM -0500, Ninad Palsule wrote:
>
>> You are right there are regulators for these supplies but they are managed
>> by the
>> hardware hence not added in the device tree. I checked dts/aspeed directory
>> and
>> non of the machine has “vcc-supply” defined and lot of them use eeprom.
> Fixed voltage regulators can be used for this.
ok, So far we don't need it.
>
>> Also, I thought that this message is only useful in the lab to indicate
>> developer
>> whether they missed the device tree definition or not but its not useful in
>> the
>> field.  Hence proposed to put it under DEBUG.
> The theory is that it shouldn't come up in the field since people see it
> during development and fix things then, are people actually looking at
> these logs?  I think my understanding was that they're mostly BMCs
> people interacted with via a UI of some kind.

During testing people look at this logs. We will ignore this warning for 
now.

Thanks!

~Ninad


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

end of thread, other threads:[~2023-10-16 12:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-12 17:42 [PATCH v1] regulator: core: Convert warning to debug print Ninad Palsule
2023-10-12 17:47 ` Mark Brown
2023-10-12 21:45   ` Ninad Palsule
2023-10-13 15:38     ` Mark Brown
2023-10-16 12:24       ` Ninad Palsule

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

Powered by JetHome