RE: [PATCH 10/11] regulator: pv88090: Convert to use regulator_set/get_current_limit_regmap
From: Steve Twiss
Date: Thu Feb 28 2019 - 10:47:14 EST
On 28 February 2019 13:40, Axel Lin wrote:
Hi Axel,
> Subject: [PATCH 10/11] regulator: pv88090: Convert to use
> regulator_set/get_current_limit_regmap
>
> Use regulator_set/get_current_limit_regmap helpers to save some code.
[...]
> @@ -193,8 +155,8 @@ static const struct regulator_ops pv88090_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 = pv88090_set_current_limit,
> - .get_current_limit = pv88090_get_current_limit,
> + .set_current_limit = regulator_set_current_limit_regmap,
> + .get_current_limit = regulator_get_current_limit_regmap,
> };
>
> static const struct regulator_ops pv88090_ldo_ops = {
> @@ -223,10 +185,11 @@ static const struct regulator_ops pv88090_ldo_ops = {
> .enable_mask = PV88090_##regl_name##_EN, \
> .vsel_reg = PV88090_REG_##regl_name##_CONF0, \
> .vsel_mask = PV88090_V##regl_name##_MASK, \
> + .curr_table = limits_array, \
> + .n_current_limits = ARRAY_SIZE(limits_array), \
> + .csel_reg = PV88090_REG_##regl_name##_CONF1, \
> + .csel_mask = PV88090_##regl_name##_ILIM_MASK, \
> },\
> - .current_limits = limits_array, \
> - .n_current_limits = ARRAY_SIZE(limits_array), \
> - .limit_mask = PV88090_##regl_name##_ILIM_MASK, \
> .conf = PV88090_REG_##regl_name##_CONF1, \
> .conf2 = PV88090_REG_##regl_name##_CONF2, \
Acked-by: Steve Twiss <stwiss.opensource@xxxxxxxxxxx>;
Thanks,
Regards,
Steve