linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator: use consumer->supply_name in debugfs/regulator_summary
@ 2020-04-04  0:11 Michał Mirosław
  2020-04-15 16:28 ` Dmitry Osipenko
  0 siblings, 1 reply; 2+ messages in thread
From: Michał Mirosław @ 2020-04-04  0:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Liam Girdwood, Mark Brown,
	open list:VOLTAGE AND CURRENT REGULATOR FRAMEWORK

Make it easier to identify regulator consumers when consumer device
uses more than one supply.

Before:

  regulator                      ena use open bypass voltage current min     max
 -----------------------------------------------------------------------------------
  regulator-dummy                  1   0    2      0     0mV     0mA 0mV     0mV
     1-0010                                                          0mV     0mV
     1-0010                                                          0mV     0mV

After:

  regulator                      ena use open bypass voltage current min     max
 -----------------------------------------------------------------------------------
  regulator-dummy                  1   0    2      0     0mV     0mA 0mV     0mV
     1-0010-vccio                                                    0mV     0mV
     1-0010-vcc33                                                    0mV     0mV

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
 drivers/regulator/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index c340505150b6..ad143004c32b 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -5496,6 +5496,7 @@ static void regulator_summary_show_subtree(struct seq_file *s,
 		seq_printf(s, "%*s%-*s ",
 			   (level + 1) * 3 + 1, "",
 			   30 - (level + 1) * 3,
+			   consumer->supply_name ? consumer->supply_name :
 			   consumer->dev ? dev_name(consumer->dev) : "deviceless");
 
 		switch (rdev->desc->type) {
-- 
2.20.1


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

* Re: [PATCH] regulator: use consumer->supply_name in debugfs/regulator_summary
  2020-04-04  0:11 [PATCH] regulator: use consumer->supply_name in debugfs/regulator_summary Michał Mirosław
@ 2020-04-15 16:28 ` Dmitry Osipenko
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Osipenko @ 2020-04-15 16:28 UTC (permalink / raw)
  To: Michał Mirosław, Liam Girdwood, Mark Brown; +Cc: linux-kernel

04.04.2020 03:11, Michał Mirosław пишет:
> Make it easier to identify regulator consumers when consumer device
> uses more than one supply.
> 
> Before:
> 
>   regulator                      ena use open bypass voltage current min     max
>  -----------------------------------------------------------------------------------
>   regulator-dummy                  1   0    2      0     0mV     0mA 0mV     0mV
>      1-0010                                                          0mV     0mV
>      1-0010                                                          0mV     0mV
> 
> After:
> 
>   regulator                      ena use open bypass voltage current min     max
>  -----------------------------------------------------------------------------------
>   regulator-dummy                  1   0    2      0     0mV     0mA 0mV     0mV
>      1-0010-vccio                                                    0mV     0mV
>      1-0010-vcc33                                                    0mV     0mV
> 
> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
> ---
>  drivers/regulator/core.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
> index c340505150b6..ad143004c32b 100644
> --- a/drivers/regulator/core.c
> +++ b/drivers/regulator/core.c
> @@ -5496,6 +5496,7 @@ static void regulator_summary_show_subtree(struct seq_file *s,
>  		seq_printf(s, "%*s%-*s ",
>  			   (level + 1) * 3 + 1, "",
>  			   30 - (level + 1) * 3,
> +			   consumer->supply_name ? consumer->supply_name :
>  			   consumer->dev ? dev_name(consumer->dev) : "deviceless");
>  
>  		switch (rdev->desc->type) {
> 

Hello Michał,

This is a very nice improvement, I like it!

Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Tested-by: Dmitry Osipenko <digetx@gmail.com>

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

end of thread, other threads:[~2020-04-15 16:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-04  0:11 [PATCH] regulator: use consumer->supply_name in debugfs/regulator_summary Michał Mirosław
2020-04-15 16:28 ` Dmitry Osipenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).