regulator: qcom-labibb: Implement pull-down, softstart, active discharge
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Tue, 19 Jan 2021 17:44:17 +0000 (18:44 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 20 Jan 2021 18:48:16 +0000 (18:48 +0000)
commit3bc7cb99fb6eafae5a40bf71ded444df70a425f7
tree52a455a8a049aeceb3e93c1dbf8167a518701903
parent8056704ba948c1c54c7a67d78a8399a749f2d04b
regulator: qcom-labibb: Implement pull-down, softstart, active discharge

Soft start is required to avoid inrush current during LAB ramp-up and
IBB ramp-down, protecting connected hardware to which we supply voltage.

Since soft start is configurable on both LAB and IBB regulators, it
was necessary to add two DT properties, respectively "qcom,soft-start-us"
to control LAB ramp-up and "qcom,discharge-resistor-kohms" to control
the discharge resistor for IBB ramp-down, which obviously brought the
need of implementing a of_parse callback for both regulators.

Finally, also implement pull-down mode in order to avoid unpredictable
behavior when the regulators are disabled (random voltage spikes etc).

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20210119174421.226541-4-angelogioacchino.delregno@somainline.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/qcom-labibb-regulator.c