diff options
| author | Jad Keskes <inasj268@gmail.com> | 2026-06-17 10:46:22 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-06-29 18:59:47 +0100 |
| commit | 19253cac2a9021733e047ab0c04594c7c21182a9 (patch) | |
| tree | f3e30a1d162994773618cd8335c18161188ed063 /tools/perf/scripts/python/libxed.py | |
| parent | dc59e4fea9d83f03bad6bddf3fa2e52491777482 (diff) | |
regulator: max14577: fix set_mode clobbering enable on MAX77836 LDOs
So the PWRMD field in CNFG1_LDO is both the enable bit and the mode.
You can't change one without stepping on the other.
The problem is that enable() from the regulator core just writes
enable_mask (which is PWRMD_NORMAL). If you'd called set_mode(LPM)
then disabled and re-enabled, the mode gets reset to NORMAL. And
set_mode updates the register through the same field, so it can
accidentally enable a disabled regulator.
Fix it by storing the mode in per-regulator data. A custom enable
writes whatever mode was last set. set_mode only touches hardware
if the regulator is already on; otherwise it just caches the value.
Add of_map_mode while here so the initial mode can be wired from DT.
Signed-off-by: Jad Keskes <inasj268@gmail.com>
Acked-by: Lee Jones <lee@kernel.org>
Link: https://patch.msgid.link/20260617094622.1846471-1-inasj268@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions
