On 28 February 2019 13:40, Axel Lin wrote: > Subject: [PATCH 09/11] regulator: pv88080: Convert to use > regulator_set/get_current_limit_regmap > > Use regulator_set/get_current_limit_regmap helpers to save some code.
[...] Hi Axel, Looks good to me. Thanks again. Acked-by: Steve Twiss <stwiss.opensou...@diasemi.com> Regards, Steve [...] > @@ -315,8 +276,8 @@ static const struct regulator_ops pv88080_buck_ops = { > .set_voltage_sel = regulator_set_voltage_sel_regmap, > .get_voltage_sel = regulator_get_voltage_sel_regmap, > .list_voltage = regulator_list_voltage_linear, > - .set_current_limit = pv88080_set_current_limit, > - .get_current_limit = pv88080_get_current_limit, > + .set_current_limit = regulator_set_current_limit_regmap, > + .get_current_limit = regulator_get_current_limit_regmap, > }; [...] > > static const struct regulator_ops pv88080_hvbuck_ops = { > @@ -341,9 +302,9 @@ static const struct regulator_ops pv88080_hvbuck_ops = { > .min_uV = min, \ > .uV_step = step, \ > .n_voltages = ((max) - (min))/(step) + 1, \ > + .curr_table = limits_array, \ > + .n_current_limits = ARRAY_SIZE(limits_array), \ > },\ > - .current_limits = limits_array, \ > - .n_current_limits = ARRAY_SIZE(limits_array), \ > } > > #define PV88080_HVBUCK(chip, regl_name, min, step, max) \ > @@ -521,9 +482,9 @@ static int pv88080_i2c_probe(struct i2c_client *i2c, > if (init_data) > config.init_data = &init_data[i]; > > - pv88080_regulator_info[i].limit_reg > + pv88080_regulator_info[i].desc.csel_reg > = regmap_config->buck_regmap[i].buck_limit_reg; > - pv88080_regulator_info[i].limit_mask > + pv88080_regulator_info[i].desc.csel_mask > = regmap_config->buck_regmap[i].buck_limit_mask; > pv88080_regulator_info[i].mode_reg > = regmap_config->buck_regmap[i].buck_mode_reg; > -- > 2.17.1