Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1384810

Re: [PATCH v2 3/7] regulator: rk808: Migrate to regulator core's simplified DT parsing code

From Wadim Egorov <w.egorov@phytec.de>
Newsgroups linux.kernel
Subject Re: [PATCH v2 3/7] regulator: rk808: Migrate to regulator core's simplified DT parsing code
Date 2016-04-22 11:10 +0200
Message-ID <rqFg7-7ZV-23@gated-at.bofh.it> (permalink)
References <rqmGu-1gD-9@gated-at.bofh.it> <rqmGv-1gD-19@gated-at.bofh.it> <rqpl1-3pZ-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 21.04.2016 18:01, Mark Brown wrote:
> On Thu, Apr 21, 2016 at 03:12:37PM +0200, Wadim Egorov wrote:
>
>> +static int rk808_set_suspend_voltage(struct regulator_dev *rdev, int uv)
>> +{
>> +	unsigned int reg;
>> +	int sel = regulator_map_voltage_linear(rdev, uv, uv);
>> +
>> +	if (sel < 0)
>> +		return -EINVAL;
>> +
>> +	reg = rdev->desc->vsel_reg + RK808_SLP_REG_OFFSET;
>> +
>> +	return regmap_update_bits(rdev->regmap, reg,
>> +				  rdev->desc->vsel_mask,
>> +				  sel);
>> +}
> This is fine but is adding a new feature and not part of the refactoring
> that the changelog talked about so should be in a separate commit.

This is not really a new feature.
rk808_set_suspend_voltage() was using regulator_map_voltage_linear_range().
I have just renamed the function to rk808_set_suspend_voltage_range()
and added an ops struct for ranges.
Yes, I have also added rk808_set_suspend_voltage(), but this is just a split
for the two types of ops that the driver needs now.
This was needed, because the driver used only linear ranges.
IMO it should be a part of the refactoring.

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 3/7] regulator: rk808: Migrate to regulator core's simplified DT parsing code Wadim Egorov <w.egorov@phytec.de> - 2016-04-21 15:20 +0200
  Re: [PATCH v2 3/7] regulator: rk808: Migrate to regulator core's  simplified DT parsing code Mark Brown <broonie@kernel.org> - 2016-04-21 18:10 +0200
    Re: [PATCH v2 3/7] regulator: rk808: Migrate to regulator core's  simplified DT parsing code Wadim Egorov <w.egorov@phytec.de> - 2016-04-22 11:10 +0200
      Re: [PATCH v2 3/7] regulator: rk808: Migrate to regulator core's  simplified DT parsing code Mark Brown <broonie@kernel.org> - 2016-04-22 11:50 +0200

csiph-web