linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] Add support for the LTM8054 voltage regulator
@ 2025-09-25 12:37 Romain Gantois
  2025-09-25 12:37 ` [PATCH v2 1/5] regulator: dt-bindings: Add Linear Technology LTM8054 regulator Romain Gantois
                   ` (4 more replies)
  0 siblings, 5 replies; 23+ messages in thread
From: Romain Gantois @ 2025-09-25 12:37 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Jonathan Cameron, David Lechner, Nuno Sá,
	Andy Shevchenko
  Cc: Hans de Goede, Thomas Petazzoni, linux-kernel, devicetree,
	linux-iio, Romain Gantois

Hello everyone,

These patches depend on the following series from Hans de Goede:

iio: processed channel handling fixes + Intel Dollar Cove TI PMIC ADC driver
(v4) https://lore.kernel.org/all/20250811155453.31525-1-hansg@kernel.org/

This is version two 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 only 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.

Since the regulator driver writes microvolts and the IIO consumer API takes
millivolts, the reads and writes to the CTL DAC have to be scaled by a
factor of 1000. Scaled reads are already supported in IIO, but scaled
writes are not, which is why I've implemented them in patch 2/4.

Please let me know what you think.

Thanks,

Romain

Signed-off-by: Romain Gantois <romain.gantois@bootlin.com>
---
Changes in v2:
- Refactored iio_convert_processed_to_raw() to match what was done in Hans'
  series.
- Added unit tests for IIO division.
- Fixed coding style issues and removed unnecessary casts.
- Link to v1: https://lore.kernel.org/r/20250916-ltm8054-driver-v1-0-fd4e781d33b9@bootlin.com

---
Romain Gantois (5):
      regulator: dt-bindings: Add Linear Technology LTM8054 regulator
      iio: add processed write API
      Add kunit tests for iio_divide_by_value()
      regulator: Support the LTM8054 voltage regulator
      regulator: ltm8054: Support output current limit control

 .../devicetree/bindings/regulator/adi,ltm8054.yaml |  73 +++++++
 MAINTAINERS                                        |   6 +
 drivers/iio/inkern.c                               | 120 +++++++++++
 drivers/iio/test/Kconfig                           |  12 ++
 drivers/iio/test/Makefile                          |   1 +
 drivers/iio/test/iio-test-divide.c                 | 212 +++++++++++++++++++
 drivers/regulator/Kconfig                          |   9 +
 drivers/regulator/Makefile                         |   1 +
 drivers/regulator/ltm8054-regulator.c              | 235 +++++++++++++++++++++
 include/linux/iio/consumer.h                       |  36 ++++
 10 files changed, 705 insertions(+)
---
base-commit: bd89f4b281945a63659687ef5c70c4442d7e4940
change-id: 20250728-ltm8054-driver-11cfa4741065

Best regards,
-- 
Romain Gantois <romain.gantois@bootlin.com>


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2025-10-24  7:55 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-25 12:37 [PATCH v2 0/5] Add support for the LTM8054 voltage regulator Romain Gantois
2025-09-25 12:37 ` [PATCH v2 1/5] regulator: dt-bindings: Add Linear Technology LTM8054 regulator Romain Gantois
2025-09-25 19:27   ` Conor Dooley
2025-09-26 15:59     ` Romain Gantois
2025-09-27 22:31       ` Conor Dooley
2025-10-01  7:11         ` Romain Gantois
2025-10-01 11:18           ` David Lechner
2025-10-01 18:40             ` Conor Dooley
2025-10-02  7:11               ` David Lechner
2025-09-25 12:37 ` [PATCH v2 2/5] iio: add processed write API Romain Gantois
2025-09-25 21:10   ` David Lechner
2025-10-01  7:19     ` Romain Gantois
2025-10-01 10:43       ` David Lechner
     [not found]       ` <CAMknhBG_o=jTKtHHDyK=bq7wcHMnDM1ZHaYAfX0K2hjHfkX3Bg@mail.gmail.com>
2025-10-03 14:35         ` Romain Gantois
2025-09-28  9:07   ` Jonathan Cameron
2025-09-25 12:37 ` [PATCH v2 3/5] Add kunit tests for iio_divide_by_value() Romain Gantois
2025-09-25 20:26   ` David Lechner
2025-09-25 12:37 ` [PATCH v2 4/5] regulator: Support the LTM8054 voltage regulator Romain Gantois
2025-10-22 14:44   ` Andy Shevchenko
2025-09-25 12:37 ` [PATCH v2 5/5] regulator: ltm8054: Support output current limit control Romain Gantois
2025-10-22  8:05   ` Romain Gantois
2025-10-22 16:37     ` Andy Shevchenko
2025-10-24  7:55       ` Romain Gantois

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).