[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <4EF1B72A-826A-4435-A586-B7E0EB2DCF84@collabora.com>
Date: Wed, 14 May 2025 13:10:52 -0300
From: Daniel Almeida <daniel.almeida@...labora.com>
To: Mark Brown <broonie@...nel.org>
Cc: Benno Lossin <lossin@...nel.org>,
Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>,
Trevor Gross <tmgross@...ch.edu>,
Danilo Krummrich <dakr@...nel.org>,
Boris Brezillon <boris.brezillon@...labora.com>,
Sebastian Reichel <sebastian.reichel@...labora.com>,
Liam Girdwood <lgirdwood@...il.com>,
linux-kernel@...r.kernel.org,
rust-for-linux@...r.kernel.org
Subject: Re: [PATCH v3] rust: regulator: add a bare minimum regulator
abstraction
> On 14 May 2025, at 12:50, Mark Brown <broonie@...nel.org> wrote:
>
> On Wed, May 14, 2025 at 05:38:40PM +0200, Benno Lossin wrote:
>> On Wed May 14, 2025 at 4:40 PM CEST, Daniel Almeida wrote:
>
>>> By the way, IIUC, regulator_disable() does not disable a regulator necessarily.
>>> It just tells the system that you don't care about it being enabled anymore. It can
>>> still remain on if there are other users.
>
>> Hmm, so a `struct regulator` might already be enabled and calling
>> `regulator_enable` doesn't do anything?
>
> It takes a reference to the regulator. This may or may not result in a
> change in an underlying physical regulator.
I assume these are two different reference counts, right? One for
regulator_get()/regulator_put(), and one for
regulator_enable()/regulator_disable().
Looking at regulator_dev, I can see both "use_count" and "open_count" for
example.
Powered by blists - more mailing lists