regulator: qcom_spmi: Add support for HFSMPS regulator type
authorIskren Chernev <iskren.chernev@gmail.com>
Tue, 2 Aug 2022 22:11:04 +0000 (01:11 +0300)
committerMark Brown <broonie@kernel.org>
Tue, 23 Aug 2022 17:07:52 +0000 (18:07 +0100)
commit2785025495b6bd630648f8304f8d932b0d0a9f2a
treeb6d5c9c8a01550f8b31993615065c8a0c96e8cb6
parentd95fe1788438cceab40af5f3f9e9fe15d8c07101
regulator: qcom_spmi: Add support for HFSMPS regulator type

This is preparation for supporing PM6125.

The HFSMPS is a BUCK type regulator with subtype 0x0a, same as the
existing HFS430 regulator.

Even though the HFSMPS and HFS430 share a type and subtype, the HFSMPS has
an updated register map, including different mode values, moved pull down
register, and different slew rate address and formula.

In addition to NORMAL (NPM), FAST (AUTO_LPM) and IDLE (LPM), the
regulator also supports RETENTION and AUTO_RM which are currently
unselectable by the driver.

The inspiration of this is taken from [1].

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

Signed-off-by: Iskren Chernev <iskren.chernev@gmail.com>
Link: https://lore.kernel.org/r/20220802221112.2280686-6-iskren.chernev@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/qcom_spmi-regulator.c