soc: samsung: exynos-regulator-coupler: Add simple voltage coupler for Exynos5800
authorMarek Szyprowski <m.szyprowski@samsung.com>
Tue, 21 Jul 2020 18:09:00 +0000 (20:09 +0200)
committerArnd Bergmann <arnd@arndb.de>
Wed, 22 Jul 2020 20:33:57 +0000 (22:33 +0200)
commit00067ca5331e81f609d0e1255d4807ba24488aad
treed203773c050d0779d6d0fcf9c4bbbe2b5f0eeeeb
parent1481fd71398f6537fbcc26aa5a4aa360679822b8
soc: samsung: exynos-regulator-coupler: Add simple voltage coupler for Exynos5800

Add a simple custom voltage regulator coupler for Exynos5800 SoCs, which
require coupling between "vdd_arm" and "vdd_int" regulators. This coupler
ensures that the voltage values don't go below the bootloader-selected
operation point during the boot process until the clients set their
constraints. It is achieved by assuming minimal voltage value equal to
the current value if no constraints are set. This also ensures proper
voltage balancing if any of the client driver is missing.

The balancing code comes from the regulator/core.c with the additional
logic for handling regulators without client constraints applied added.

Link: https://lore.kernel.org/r/20200721180900.13844-5-krzk@kernel.org
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/mach-exynos/Kconfig
drivers/soc/samsung/Kconfig
drivers/soc/samsung/Makefile
drivers/soc/samsung/exynos-regulator-coupler.c [new file with mode: 0644]