]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: core: Get voltage from parent if not available
authorJavier Martinez Canillas <javier.martinez@collabora.co.uk>
Tue, 29 Jul 2014 16:28:55 +0000 (18:28 +0200)
committerMark Brown <broonie@linaro.org>
Tue, 29 Jul 2014 18:24:43 +0000 (19:24 +0100)
commit4e35a818f1ab2b68cb97e585dbe3e4bcd301260f
tree72589a3d0de40db8730b5c7ac4d2c38414ed59ce
parent2aa937594a887344ed8d0f109d5b0b274b8fe2a3
regulator: core: Get voltage from parent if not available

Load switches are modeled as regulators but they just provide
the voltage of their parent input supply. So the drivers for
these switches usually don't provide a .get_voltage function
handler but there is code in the kernel that assumes that all
regulators should be able to provide its current voltage rail.

So, if the output voltage for a regulator is not available and
it has a parent supply, then pass the voltage of its parent.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/core.c