From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B98073128C7; Mon, 24 Nov 2025 15:13:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763997237; cv=none; b=ARWgnRZtwUYSq5MKxQFe7GxAmn8cvPzABKxuQKqKF4lNohawPMwXSFzTC/nqNLr1P68KXEatpOxbKdJzMb5B4D/AaLaUIGi7JtYj5zl5S0l7rXXHCmlnuGYeMKKAPeUypYbe4Wwsn1mVstdAvCrlqTZTecmHy4wR+QXKLjA6fFc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763997237; c=relaxed/simple; bh=gBhx8Mbf0EyBCb2GMYE7V3/PC7aCPdL0yiJrn3XgNAM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KWlw6EixN0LnJpwnsTwZ0Rg50AmVLL0CWPR3ziKTO00aLwer6hrQ3410EO/qJ1ojjrJUlFBcgloieOVG3rVYygQaPQdhPGTnRPd0xeRlKwo/U5QrtBdRVIKxjqPGW2/U89lB/qwYZvCArg5wwgG66GFPUSWlYLHUQ3rCuqwspT0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=TntYoh8A; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="TntYoh8A" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 247831A1D25; Mon, 24 Nov 2025 15:13:53 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id DF0D660705; Mon, 24 Nov 2025 15:13:52 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 8382810371A40; Mon, 24 Nov 2025 16:13:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1763997229; h=from:subject:date:message-id:to:cc:mime-version:content-type: in-reply-to:references; bh=KeHRsQWQWHgCUqrAiXnJp1WIeWLgxqdNlTv4+nJhNOg=; b=TntYoh8AeSRn4I+5TNL9anc2ksbdcU3gCGIIM0uCozEReM6pGtWO+C/NwdpLkYeLztP3/w 5RuxgzByVoF1vNmgCkNzCXV1qRBqjxwRgvSYjxhVPkkK4flld6reO+1Fq3hyEOMkslukjN 8l6OJQAzvyy/7zkY7oB2nW6bvSrtwRW83lB0m3bEi3RMQ8QTbDMmT8ucAdBnLKHO6Yrh12 PAIZLO55VpDOobuDS8v4RYmFPVUBdJNkNmKo4n82qa/5ugkeG7xT2UXZl9OV2JNEhITFqj aMjr9X3XwgfbShXaoK3UFtga1GgP/ZO9Y16VJaeDTrgb3pSkfMOtanXC/Tl3og== From: Romain Gantois To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Cameron , David Lechner , Nuno =?UTF-8?B?U8Oh?= , Andy Shevchenko , Guenter Roeck Cc: Thomas Petazzoni , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-iio@vger.kernel.org, Conor Dooley , MyungJoo Ham , Chanwoo Choi , Peter Rosin , Mariel Tinaco , Lars-Peter Clausen , Michael Hennerich , Kevin Tsai , Linus Walleij , Dmitry Torokhov , Eugen Hristev , Vinod Koul , Kishon Vijay Abraham I , Sebastian Reichel , Chen-Yu Tsai , Support Opensource , Paul Cercueil , Iskren Chernev , Marek Szyprowski , Matheus Castello , Saravanan Sekar , Matthias Brugger , AngeloGioacchino Del Regno , Casey Connolly , Pali =?UTF-8?B?Um9ow6Fy?= , Orson Zhai , Baolin Wang , Chunyan Zhang , Amit Kucheria , Thara Gopinath , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Claudiu Beznea , Jaroslav Kysela , Takashi Iwai , Sylwester Nawrocki , Olivier Moysan , Arnaud Pouliquen , Maxime Coquelin , Alexandre Torgue , Dixit Parmar , linux-hwmon@vger.kernel.org, linux-input@vger.kernel.org, linux-phy@lists.infradead.org, linux-pm@vger.kernel.org, linux-mips@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, Andy Shevchenko Subject: Re: [PATCH v4 0/6] Add support for the LTM8054 voltage regulator Date: Mon, 24 Nov 2025 16:13:26 +0100 Message-ID: <23111366.EfDdHjke4D@fw-rgant> In-Reply-To: <24527d76-4f6a-4008-a369-23510d492a94@roeck-us.net> References: <20251124-ltm8054-driver-v4-0-107a8a814abe@bootlin.com> <24527d76-4f6a-4008-a369-23510d492a94@roeck-us.net> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4113614.kQq0lBPeGt"; micalg="pgp-sha512"; protocol="application/pgp-signature" X-Last-TLS-Session-Version: TLSv1.3 --nextPart4113614.kQq0lBPeGt Content-Type: multipart/alternative; boundary="nextPart8077299.EvYhyI6sBW"; protected-headers="v1" Content-Transfer-Encoding: 7Bit From: Romain Gantois Date: Mon, 24 Nov 2025 16:13:26 +0100 Message-ID: <23111366.EfDdHjke4D@fw-rgant> In-Reply-To: <24527d76-4f6a-4008-a369-23510d492a94@roeck-us.net> MIME-Version: 1.0 This is a multi-part message in MIME format. --nextPart8077299.EvYhyI6sBW Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" 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 --nextPart8077299.EvYhyI6sBW Content-Transfer-Encoding: 7Bit Content-Type: text/html; charset="utf-8"

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


--nextPart8077299.EvYhyI6sBW-- --nextPart4113614.kQq0lBPeGt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEIcCsAScRrtr7W0x0KCYAIARzeA4FAmkkdhYACgkQKCYAIARz eA7Qpw//QZmn8Z6KMjxYRaV2oFT+8zEG5iKQ7jzafgDDFy0In7oKyj1RV8ZqVkxI 5YLcWx1HZUN25O9ysPGCiSE/uSvFGyZeMjCI4vQcEUrjPc2LgrzKc78YE3C2Rzk3 FVp2JmSU26N8JWgb76E8XsmdQsD9gYFgEvptccUYauluiw98CsLLd416CTRUG4ko AWiRXWQc4iNKIV5Xzr+PYzRDp0w0TtqI0jgZZPOsL+QHzrMvq7nIbDvmiCOaSBJG BMW5zhT075/cTv0swZYoTdljT18cPC3HqsXeUwADYgzlB/+5z5Ji8Lew3BVtoQmd pbsehIp2cC7r5HQvbgtyb1Zbjo534R8rPYMM2vujv3E1N5/+3p7WWr7UQCzm+Hll X4MSDSI6FczjKXBEfPUlPAuDPo2Ms5C7cTdh0MdFjXnX6kRZkfawuYhwjxuS6Vl0 lqtZpG1OlMbm5gRcGYxZehWxhYZW3+fG4gG6V3NdgXJBgT0VoxlA3Wq3uG7sU/MM Mn4yZWXRs+JyiVnWoxbg6L3AB6PFChnD29VbJ372najkvwwJKmDoV7BdRNx/K9vC 3C1215jYC3lElxPoTNmPTV6sdtp+wtPdJ2k5ZN/rGPm4LuMrNfVplLWsqH/U8GY4 SOtoXDr+y5wsgtsVqvKWrzlJD6HcAeef7v8oIqP/v8LaH3xkhKQ= =xKLG -----END PGP SIGNATURE----- --nextPart4113614.kQq0lBPeGt--