Re: [PATCH v4 0/6] Add support for the LTM8054 voltage regulator

Romain Gantois
2025-11-27T15:07:25Z

[-- Attachment #1: Type: text/plain, Size: 2608 bytes --]

On Tuesday, 25 November 2025 11:25:24 CET H. Nikolaus Schaller wrote:
> Hi,
>
> > Am 25.11.2025 um 09:41 schrieb Romain Gantois
> > <romain.gantois@bootlin.com>:
> >
> >
> > This is planned support for a voltage regulator chip.
>
> Well, but one which is not by itself programmable. So IMHO, it does not
> support that chip, but the circuit it is used in.
>

The boundary is a bit blurry in this case, sure.

> > > Are you looking for a virtual "glue" driver to logically combine several
> > > low level functions?
> >
> > I'm looking for a clean userspace abstraction for this component, the low-
> > level functions in this case are those of a voltage regulator.
>
> As far as I understood it has
> - constant voltage
> - current can be limited
> - it can be turned on/off
>
> That means it is a fixed-regulator (for constant voltage and turn on/off)
> and a mechanism to program the current limit (iio-dac). Both have clean
> userspace abstraction.
>
> What am I missing?
>

In my case, the regulator has a DAC tapping into the feedback divider with
allows modifying the output voltage level. This isn't specific to the LTM8054
though, you can theoretically do this with any regulator chip that has a
feedback pin.

...
> The question remains if you want to solve something for a single board which
> happens to have an LTM8054 or if you are solving a more general design
> pattern.
>
> In summary my view is that the LTM8054 is just a "fixed-regulator" which
> gets an additional current-limiter feature by adding a DAC chip (which needs
> a driver of course). So software control is required not by the LTM8054 but
> by adding a DAC chip.
>
> Another suggestion: what extending the "regulator-fixed", "regulator-gpio",
> "regulator-fixed-clock" pattern by some
> "regulator-gpio-iio-dac-current-limiter" driver to make it independent of
> your specific chip?
>
> By the way, are you aware of this feature of the regulator-gpio driver?
>
> https://elixir.bootlin.com/linux/v6.18-rc7/source/drivers/regulator/gpio-reg
> ulator.c#L97
>

That could be a preferable solution given that similar current limit and
output voltage limit control methods could apply to other regulator chips...
I'll have to think about it some more.

> Just to note: I am neither maintainer nor doing any decisions on this, just
> asking questions for curiosity and from experience and giving hints for
> alternative approaches, where I hope they help to find the really best
> solution.

Sure, I appreciate that.

Thanks,

--
Romain Gantois, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]