Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: of: Added a property to indicate bypass mode support

Added a property to indicate if the regulator supports bypass mode.
Also modified of_get_regulation_constraints() to check for that
property and set appropriate constraints.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>

authored by

Kishon Vijay Abraham I and committed by
Mark Brown
93134c7b 7d132055

+4
+1
Documentation/devicetree/bindings/regulator/regulator.txt
··· 9 9 - regulator-max-microamp: largest current consumers may set 10 10 - regulator-always-on: boolean, regulator should never be disabled 11 11 - regulator-boot-on: bootloader/firmware enabled regulator 12 + - regulator-allow-bypass: allow the regulator to go into bypass mode 12 13 - <name>-supply: phandle to the parent supply/regulator node 13 14 - regulator-ramp-delay: ramp delay for regulator(in uV/uS) 14 15
+3
drivers/regulator/of_regulator.c
··· 61 61 else /* status change should be possible if not always on. */ 62 62 constraints->valid_ops_mask |= REGULATOR_CHANGE_STATUS; 63 63 64 + if (of_property_read_bool(np, "regulator-allow-bypass")) 65 + constraints->valid_ops_mask |= REGULATOR_CHANGE_BYPASS; 66 + 64 67 ramp_delay = of_get_property(np, "regulator-ramp-delay", NULL); 65 68 if (ramp_delay) 66 69 constraints->ramp_delay = be32_to_cpu(*ramp_delay);