linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Doug Anderson <dianders@chromium.org>
To: Tony Lindgren <tony@atomide.com>
Cc: linux-omap <linux-omap@vger.kernel.org>,
	Mark Brown <broonie@kernel.org>,
	Sebastian Reichel <sre@kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: New underflow of regulator enable count warnings in v5.0-rc1
Date: Tue, 29 Jan 2019 09:04:44 -0800	[thread overview]
Message-ID: <CAD=FV=VJWofeRbmdBkn1ZKhs302wE4Un_PVru-M2G2er4OpchQ@mail.gmail.com> (raw)
In-Reply-To: <20190129164813.GA5720@atomide.com>

Hi,

On Tue, Jan 29, 2019 at 8:48 AM Tony Lindgren <tony@atomide.com> wrote:
>
> 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?

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/20181120175255.227783-1-dianders@chromium.org

In that message I said:

> - 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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2019-01-29 17:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-29 16:48 New underflow of regulator enable count warnings in v5.0-rc1 Tony Lindgren
2019-01-29 17:01 ` Mark Brown
2019-01-29 17:04 ` Doug Anderson [this message]
2019-01-29 17:11   ` Tony Lindgren
2019-01-29 17:15     ` Mark Brown
2019-01-29 17:18       ` Tony Lindgren
2019-01-29 17:18 ` Sebastian Reichel
2019-01-29 17:27   ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAD=FV=VJWofeRbmdBkn1ZKhs302wE4Un_PVru-M2G2er4OpchQ@mail.gmail.com' \
    --to=dianders@chromium.org \
    --cc=broonie@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=sre@kernel.org \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).