regulator: qcom_smd: Add PM8909 RPM regulators
authorStephan Gerhold <stephan.gerhold@kernkonzept.com>
Thu, 23 Jun 2022 09:46:14 +0000 (11:46 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 29 Jun 2022 15:32:10 +0000 (16:32 +0100)
commitbc4d193238be4ef8ecee1ba0e0371169ad448c31
tree2643376b80df3b934acdfff4fc0ec64a43576cbc
parent8cbb948a7cc2875d09234e2ce0424bc501c370b9
regulator: qcom_smd: Add PM8909 RPM regulators

The set of regulators available in the PM8909 PMIC is similar to PM8916
which is already supported by the driver. s3, s4 and l16 are missing.
However, probing the SPMI hardware identification registers using the
qcom_spmi-regulator driver reveals that the regulators in PM8909 are
actually some kind of mixture between PM8916 and PM8226:

  - ult_lo_smps (= pm8916_buck_lvo_smps): s1
  - ult_ho_smps (= pm8916_buck_hvo_smps): s2
  - ult_nldo (= pm8916_nldo): l1, l2, l3, l10
  - ult_pldo (= pm8916_pldo): l4, l8, l9, l12-l15, l17, l18
  - pldo (= pm8226_pldo): l5, l6, l7, l11

Use this mapping to add the rpm_regulator_data for PM8909 by reusing
the existing regulator definitions.

Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
Link: https://lore.kernel.org/r/20220623094614.1410180-4-stephan.gerhold@kernkonzept.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/qcom_smd-regulator.c