]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: qcom_smd: Fix pm8916_pldo range
authorStephan Gerhold <stephan.gerhold@kernkonzept.com>
Thu, 23 Jun 2022 09:46:12 +0000 (11:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:09 +0000 (14:23 +0200)
commitbc861abf8aa257bb37ff2e6225b220202c70b90a
treeb25ee29d6386138867eefc08d1eb9529c4f1ee04
parent1475e6b9a17f7c63c657e8e7789a8286407bc23c
regulator: qcom_smd: Fix pm8916_pldo range

[ Upstream commit 69708af35c4c7b54bfd6a14b1ec8fd4d1a85ab0f ]

The PM8916 device specification [1] documents a programmable range of
1.75V to 3.337V with 12.5mV steps for the PMOS LDOs in PM8916. This
range is also used when controlling the regulator directly using the
qcom_spmi-regulator driver ("ult_pldo" there).

However, for some reason the qcom_smd-regulator driver allows a much
larger range for the same hardware component. This could be simply a
typo, since the start of the range is essentially just missing a '1'.

In practice this does not cause any major problems, since the driver
just sends the actual voltage to the RPM firmware instead of making use
of the incorrect voltage selector. Still, having the wrong range there
is confusing and prevents the regulator core from validating requests
correctly.

[1]: https://developer.qualcomm.com/download/sd410/pm8916pm8916-1-power-management-ic-device-specification.pdf

Fixes: 37f41e3bfc89 ("regulator: qcom-smd: Add PM8916 support")
Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
Link: https://lore.kernel.org/r/20220623094614.1410180-2-stephan.gerhold@kernkonzept.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/regulator/qcom_smd-regulator.c