[PATCH v2 0/3] regulator: Add device tree support to AD5398

From: Isaac Scott
Date: Tue Jan 28 2025 - 12:31:56 EST


The AD5398 is a DAC that can be used to control current flow in circuits
in a wide variety of applications such as motor control, or in my case,
LED control. I found when working with the current driver that it did
not work for my use case. It transpired that it only had support for
platform_data, and didn't appear to be correctly implemented according
to the datasheet, which can be found here:

https://www.analog.com/media/en/technical-documentation/data-sheets/ad5398.pdf

One example of this is the "soft power-down" bit being referred to in
the driver as simply "enable", which gives the impression that the
setting that bit will allow current through the regulator, which it does
not.

This series allows the regulator to be given its constraints via the
device tree, and makes the function of the enable register much more
obvious.

Best wishes,

Isaac

Tested on v6.13 (origin/master)

Isaac Scott (3):
regulator: ad5398: change enable bit name to improve readibility
RFC: regulator: ad5398: Change selector division calculation
regulator: ad5398: Add device tree support

drivers/regulator/ad5398.c | 33 +++++++++++++++++++--------------
1 file changed, 19 insertions(+), 14 deletions(-)

--
2.43.0