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

Isaac Scott posted 3 patches 1 year ago
drivers/regulator/ad5398.c | 33 +++++++++++++++++++--------------
1 file changed, 19 insertions(+), 14 deletions(-)
[PATCH v2 0/3] regulator: Add device tree support to AD5398
Posted by Isaac Scott 1 year ago
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
Re: (subset) [PATCH v2 0/3] regulator: Add device tree support to AD5398
Posted by Mark Brown 1 year ago
On Tue, 28 Jan 2025 17:31:40 +0000, Isaac Scott wrote:
> 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:
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next

Thanks!

[1/3] regulator: ad5398: change enable bit name to improve readibility
      commit: 19d022d67d7353f0e6e9ba255435d3de93862ac4
[3/3] regulator: ad5398: Add device tree support
      commit: 5a6a461079decea452fdcae955bccecf92e07e97

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark