RE: [PATCH 03/11] regulator: da9055: Convert to use regulator_set/get_current_limit_regmap

From: Steve Twiss
Date: Thu Feb 28 2019 - 10:18:22 EST


On 28 February 2019 13:40, Axel Lin,

> Subject: [PATCH 03/11] regulator: da9055: Convert to use
> regulator_set/get_current_limit_regmap
>
> Use regulator_set/get_current_limit_regmap helpers to save some code.

[...]

> @@ -329,8 +298,8 @@ static const struct regulator_ops da9055_buck_ops = {
> .get_mode = da9055_buck_get_mode,
> .set_mode = da9055_buck_set_mode,
>
> - .get_current_limit = da9055_buck_get_current_limit,
> - .set_current_limit = da9055_buck_set_current_limit,
> + .get_current_limit = regulator_get_current_limit_regmap,
> + .set_current_limit = regulator_set_current_limit_regmap,
>
> .get_voltage_sel = da9055_regulator_get_voltage_sel,
> .set_voltage_sel = da9055_regulator_set_voltage_sel,
> @@ -407,6 +376,10 @@ static const struct regulator_ops da9055_ldo_ops = {
> .uV_step = (step) * 1000,\
> .linear_min_sel = (voffset),\
> .owner = THIS_MODULE,\
> + .curr_table = da9055_current_limits,\
> + .n_current_limits = ARRAY_SIZE(da9055_current_limits),\
> + .csel_reg = DA9055_REG_BUCK_LIM,\
> + .csel_mask = (mbits),\

Hi Axel,

Thanks.

Acked-by: Steve Twiss <stwiss.opensource@xxxxxxxxxxx>

Regards,
Steve