]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
regulator: s2mps11: refactor handling of external rail control
authorAndré Draszik <andre.draszik@linaro.org>
Thu, 22 Jan 2026 15:43:42 +0000 (15:43 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 4 Feb 2026 13:35:36 +0000 (13:35 +0000)
commit0042c880e43c54c9bf19c24a72e54eeea37995e3
tree611585f6300e70022d457f507b5352f8db38bf2b
parent5b3c95739d674794730fbf3c678206f302609d27
regulator: s2mps11: refactor handling of external rail control

Refactor s2mps14_pmic_enable_ext_control() and s2mps11_of_parse_cb()
slightly as a preparation for adding S2MPG10 and S2MPG11 support, as
both of those PMICs also support control of rails via GPIOs.

This also includes the following to avoid further updates in follow-up
commits:
* On S2MPG10 and S2MPG11, external rail control can be via GPIO or via
  non-GPIO signals, hence passing a GPIO is allowed to be optional.
  This avoids inappropriate verbose driver messages.
* Prepare to allow use of standard DT property name 'enable-gpios' for
  newer platforms instead of vendor-specific 'samsung,ext-control'.

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://patch.msgid.link/20260122-s2mpg1x-regulators-v7-15-3b1f9831fffd@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/s2mps11.c