[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <VI1PR10MB2352E636D2F84B09511B4D9AFE750@VI1PR10MB2352.EURPRD10.PROD.OUTLOOK.COM>
Date: Thu, 28 Feb 2019 15:41:27 +0000
From: Steve Twiss <stwiss.opensource@...semi.com>
To: Axel Lin <axel.lin@...ics.com>, Mark Brown <broonie@...nel.org>
CC: James Seong-Won Ban <James.Ban.opensource@...semi.com>,
Support Opensource <Support.Opensource@...semi.com>,
"patches@...nsource.cirrus.com" <patches@...nsource.cirrus.com>,
Ashish Jangam <ashish.jangam@...tcummins.com>,
Paul Kocialkowski <contact@...lk.fr>,
Milo Kim <milo.kim@...com>, Keerthy <j-keerthy@...com>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Liam Girdwood <lgirdwood@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 09/11] regulator: pv88080: Convert to use
regulator_set/get_current_limit_regmap
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.opensource@...semi.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
Powered by blists - more mailing lists