New underflow of regulator enable count warnings in v5.0-rc1
Hi,
Looks like commit 5451781dadf8 ("regulator: core: Only count load for enabled consumers") started showing new warnings with v5.0-rc cycle:
regulator-dummy: Underflow of regulator enable count
I'm seeing this at least with my pwm-vibra test case:
# rumble-test /dev/input/by-path/platform-vibrator-event 0xffff pwm-vibrator vibrator: vibrator supply vcc not found, using dummy regulator input: pwm-vibrator as /devices/platform/vibrator/input/input4 regulator-dummy: Underflow of regulator enable count Upload rumble effect... id=0 regulator-dummy: Underflow of regulator enable count
Are these bogus warnings for dummy regulator or do we have real unpaired regulator calls or somewhere?
Regards,
Tony
Quoted 4 lines · Tony Lindgren
regulator-dummy: Underflow of regulator enable count
Are these bogus warnings for dummy regulator or do we have real unpaired regulator calls or somewhere?
Given that this is a new warning my first guess would be that it's legitimate...
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi,
Quoted 17 lines · Tony Lindgren
Hi,
Looks like commit
5451781dadf8("regulator: core: Only count load for enabled consumers") started showing new warnings with v5.0-rc cycle:regulator-dummy: Underflow of regulator enable count
I'm seeing this at least with my pwm-vibra test case:
# rumble-test /dev/input/by-path/platform-vibrator-event 0xffff pwm-vibrator vibrator: vibrator supply vcc not found, using dummy regulator input: pwm-vibrator as /devices/platform/vibrator/input/input4 regulator-dummy: Underflow of regulator enable count Upload rumble effect... id=0 regulator-dummy: Underflow of regulator enable count
Quoted 2 lines
Are these bogus warnings for dummy regulator or do we have real unpaired regulator calls or somewhere?
My first guess is that there's a real unpaired regulator call somewhere.
I actually meant to include this in the commit message, but I'm an idiot and I used "--" to break up the parts of the commit message which confused git when Mark applied it. Sigh. For the full commit message, see:
https://lkml.kernel.org/r/[email protected]
Quoted 4 lines · In that message I
- We can (and will) spit errors out for code that used to be invalid but was never caught before. Specifically if someone leaves a regulator enabled and calls
regulator_put()we'll yell. We'll also yell if a single consumer calls more disables than enables.
Looking quickly at 'pwm-vibra.c' it wouldn't surprise me at all if you call regulator_disable() more times than regulator_enable(). If that's true it should be fixed.
-Doug
Quoted 23 lines · Doug Anderson
Hi,
Quoted 17 lines · Tony Lindgren
Hi,
Looks like commit
5451781dadf8("regulator: core: Only count load for enabled consumers") started showing new warnings with v5.0-rc cycle:regulator-dummy: Underflow of regulator enable count
I'm seeing this at least with my pwm-vibra test case:
# rumble-test /dev/input/by-path/platform-vibrator-event 0xffff pwm-vibrator vibrator: vibrator supply vcc not found, using dummy regulator input: pwm-vibrator as /devices/platform/vibrator/input/input4 regulator-dummy: Underflow of regulator enable count Upload rumble effect... id=0 regulator-dummy: Underflow of regulator enable countQuoted 2 lines
Are these bogus warnings for dummy regulator or do we have real unpaired regulator calls or somewhere?
Quoted 8 lines
My first guess is that there's a real unpaired regulator call somewhere.
I actually meant to include this in the commit message, but I'm an idiot and I used "--" to break up the parts of the commit message which confused git when Mark applied it. Sigh. For the full commit message, see:
Oh I see, thanks for the link :)
Quoted 10 lines
Quoted 4 lines · In that message I
- We can (and will) spit errors out for code that used to be invalid but was never caught before. Specifically if someone leaves a regulator enabled and calls
regulator_put()we'll yell. We'll also yell if a single consumer calls more disables than enables.Looking quickly at '
pwm-vibra.c' it wouldn't surprise me at all if you callregulator_disable()more times thanregulator_enable(). If that's true it should be fixed.
OK. Let's see if Sebastian spots where pwm_vibrator_start() and pwm_vibrator_stop() might get called multiple times or something similar.
Regards,
Tony
Quoted 3 lines · Tony Lindgren
OK. Let's see if Sebastian spots where
pwm_vibrator_start()andpwm_vibrator_stop()might get called multiple times or something similar.
Given that nobody has noticed that the driver stops working entirely it's possible that the pattern is something like:
pwm_vibrator_start()
pwm_vibrator_stop()
pwm_vibrator_stop()
pwm_vibrator_start()
so it's a temporary underflow that gets corrected (or it could be that not many people are using mainline kernels on these systems). On your system it's the dummy driver but presumably some other users have it connected to actual regulators.
Quoted 15 lines · Mark Brown
Quoted 3 lines · Tony Lindgren
OK. Let's see if Sebastian spots where
pwm_vibrator_start()andpwm_vibrator_stop()might get called multiple times or something similar.Given that nobody has noticed that the driver stops working entirely it's possible that the pattern is something like:
pwm_vibrator_start()
pwm_vibrator_stop()
pwm_vibrator_stop()
pwm_vibrator_start()
Quoted 4 lines
so it's a temporary underflow that gets corrected (or it could be that not many people are using mainline kernels on these systems). On your system it's the dummy driver but presumably some other users have it connected to actual regulators.
Yeah that makes sense.
Regards,
Tony
Hi,
Quoted 14 lines · Tony Lindgren
Looks like commit
5451781dadf8("regulator: core: Only count load for enabled consumers") started showing new warnings with v5.0-rc cycle:regulator-dummy: Underflow of regulator enable count
I'm seeing this at least with my pwm-vibra test case:
# rumble-test /dev/input/by-path/platform-vibrator-event 0xffff pwm-vibrator vibrator: vibrator supply vcc not found, using dummy regulator input: pwm-vibrator as /devices/platform/vibrator/input/input4 regulator-dummy: Underflow of regulator enable count Upload rumble effect... id=0 regulator-dummy: Underflow of regulator enable count
Quoted 2 lines
Are these bogus warnings for dummy regulator or do we have real unpaired regulator calls or somewhere?
There are real unpaired regulator calls in the pwm-vibrator driver, that I did not notice when I wrote the driver :(. Good news is, that Paweł Chmiel and Jonathan Bakker are already working on fixing my mess:
https://lore.kernel.org/patchwork/patch/1032759/
On Droid 4 it's a dummy regulator, since I did not know what regulator is being used to supply the vibrator. Probably directly from the battery.
-- Sebastian
Quoted 17 lines · Sebastian Reichel
Hi,
Quoted 14 lines · Tony Lindgren
Looks like commit
5451781dadf8("regulator: core: Only count load for enabled consumers") started showing new warnings with v5.0-rc cycle:regulator-dummy: Underflow of regulator enable count
I'm seeing this at least with my pwm-vibra test case:
# rumble-test /dev/input/by-path/platform-vibrator-event 0xffff pwm-vibrator vibrator: vibrator supply vcc not found, using dummy regulator input: pwm-vibrator as /devices/platform/vibrator/input/input4 regulator-dummy: Underflow of regulator enable count Upload rumble effect... id=0 regulator-dummy: Underflow of regulator enable count
Quoted 8 lines
Quoted 2 lines
Are these bogus warnings for dummy regulator or do we have real unpaired regulator calls or somewhere?
There are real unpaired regulator calls in the pwm-vibrator driver, that I did not notice when I wrote the driver :(. Good news is, that Paweł Chmiel and Jonathan Bakker are already working on fixing my mess:
OK good to hear.
Quoted 3 lines
On Droid 4 it's a dummy regulator, since I did not know what regulator is being used to supply the vibrator. Probably directly from the battery.
Yeah no idea.. Hmm maybe it's actually using the VVIB on the pmic?
Regards,
Tony