summaryrefslogtreecommitdiff
path: root/include/string.h
diff options
context:
space:
mode:
authorKaustabh Chakraborty <kauschluss@disroot.org>2025-10-17 20:58:19 +0530
committerPeng Fan <peng.fan@nxp.com>2025-10-30 10:11:18 +0800
commit3d4143ac3aefe54ad77151378f44df94de7e10da (patch)
tree74179f560cf7ddf506ff51c96af98ac80be46f5c /include/string.h
parent2d49a7e75ce176b07288397742fb9a72d6caf134 (diff)
power: regulator: s2mps11: declaratively get/set regulator mode
The functions s2mps11_{buck,ldo}_mode use the s2mps11_{buck,ldo}_modes arrays directly in order to extract the mode of a certain register. This approach does not allow similar devices of other variants (which may support a different set of modes) to work with the same driver. Instead of using these arrays hardcoded, extract them from the device's uclass platform data. Now the responsibility of setting these arrays properly is done by functions s2mps11_{buck,ldo}_probe, by implementing a switch-case block which can support modes of multiple variants if and when added. Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'include/string.h')
0 files changed, 0 insertions, 0 deletions