To get the current voltage from the regulators the .get_voltage_sel
callback is needed. Initialize it to the correct function.

Signed-off-by: Sascha Hauer <[email protected]>
---
 drivers/regulator/stpmic1_regulator.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/regulator/stpmic1_regulator.c 
b/drivers/regulator/stpmic1_regulator.c
index c8b56e3a1a..ef8cc7f145 100644
--- a/drivers/regulator/stpmic1_regulator.c
+++ b/drivers/regulator/stpmic1_regulator.c
@@ -126,6 +126,7 @@ static const struct regulator_ops stpmic1_ldo_ops = {
        .is_enabled = regulator_is_enabled_regmap,
        .enable = regulator_enable_regmap,
        .disable = regulator_disable_regmap,
+       .get_voltage_sel = regulator_get_voltage_sel_regmap,
        .set_voltage_sel = regulator_set_voltage_sel_regmap,
 };
 
@@ -135,6 +136,7 @@ static const struct regulator_ops stpmic1_ldo3_ops = {
        .is_enabled = regulator_is_enabled_regmap,
        .enable = regulator_enable_regmap,
        .disable = regulator_disable_regmap,
+       .get_voltage_sel = regulator_get_voltage_sel_regmap,
        .set_voltage_sel = regulator_set_voltage_sel_regmap,
 };
 
@@ -150,6 +152,7 @@ static const struct regulator_ops stpmic1_buck_ops = {
        .is_enabled = regulator_is_enabled_regmap,
        .enable = regulator_enable_regmap,
        .disable = regulator_disable_regmap,
+       .get_voltage_sel = regulator_get_voltage_sel_regmap,
        .set_voltage_sel = regulator_set_voltage_sel_regmap,
 };
 
-- 
2.39.2


Reply via email to