<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Hello Guenter,</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">On Monday, 24 November 2025 15:57:41 CET Guenter Roeck wrote:</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> On 11/24/25 06:48, Romain Gantois wrote:</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> > Hello everyone,</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> > </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> > This is version four of my series which adds initial support of the Linear</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> > Technology LTM8054 voltage regulator. The driver supports a fixed voltage</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> > and a tunable output current limit using a DAC-controlled pin.</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> > </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> > I'd say that the most unusual part of this series is the usage of the IIO</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> > consumer API in a regulator driver. I think this makes sense here, since</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> > the regulator driver has to access a DAC to read/set the output current</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> > limit.</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> I don't think that is a valid reason. Literally every driver measuring</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> voltages or current uses a DAC to do it. How else would one convert an</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">> analog value into a digital value ?</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Sorry, I don't quite understand your remark. To integrate this voltage </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">regulator component into the Linux regulator abstraction, I'm providing a </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">current limit control function. To provide such a function, the voltage level </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">on a pin has to be controlled. AFAIK, the kernel abstraction used to set </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">precise voltages on lines is an IO channel.</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Do you think that using the IIO consumer API is not correct here? What other </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">method do you think I should use?</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Thanks,</p>
<br /><p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">-- </p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Romain Gantois, Bootlin</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">Embedded Linux and Kernel engineering</p>
<p style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">https://bootlin.com</p>
<br /></body>
</html>