regulator: qcom-labibb: Implement voltage selector ops
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Wed, 13 Jan 2021 19:42:08 +0000 (20:42 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 15 Jan 2021 14:27:50 +0000 (14:27 +0000)
commitdd582369c6c1f39ec475af6191a934f3e57fda35
tree5a7a17d4e7f585466ec17ab864b68da8325e0694
parentc2fa56173ba66bab8f0005789c383cb8cc2aaf62
regulator: qcom-labibb: Implement voltage selector ops

Implement {get,set}_voltage_sel, list_voltage, map_voltage with
the useful regulator regmap helpers in order to be able to manage
the voltage of LAB (positive) and IBB (negative) regulators.

In particular, the supported ranges are the following:
- LAB (pos):  4600mV to  6100mV with 100mV stepping,
- IBB (neg): -7700mV to -1400mV with 100mV stepping.

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