[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190924182758.GC2036@sirena.org.uk>
Date: Tue, 24 Sep 2019 11:27:58 -0700
From: Mark Brown <broonie@...nel.org>
To: Doug Anderson <dianders@...omium.org>
Cc: Marco Felsch <m.felsch@...gutronix.de>,
Chunyan Zhang <zhang.chunyan@...aro.org>,
Liam Girdwood <lgirdwood@...il.com>,
ckeepax@...nsource.cirrus.com, LKML <linux-kernel@...r.kernel.org>,
Sascha Hauer <kernel@...gutronix.de>
Subject: Re: [PATCH 1/3] regulator: core: fix boot-on regulators use_count
usage
On Mon, Sep 23, 2019 at 03:40:09PM -0700, Doug Anderson wrote:
> On Mon, Sep 23, 2019 at 11:49 AM Mark Brown <broonie@...nel.org> wrote:
> > On Mon, Sep 23, 2019 at 11:36:11AM -0700, Doug Anderson wrote:
> > > 1. Would it be valid to say that it's always incorrect to set this
> > > property if there is a way to read the status back from the regulator?
> > As originally intended, yes. I'm now not 100% sure that it won't
> > break any existing systems though :/
> Should I change the bindings doc to say that?
Sure.
> > It should be possible to do a regulator_disable() though I'm not
> > sure anyone actually uses that. The pattern for a regular
> > consumer should be the normal enable/disable pair to handle
> > shared usage, only an exclusive consumer should be able to use
> > just a straight disable.
> Ah, I see, I wasn't aware of the "exclusive" special case! Marco: is
> this working for you? I wonder if we need to match
> "regulator->enable_count" to "rdev->use_count" at the end of
> _regulator_get() in the exclusive case...
Yes, I think that case has been missed when adding the enable
counts - I've never actually had a system myself that made any
use of this stuff. It probably needs an audit of the users to
make sure nobody's relying on the current behaviour though I
can't think how they would.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists