RE: [PATCH 08/11] regulator: pv88060: Convert to use regulator_set/get_current_limit_regmap

From: Steve Twiss
Date: Thu Feb 28 2019 - 10:26:25 EST


On 28 February 2019 13:40, Axel Lin wrote:

> Subject: [PATCH 08/11] regulator: pv88060: 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.opensource@xxxxxxxxxxx>

Regards,
Steve

> @@ -171,8 +133,8 @@ static const struct regulator_ops pv88060_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 = pv88060_set_current_limit,
> - .get_current_limit = pv88060_get_current_limit,
> + .set_current_limit = regulator_set_current_limit_regmap,
> + .get_current_limit = regulator_get_current_limit_regmap,
> };
>
> static const struct regulator_ops pv88060_ldo_ops = {
> @@ -207,10 +169,11 @@ static const struct regulator_ops pv88060_sw_ops = {
> .enable_mask = PV88060_BUCK_EN, \
> .vsel_reg = PV88060_REG_##regl_name##_CONF0,\
> .vsel_mask = PV88060_VBUCK_MASK,\
> + .curr_table = limits_array,\
> + .n_current_limits = ARRAY_SIZE(limits_array),\
> + .csel_reg = PV88060_REG_##regl_name##_CONF1,\
> + .csel_mask = PV88060_BUCK_ILIM_MASK,\
> },\
> - .current_limits = limits_array,\
> - .n_current_limits = ARRAY_SIZE(limits_array),\
> - .limit_mask = PV88060_BUCK_ILIM_MASK, \
> .conf = PV88060_REG_##regl_name##_CONF1,\
> }
>
> --
> 2.17.1