Implement callback API to get the current voltage selection register and its voltage mask value.
Signed-off-by: Laxman Dewangan <[email protected]> --- drivers/regulator/max8973-regulator.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/regulator/max8973-regulator.c b/drivers/regulator/max8973-regulator.c index 00cf91c..b0f4f58 100644 --- a/drivers/regulator/max8973-regulator.c +++ b/drivers/regulator/max8973-regulator.c @@ -199,6 +199,16 @@ static int max8973_dcdc_set_voltage_sel(struct regulator_dev *rdev, return 0; } +static int max8973_dcdc_get_voltage_sel_register(struct regulator_dev *rdev, + unsigned *vsel_reg, unsigned *vsel_mask) +{ + struct max8973_chip *max = rdev_get_drvdata(rdev); + + *vsel_reg = max->curr_vout_reg; + *vsel_mask = MAX8973_VOUT_MASK; + return 0; +} + static int max8973_dcdc_set_mode(struct regulator_dev *rdev, unsigned int mode) { struct max8973_chip *max = rdev_get_drvdata(rdev); @@ -247,6 +257,7 @@ static const struct regulator_ops max8973_dcdc_ops = { .get_voltage_sel = max8973_dcdc_get_voltage_sel, .set_voltage_sel = max8973_dcdc_set_voltage_sel, .list_voltage = regulator_list_voltage_linear, + .get_voltage_sel_register = max8973_dcdc_get_voltage_sel_register, .set_mode = max8973_dcdc_set_mode, .get_mode = max8973_dcdc_get_mode, }; -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

