devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wadim Egorov <w.egorov@phytec.de>
To: Mark Brown <broonie@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	rtc-linux@googlegroups.com, devicetree@vger.kernel.org,
	linux-rockchip@lists.infradead.org, robh+dt@kernel.org,
	pawel.moll@arm.com, mark.rutland@arm.com,
	ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
	mturquette@baylibre.com, sboyd@codeaurora.org,
	lee.jones@linaro.org, lgirdwood@gmail.com, a.zummo@towertech.it,
	alexandre.belloni@free-electrons.com, dianders@chromium.org,
	zyw@rock-chips.com
Subject: Re: [PATCH v2 3/7] regulator: rk808: Migrate to regulator core's simplified DT parsing code
Date: Fri, 22 Apr 2016 11:03:09 +0200	[thread overview]
Message-ID: <5719E8CD.1070304@phytec.de> (raw)
In-Reply-To: <20160421160120.GT3217@sirena.org.uk>



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.


  reply	other threads:[~2016-04-22  9:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-21 13:12 [PATCH v2 0/5] Add support for rk818 Wadim Egorov
2016-04-21 13:12 ` [PATCH v2 1/7] drivers: mfd: rk808: rename rk808 struct to rk8xx Wadim Egorov
2016-04-21 14:20   ` Alexandre Belloni
2016-04-21 13:12 ` [PATCH v2 2/7] mfd: RK808: Add RK818 support Wadim Egorov
     [not found] ` <1461244361-45686-1-git-send-email-w.egorov-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org>
2016-04-21 13:12   ` [PATCH v2 3/7] regulator: rk808: Migrate to regulator core's simplified DT parsing code Wadim Egorov
     [not found]     ` <1461244361-45686-4-git-send-email-w.egorov-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org>
2016-04-21 16:01       ` Mark Brown
2016-04-22  9:03         ` Wadim Egorov [this message]
     [not found]           ` <5719E8CD.1070304-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org>
2016-04-22  9:41             ` Mark Brown
2016-04-21 13:12   ` [PATCH v2 4/7] regulator: rk808: Add regulator driver for RK818 Wadim Egorov
2016-04-21 16:02     ` Mark Brown
2016-04-21 13:12   ` [PATCH v2 7/7] rtc: Kconfig: Name RK818 in Kconfig for RTC_DRV_RK808 Wadim Egorov
     [not found]     ` <1461244361-45686-8-git-send-email-w.egorov-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org>
2016-04-21 14:35       ` Alexandre Belloni
2016-04-21 13:12 ` [PATCH v2 5/7] mfd: dt-bindings: Add RK818 device tree bindings document Wadim Egorov
2016-04-22 20:25   ` Rob Herring
2016-04-21 13:12 ` [PATCH v2 6/7] clk: Kconfig: Name RK818 in Kconfig for COMMON_CLK_RK808 Wadim Egorov
     [not found]   ` <1461244361-45686-7-git-send-email-w.egorov-guT5V/WYfQezQB+pC5nmwQ@public.gmane.org>
2016-04-22 21:37     ` Stephen Boyd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5719E8CD.1070304@phytec.de \
    --to=w.egorov@phytec.de \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=mturquette@baylibre.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=sboyd@codeaurora.org \
    --cc=zyw@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).