regulator: da9063: Add support for full-current mode.
authorVincent Pelletier <plr.vincent@gmail.com>
Tue, 13 Jul 2021 07:20:31 +0000 (07:20 +0000)
committerMark Brown <broonie@kernel.org>
Thu, 15 Jul 2021 16:24:50 +0000 (17:24 +0100)
commit541ee8f640327f951e7039278057827322231ab0
tree56b72167b0c2a5fd8f8d00e0928bdd0189d1c29f
parent508f8ccd993d1ff5c9a3092f179f33bd7a825bac
regulator: da9063: Add support for full-current mode.

In addition to the ability of merging some power outputs, this chip has
an overdrive mode.
BCORE1, BCORE2 and BPRO have this ability, in which case the legal
current draw is increased from 2 amps to 2.5 amps (at the expense of
a quiescent current increase), and the configurable current limits
are doubled.
If a current higher than maximum half-current mode is requested, enable
overdrive, and scale the current limit down.
Symmetrically, scale the current limit up when querying a overdrive-enabled
regulator.

Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com>
Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Link: https://lore.kernel.org/r/824518e6391b783a12eba9ff0527f06607a34bfb.1626160826.git.plr.vincent@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/da9063-regulator.c