regulator: vctrl-regulator: Avoid deadlock getting and setting the voltage
Enric Balletbo i Serra authored
[ Upstream commit e9153311 ]

`cat /sys/kernel/debug/regulator/regulator_summary` ends on a deadlock
when you have a voltage controlled regulator (vctrl).

The problem is that the vctrl_get_voltage() and vctrl_set_voltage() calls the
regulator_get_voltage() and regulator_set_voltage() and that will try to lock
again the dependent regulators (the regulator supplying the control voltage).

Fix the issue by exporting the unlocked version of the regulator_get_voltage()
and regulator_set_voltage() API so drivers that need it, like the voltage
controlled regulator driver can use it.

Fixes: f8702f9e

 ("regulator: core: Use ww_mutex for regulators locking")
Reported-by: default avatarDouglas Anderson <dianders@chromium.org>
Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20200116094543.2847321-1-enric.balletbo@collabora.com
Signed-off-by: Mark Brown <broonie@kernel....
337c7b95
Name Last commit Last update
Documentation fbdev: fix numbering of fbcon options
LICENSES LICENSES: Rename other to deprecated
arch perf/x86/amd: Constrain Large Increment per Cycle events
block block, bfq: do not plug I/O for bfq_queues with no proc refs
certs PKCS#7: Refactor verify_pkcs7_signature()
crypto crypto: essiv - fix AEAD capitalization and preposition use in help text
drivers regulator: vctrl-regulator: Avoid deadlock getting and setting the voltage
fs f2fs: free sysfs kobject
include raid6/test: fix a compilation warning
init Revert "um: Enable CONFIG_CONSTRUCTORS"
ipc ipc/msg.c: consolidate all xxxctl_down() functions
kernel watchdog/softlockup: Enforce that timestamp is valid on boot
lib debugobjects: Fix various data races
mm mm/mmu_gather: invalidate TLB correctly on batch allocation failure and flush
net bpf: Return -EBADRQC for invalid map type in __bpf_tx_xdp_map
samples samples/bpf: Set -fno-stack-protector when building BPF programs
scripts kbuild: remove *.tmp file when filechk fails
security selinux: ensure we cleanup the internal AVC counters on error in avc_update()
sound ASoC: SOF: Intel: hda: Fix SKL dai count
tools usbip: Fix unsafe unaligned pointer usage
usr gen_initramfs_list.sh: fix 'bad variable name' error
virt KVM: arm64: Treat emulated TVAL TimerValue as a signed 32-bit integer
.clang-format clang-format: Update with the latest for_each macro list
.cocciconfig scripts: add Linux .cocciconfig for coccinelle
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.