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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 07:49:58 +0000 (09:49 +0200)
commita1ad124c836816fac8bd5e461d36eaf33cee4e24
treebe1a8accf74cd60cd1763c59d63ed63fa2036ed5
parent2f2d444ac4964ddd489090b16cc8ab2b06cbca04
soc/tegra: regulators: Fix locking up when voltage-spread is out of range

commit ef85bb582c41524e9e68dfdbde48e519dac4ab3d upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/soc/tegra/regulators-tegra30.c