regulator: core: Parse coupled regulators properties
authorMaciej Purski <m.purski@samsung.com>
Mon, 23 Apr 2018 14:33:39 +0000 (16:33 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 17 May 2018 07:05:48 +0000 (16:05 +0900)
commita085a31af566254fb8f7721911c828c8fa797894
tree138f241b458d6ddf3b1e80d2765e16df1fcba36f
parentf98618b34542706eddc3b66abc271f1c8d8c4a05
regulator: core: Parse coupled regulators properties

On Odroid XU3/4 and other Exynos5422 based boards there is a case, that
different devices on the board are supplied by different regulators
with non-fixed voltages. If one of these devices temporarily requires
higher voltage, there might occur a situation that the spread between
devices' voltages is so high, that there is a risk of changing
'high' and 'low' states on the interconnection between devices powered
by those regulators.

Add new structure "coupling_desc" to regulator_dev, which contains
pointers to all coupled regulators including the owner of the structure,
number of coupled regulators and counter of currently resolved
regulators.

Add of_functions to parse all data needed in regulator coupling.
Provide method to check DTS data consistency. Check if each coupled
regulator's max_spread is equal and if their lists of regulators match.

Signed-off-by: Maciej Purski <m.purski@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/internal.h
drivers/regulator/of_regulator.c
include/linux/regulator/driver.h
include/linux/regulator/machine.h