* [PATCH] regulator: core: silence warning: "VDD1: ramp_delay not set"
@ 2016-10-27 12:31 H. Nikolaus Schaller
2016-10-27 17:41 ` Matthias Kaehlcke
0 siblings, 1 reply; 4+ messages in thread
From: H. Nikolaus Schaller @ 2016-10-27 12:31 UTC (permalink / raw)
To: Matthias Kaehlcke
Cc: linux-kernel, Mark Brown, letux-kernel, H. Nikolaus Schaller
commit 73e705bf81ce ("regulator: core: Add set_voltage_time op")
introduced a new rdev_warn() if the ramp_delay is 0.
Apparently, on omap3/twl4030 platforms with dynamic voltage
management this results in non-ending spurious messages like
[ 511.143066] VDD1: ramp_delay not set
[ 511.662322] VDD1: ramp_delay not set
[ 513.903625] VDD1: ramp_delay not set
[ 514.222198] VDD1: ramp_delay not set
[ 517.062835] VDD1: ramp_delay not set
[ 517.382568] VDD1: ramp_delay not set
[ 520.142791] VDD1: ramp_delay not set
[ 520.502593] VDD1: ramp_delay not set
[ 523.062896] VDD1: ramp_delay not set
[ 523.362701] VDD1: ramp_delay not set
[ 526.143035] VDD1: ramp_delay not set
I have observed this on GTA04 while it is reported to occur on
N900 as well: https://bugzilla.kernel.org/show_bug.cgi?id=178371
This patch makes the warning appear only in debugging mode.
Signed-off-by: H. Nikolaus Schaller <hns@goldelico.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 67426c0..5c1519b 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2754,7 +2754,7 @@ static int _regulator_set_voltage_time(struct regulator_dev *rdev,
ramp_delay = rdev->desc->ramp_delay;
if (ramp_delay == 0) {
- rdev_warn(rdev, "ramp_delay not set\n");
+ rdev_dbg(rdev, "ramp_delay not set\n");
return 0;
}
--
2.7.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] regulator: core: silence warning: "VDD1: ramp_delay not set"
2016-10-27 12:31 [PATCH] regulator: core: silence warning: "VDD1: ramp_delay not set" H. Nikolaus Schaller
@ 2016-10-27 17:41 ` Matthias Kaehlcke
2016-10-27 17:45 ` H. Nikolaus Schaller
0 siblings, 1 reply; 4+ messages in thread
From: Matthias Kaehlcke @ 2016-10-27 17:41 UTC (permalink / raw)
To: H. Nikolaus Schaller; +Cc: linux-kernel, Mark Brown, letux-kernel
El Thu, Oct 27, 2016 at 02:31:39PM +0200 H. Nikolaus Schaller ha dit:
> commit 73e705bf81ce ("regulator: core: Add set_voltage_time op")
>
> introduced a new rdev_warn() if the ramp_delay is 0.
>
> Apparently, on omap3/twl4030 platforms with dynamic voltage
> management this results in non-ending spurious messages like
>
> [ 511.143066] VDD1: ramp_delay not set
> [ 511.662322] VDD1: ramp_delay not set
> [ 513.903625] VDD1: ramp_delay not set
> [ 514.222198] VDD1: ramp_delay not set
> [ 517.062835] VDD1: ramp_delay not set
> [ 517.382568] VDD1: ramp_delay not set
> [ 520.142791] VDD1: ramp_delay not set
> [ 520.502593] VDD1: ramp_delay not set
> [ 523.062896] VDD1: ramp_delay not set
> [ 523.362701] VDD1: ramp_delay not set
> [ 526.143035] VDD1: ramp_delay not set
>
> I have observed this on GTA04 while it is reported to occur on
> N900 as well: https://bugzilla.kernel.org/show_bug.cgi?id=178371
>
> This patch makes the warning appear only in debugging mode.
>
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.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 67426c0..5c1519b 100644
> --- a/drivers/regulator/core.c
> +++ b/drivers/regulator/core.c
> @@ -2754,7 +2754,7 @@ static int _regulator_set_voltage_time(struct regulator_dev *rdev,
> ramp_delay = rdev->desc->ramp_delay;
>
> if (ramp_delay == 0) {
> - rdev_warn(rdev, "ramp_delay not set\n");
> + rdev_dbg(rdev, "ramp_delay not set\n");
> return 0;
> }
Sorry about that, I didn't run into this since in my tests ramp_delay
was set :(
Calling _regulator_set_voltage_time() with ramp_delay being zero is
a common case, I think the message should be removed completely.
Thanks
Matthias
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] regulator: core: silence warning: "VDD1: ramp_delay not set"
2016-10-27 17:41 ` Matthias Kaehlcke
@ 2016-10-27 17:45 ` H. Nikolaus Schaller
2016-10-27 18:06 ` Matthias Kaehlcke
0 siblings, 1 reply; 4+ messages in thread
From: H. Nikolaus Schaller @ 2016-10-27 17:45 UTC (permalink / raw)
To: Matthias Kaehlcke; +Cc: linux-kernel, Mark Brown, letux-kernel
Hi,
> Am 27.10.2016 um 19:41 schrieb Matthias Kaehlcke <mka@chromium.org>:
>
> El Thu, Oct 27, 2016 at 02:31:39PM +0200 H. Nikolaus Schaller ha dit:
>
>> commit 73e705bf81ce ("regulator: core: Add set_voltage_time op")
>>
>> introduced a new rdev_warn() if the ramp_delay is 0.
>>
>> Apparently, on omap3/twl4030 platforms with dynamic voltage
>> management this results in non-ending spurious messages like
>>
>> [ 511.143066] VDD1: ramp_delay not set
>> [ 511.662322] VDD1: ramp_delay not set
>> [ 513.903625] VDD1: ramp_delay not set
>> [ 514.222198] VDD1: ramp_delay not set
>> [ 517.062835] VDD1: ramp_delay not set
>> [ 517.382568] VDD1: ramp_delay not set
>> [ 520.142791] VDD1: ramp_delay not set
>> [ 520.502593] VDD1: ramp_delay not set
>> [ 523.062896] VDD1: ramp_delay not set
>> [ 523.362701] VDD1: ramp_delay not set
>> [ 526.143035] VDD1: ramp_delay not set
>>
>> I have observed this on GTA04 while it is reported to occur on
>> N900 as well: https://bugzilla.kernel.org/show_bug.cgi?id=178371
>>
>> This patch makes the warning appear only in debugging mode.
>>
>> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.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 67426c0..5c1519b 100644
>> --- a/drivers/regulator/core.c
>> +++ b/drivers/regulator/core.c
>> @@ -2754,7 +2754,7 @@ static int _regulator_set_voltage_time(struct regulator_dev *rdev,
>> ramp_delay = rdev->desc->ramp_delay;
>>
>> if (ramp_delay == 0) {
>> - rdev_warn(rdev, "ramp_delay not set\n");
>> + rdev_dbg(rdev, "ramp_delay not set\n");
>> return 0;
>> }
>
> Sorry about that, I didn't run into this since in my tests ramp_delay
> was set :(
It may be that we have a rare exception. I didn't see it for example
on OMAP5 based boards.
>
> Calling _regulator_set_voltage_time() with ramp_delay being zero is
> a common case, I think the message should be removed completely.
I'd have no problem if it is a debug feature, that is why I proposed
to not completely remove it unconditionally.
BR,
Nikolaus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] regulator: core: silence warning: "VDD1: ramp_delay not set"
2016-10-27 17:45 ` H. Nikolaus Schaller
@ 2016-10-27 18:06 ` Matthias Kaehlcke
0 siblings, 0 replies; 4+ messages in thread
From: Matthias Kaehlcke @ 2016-10-27 18:06 UTC (permalink / raw)
To: H. Nikolaus Schaller; +Cc: linux-kernel, Mark Brown, letux-kernel
Hi,
El Thu, Oct 27, 2016 at 07:45:32PM +0200 H. Nikolaus Schaller ha dit:
> > Am 27.10.2016 um 19:41 schrieb Matthias Kaehlcke <mka@chromium.org>:
> >
> > El Thu, Oct 27, 2016 at 02:31:39PM +0200 H. Nikolaus Schaller ha dit:
> >
> >> commit 73e705bf81ce ("regulator: core: Add set_voltage_time op")
> >>
> >> introduced a new rdev_warn() if the ramp_delay is 0.
> >>
> >> Apparently, on omap3/twl4030 platforms with dynamic voltage
> >> management this results in non-ending spurious messages like
> >>
> >> [ 511.143066] VDD1: ramp_delay not set
> >> [ 511.662322] VDD1: ramp_delay not set
> >> [ 513.903625] VDD1: ramp_delay not set
> >> [ 514.222198] VDD1: ramp_delay not set
> >> [ 517.062835] VDD1: ramp_delay not set
> >> [ 517.382568] VDD1: ramp_delay not set
> >> [ 520.142791] VDD1: ramp_delay not set
> >> [ 520.502593] VDD1: ramp_delay not set
> >> [ 523.062896] VDD1: ramp_delay not set
> >> [ 523.362701] VDD1: ramp_delay not set
> >> [ 526.143035] VDD1: ramp_delay not set
> >>
> >> I have observed this on GTA04 while it is reported to occur on
> >> N900 as well: https://bugzilla.kernel.org/show_bug.cgi?id=178371
> >>
> >> This patch makes the warning appear only in debugging mode.
> >>
> >> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.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 67426c0..5c1519b 100644
> >> --- a/drivers/regulator/core.c
> >> +++ b/drivers/regulator/core.c
> >> @@ -2754,7 +2754,7 @@ static int _regulator_set_voltage_time(struct regulator_dev *rdev,
> >> ramp_delay = rdev->desc->ramp_delay;
> >>
> >> if (ramp_delay == 0) {
> >> - rdev_warn(rdev, "ramp_delay not set\n");
> >> + rdev_dbg(rdev, "ramp_delay not set\n");
> >> return 0;
> >> }
> >
> > Sorry about that, I didn't run into this since in my tests ramp_delay
> > was set :(
>
> It may be that we have a rare exception. I didn't see it for example
> on OMAP5 based boards.
>
> >
> > Calling _regulator_set_voltage_time() with ramp_delay being zero is
> > a common case, I think the message should be removed completely.
>
> I'd have no problem if it is a debug feature, that is why I proposed
> to not completely remove it unconditionally.
It shouldn't have been added in the first place, it stems from code
that incorrectly assumes that the code path is only executed when
ramp_delay is set. I removed the message from that code
(d89564efe79419a093e966a959bf5ba2c94e693f "regulator: core: Don't skip
set_voltage_time when ramp delay disabled"), but missed to remove/not
add it in this function.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-10-27 18:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-27 12:31 [PATCH] regulator: core: silence warning: "VDD1: ramp_delay not set" H. Nikolaus Schaller
2016-10-27 17:41 ` Matthias Kaehlcke
2016-10-27 17:45 ` H. Nikolaus Schaller
2016-10-27 18:06 ` Matthias Kaehlcke
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).