[RFC PATCH 0/2] PM6125 regulator support

From: Iskren Chernev
Date: Sat Aug 28 2021 - 07:57:15 EST


This patch series adds SPMI and SMD regulator support for the PM6125 found on
SM4250/SM6115 SoCs from QCom.

The main source used for this change is qpnp pm6125 support patch from caf [1]:

[1]: https://source.codeaurora.org/quic/la/kernel/msm-5.4/commit/?h=kernel.lnx.5.4.r1-rel&id=d1220daeffaa440ffff0a8c47322eb0033bf54f5

Unfortunatelly the source patch doesn't contain regulator source groups, so all
regulators define their own source. If that was available (suggestions are
welcome), this patch could become acceptable.

While at it I have a few suggestions:
- spmi determines how to treat each regulator based on type,subtype,revision
read from regulator register. I assume this information is fixed for a givem
PM chip. It would be really helpful if it was available somewhere in code
(comment) or maybe the commit message, so correct voltage range and ops can
be determined without firing up an actual device and extracting that info.
I've included this info in the spmi commit message in patch 1/2.
- according to caf source, there are 3 general revisions of regs/ops, called
common, common2, common3. I think this is cleaner than picking the first
regulator name from the new generation and naming ops/regs on it. For example
ftsmps426 functions/regs are common2 in caf, and my patch introduces common3
(named ftsmps3).

About correctness:
- spmi patch was compile-tested
- rpm/smd patch was tested (voltage ranges come from spmi+type/subtype info)

Iskren Chernev (2):
regulator: qcom_spmi: Add PM6125 regulators
regulator: qcom_smd: Add PM6125 regulator support

drivers/regulator/qcom_smd-regulator.c | 46 +++++++
drivers/regulator/qcom_spmi-regulator.c | 160 +++++++++++++++++++++++-
2 files changed, 204 insertions(+), 2 deletions(-)


base-commit: 5e63226c72287bc6c6724d4fc7e157af0e3d7908
--
2.33.0