Re: [PATCH v4 0/6] Add support for the LTM8054 voltage regulator
From: Romain Gantois
Date: Mon Dec 08 2025 - 03:58:34 EST
On Sunday, 7 December 2025 19:48:18 CET Jonathan Cameron wrote:
> On Tue, 25 Nov 2025 08:37:20 -0800
>
> Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
> > On 11/25/25 02:25, H. Nikolaus Schaller wrote:
> > ...
> >
> > > 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?
> >
> > The name is terrible ;-), but that is what I would have suggested as well.
> > I don't see anything chip specific in this code. If there is a need for
> > a regulator driver which uses gpio to enable it and a DAC for current
> > limiting, it should be made generic.
>
> Agreed - something generic is the ideal way to go.
>
> However, before going too far it is worth exploring what are common circuits
> with these things to identify what parameters we need to describe how the
> DAC channel is used - e.g is linear scaling enough? You'll need to that to
> define a DT binding. If it turns out to be too complex, then fallback to
> specific compatibles in a generic driver to cover the ones that don't fit
> with a common scheme. A similar case we already have is discrete
> components as analog front ends for ADCs - mostly they fall into a few
> categories and we have drivers covering those, but some are very odd indeed
> and for those ones we do have a driver even though they don't have anything
> to control as such - most extreme case being when it's a non linear analog
> sensor.
>
I actually did use a modified version of iio-rescale in my downstream code. My
use case includes an OpAmp inverter circuit placed in front of a DAC, and it's
useful for me to be able to describe this in a modular fashion, as two IIO
device tree nodes representing respectively the DAC and the OpAmp circuit
front-end.
Moreover, the LTM8054 takes a voltage on its CTL pin and infers a current
limit from it. This is also something which could be represented as a sort of
AFE node.
LTM8054 output voltage control:
+---+ +------------+ +--------------------+
|DAC+->Inverter AFE+->Feedback circuit AFE|
+---+ +------------+ +--------------------+
LTM8054 output current limit control:
+---+ +--------------------+
|DAC+->Voltage-controller |
+---+ |current limiter AFE |
+--------------------+
Thanks,
--
Romain Gantois, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Attachment:
signature.asc
Description: This is a digitally signed message part.