lkml.org 
[lkml]   [2019]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 10/11] regulator: pv88090: Convert to use regulator_set/get_current_limit_regmap
Date
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@diasemi.com>;

Thanks,
Regards,
Steve


\
 
 \ /
  Last update: 2019-02-28 16:48    [W:0.413 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site