soc/tegra: regulators: Fix locking up when voltage-spread is out of range
authorDmitry Osipenko <digetx@gmail.com>
Tue, 2 Mar 2021 13:18:00 +0000 (16:18 +0300)
committerThierry Reding <treding@nvidia.com>
Fri, 26 Mar 2021 12:10:25 +0000 (13:10 +0100)
commitef85bb582c41524e9e68dfdbde48e519dac4ab3d
tree902b1a796398fa15674d22ea95ee473f49043aab
parent9d5e7c3e36ebae838c3427ed943e14f976715bbb
soc/tegra: regulators: Fix locking up when voltage-spread is out of range

Fix voltage coupler lockup which happens when voltage-spread is out
of range due to a bug in the code. The max-spread requirement shall be
accounted when CPU regulator doesn't have consumers. This problem is
observed on Tegra30 Ouya game console once system-wide DVFS is enabled
in a device-tree.

Fixes: 783807436f36 ("soc/tegra: regulators: Add regulators coupler for Tegra30")
Cc: stable@vger.kernel.org
Reported-by: Peter Geis <pgwipeout@gmail.com>
Tested-by: Peter Geis <pgwipeout@gmail.com> # Ouya T30
Tested-by: Matt Merhar <mattmerhar@protonmail.com> # Ouya T30
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/soc/tegra/regulators-tegra30.c