* [PATCH 1/2] regulator: Don't add the function name to pr_fmt
@ 2012-02-09 13:42 Mark Brown
2012-02-09 13:42 ` [PATCH 2/2] regulator: Complain if a voltage range is specified but can't be used Mark Brown
2012-02-09 15:23 ` [PATCH 1/2] regulator: Don't add the function name to pr_fmt Liam Girdwood
0 siblings, 2 replies; 3+ messages in thread
From: Mark Brown @ 2012-02-09 13:42 UTC (permalink / raw)
To: Liam Girdwood; +Cc: linux-kernel, patches, Mark Brown
Liam pointed out via IM that since we now use the pure function name for
all regulator logging a lot of the messages such as those logging the
constraints are getting a bit noisy due to the implementation detail
that is the function name:
print_constraints: VDDARM: 1000 <--> 1300 mV at 1300 mV at 0 mA
In discussion it seemed like the best thing was to just drop the pr_fmt
and clarify individual log messages where there is an issue otherwise
we get into silly things like renaming the functions to suit the logging.
This is mostly an issue as we have a moderate amount of non-error logging
in the boot sequence to aid debug if something goes wrong since regulator
misconfiguration can kill the system pretty quickly.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/regulator/core.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 8057451..68acc2f 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -13,8 +13,6 @@
*
*/
-#define pr_fmt(fmt) "%s: " fmt, __func__
-
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/debugfs.h>
--
1.7.9.rc1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] regulator: Complain if a voltage range is specified but can't be used
2012-02-09 13:42 [PATCH 1/2] regulator: Don't add the function name to pr_fmt Mark Brown
@ 2012-02-09 13:42 ` Mark Brown
2012-02-09 15:23 ` [PATCH 1/2] regulator: Don't add the function name to pr_fmt Liam Girdwood
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2012-02-09 13:42 UTC (permalink / raw)
To: Liam Girdwood; +Cc: linux-kernel, patches, Mark Brown
It doesn't make much sense to specify a range of voltages consumers can
use if they haven't been given permission to change the voltage. Log if
this happens, probably the user forgot to specify CHANGE_VOLTAGE.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/regulator/core.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 68acc2f..5ba25c0 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -805,6 +805,11 @@ static void print_constraints(struct regulator_dev *rdev)
count += sprintf(buf + count, "standby");
rdev_info(rdev, "%s\n", buf);
+
+ if ((constraints->min_uV != constraints->max_uV) &&
+ !(constraints->valid_ops_mask & REGULATOR_CHANGE_VOLTAGE))
+ rdev_warn(rdev,
+ "Voltage range but no REGULATOR_CHANGE_VOLTAGE\n");
}
static int machine_constraints_voltage(struct regulator_dev *rdev,
--
1.7.9.rc1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] regulator: Don't add the function name to pr_fmt
2012-02-09 13:42 [PATCH 1/2] regulator: Don't add the function name to pr_fmt Mark Brown
2012-02-09 13:42 ` [PATCH 2/2] regulator: Complain if a voltage range is specified but can't be used Mark Brown
@ 2012-02-09 15:23 ` Liam Girdwood
1 sibling, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2012-02-09 15:23 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-kernel, patches
On Thu, 2012-02-09 at 13:42 +0000, Mark Brown wrote:
> Liam pointed out via IM that since we now use the pure function name for
> all regulator logging a lot of the messages such as those logging the
> constraints are getting a bit noisy due to the implementation detail
> that is the function name:
>
> print_constraints: VDDARM: 1000 <--> 1300 mV at 1300 mV at 0 mA
>
> In discussion it seemed like the best thing was to just drop the pr_fmt
> and clarify individual log messages where there is an issue otherwise
> we get into silly things like renaming the functions to suit the logging.
>
> This is mostly an issue as we have a moderate amount of non-error logging
> in the boot sequence to aid debug if something goes wrong since regulator
> misconfiguration can kill the system pretty quickly.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Both
Acked-by: Liam Girdwood <lrg@ti.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-02-09 15:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-09 13:42 [PATCH 1/2] regulator: Don't add the function name to pr_fmt Mark Brown
2012-02-09 13:42 ` [PATCH 2/2] regulator: Complain if a voltage range is specified but can't be used Mark Brown
2012-02-09 15:23 ` [PATCH 1/2] regulator: Don't add the function name to pr_fmt Liam Girdwood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox