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

Romain Gantois
2025-11-24T15:13:54Z

[-- Attachment #1.1: Type: text/plain, Size: 1359 bytes --]

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?

Thanks,

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

[-- Attachment #1.2: Type: text/html, Size: 3721 bytes --]

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