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

Guenter Roeck
2025-11-24T15:40:43Z

On 11/24/25 07:13, Romain Gantois wrote:
> Hello Guenter,
>
>
> On Monday, 24 November 2025 15:57:41 CET Guenter Roeck wrote:
>
> > On 11/24/25 06:48, Romain Gantois wrote:
>
> > > Hello everyone,
>
> > >
>
> > > This is version four of my series which adds initial support of the Linear
>
> > > Technology LTM8054 voltage regulator. The driver supports a fixed voltage
>
> > > and a tunable output current limit using a DAC-controlled pin.
>
> > >
>
> > > I'd say that the most unusual part of this series is the usage of the IIO
>
> > > consumer API in a regulator driver. I think this makes sense here, since
>
> > > the regulator driver has to access a DAC to read/set the output current
>
> > > limit.
>
> >
>
> > I don't think that is a valid reason. Literally every driver measuring
>
> > voltages or current uses a DAC to do it. How else would one convert an
>
> > analog value into a digital value ?
>
>
> Sorry, I don't quite understand your remark. To integrate this voltage
>
> regulator component into the Linux regulator abstraction, I'm providing a
>
> current limit control function. To provide such a function, the voltage level
>
> on a pin has to be controlled. AFAIK, the kernel abstraction used to set
>
> precise voltages on lines is an IO channel.
>
>
> Do you think that using the IIO consumer API is not correct here? What other
>
> method do you think I should use?
>

Ok, I had a look into the datasheet. Unless I am missing something, the chip doesn't
have a digital control or monitoring interface such as I2C or SPI.

At the same time, you copied the hardware monitoring mailing list on this summary and
on (at least) one of the patches, but apparently not on all of them. This lead to my
apparently wrong assumption that iio is used to monitor (not [just] control) something
on the chip. I wrongly assumed that IIO is used to report chip status (voltage, current,
temperature) using an internal DAC. Obviously that was a wrong assumption.
Sorry for that.

Apparently you copied the hwmon mailing list for the introduction of an IIO namespace
and its use in a couple of hwmon drivers in one of the patches. My personal opinion
is that this should not be part of this series but a series of its own. That is just
my personal opinion, though.

Guenter