From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Yadwinder Singh Brar <yadi.brar01@gmail.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Sangbeom Kim <sbkim73@samsung.com>,
Lee Jones <lee.jones@linaro.org>,
Sachin Kamat <sachin.kamat@linaro.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
Tomasz Figa <t.figa@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
devicetree <devicetree@vger.kernel.org>
Subject: Re: [PATCH 1/3] regulator: s2mps11: Refactor setting ramp delay
Date: Tue, 27 May 2014 08:57:18 +0200 [thread overview]
Message-ID: <1401173838.8073.4.camel@AMDC1943> (raw)
In-Reply-To: <CAKew6eV63jkFtpeaHGj4c5fUq0jZYFNzvf_W-fOrtJ5opnadyg@mail.gmail.com>
On wto, 2014-05-27 at 11:56 +0530, Yadwinder Singh Brar wrote:
> Hi Krzysztof,
>
>
> On Mon, May 26, 2014 at 6:50 PM, Krzysztof Kozlowski
> <k.kozlowski@samsung.com> wrote:
> > Prepare for merging the s2mpa01 regulator driver into s2mps11 by:
> > 1. Adding common id for buck regulators.
> > 2. Splitting shared ramp delay settings to match S2MPA01.
> > 3. Adding a configuration of registers for setting ramp delay for each
> > buck regulator.
> >
> > The functionality of the driver should not change as this patch only
> > prepares for supporting S2MPA01 device.
> >
> > Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> > ---
> > drivers/regulator/s2mps11.c | 210 ++++++++++++++++++++++++++++++--------------
> > 1 file changed, 144 insertions(+), 66 deletions(-)
> >
>
> [snip]
>
> >
> > - if (ramp_delay > s2mps11->ramp_delay34)
> > - s2mps11->ramp_delay34 = ramp_delay;
> > + if (ramp_delay > s2mps11->ramp_delay3)
> > + s2mps11->ramp_delay3 = ramp_delay;
> > else
> > - ramp_delay = s2mps11->ramp_delay34;
> > -
> > - ramp_shift = S2MPS11_BUCK34_RAMP_SHIFT;
> > - ramp_reg = S2MPS11_REG_RAMP;
> > + ramp_delay = s2mps11->ramp_delay3;
> > break;
> > case S2MPS11_BUCK4:
> > - enable_shift = S2MPS11_BUCK4_RAMP_EN_SHIFT;
> > if (!ramp_delay) {
> > ramp_enable = 0;
> > break;
> > }
> >
> > - if (ramp_delay > s2mps11->ramp_delay34)
> > - s2mps11->ramp_delay34 = ramp_delay;
> > + if (ramp_delay > s2mps11->ramp_delay4)
> > + s2mps11->ramp_delay4 = ramp_delay;
> > else
> > - ramp_delay = s2mps11->ramp_delay34;
> > -
> > - ramp_shift = S2MPS11_BUCK34_RAMP_SHIFT;
> > - ramp_reg = S2MPS11_REG_RAMP;
> > + ramp_delay = s2mps11->ramp_delay4;
>
> Main rationale behind shared value is completely omitted here, in
> other cases also,
> after just giving a NOTE in documentation asking user to make sure to
> pass same value.
> It doesn't seem safe, simply leaving a scope of stability issue (in
> case ramp_delay3 > ramp_delay4).
The documentation already states that these bucks (e.g. 3 and 4) share
the ramp delay setting and 'regulator-ramp-delay' should be the same.
However you're right that patch is not safe against changing shared ramp
delays to different values. Previously the code was safe so this is not
entirely "non-functional" change. I'll fix it to retain the same
behavior.
Best regards,
Krzysztof
next prev parent reply other threads:[~2014-05-27 6:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-26 13:20 [PATCH 0/3] regulator: merge s2mps11 and s2mpa01 drivers Krzysztof Kozlowski
2014-05-26 13:20 ` [PATCH 1/3] regulator: s2mps11: Refactor setting ramp delay Krzysztof Kozlowski
2014-05-27 6:26 ` Yadwinder Singh Brar
2014-05-27 6:57 ` Krzysztof Kozlowski [this message]
2014-05-26 13:20 ` [PATCH 2/3] regulator: s2mps11: Merge S2MPA01 driver Krzysztof Kozlowski
[not found] ` <1401110423-5647-3-git-send-email-k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-05-27 6:30 ` Yadwinder Singh Brar
2014-05-27 7:56 ` Krzysztof Kozlowski
2014-05-27 8:46 ` Yadwinder Singh Brar
[not found] ` <1401110423-5647-1-git-send-email-k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-05-26 13:20 ` [PATCH 3/3] regulator: s2mpa01: Remove driver because it was merged into s2mps11 Krzysztof Kozlowski
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=1401173838.8073.4.camel@AMDC1943 \
--to=k.kozlowski@samsung.com \
--cc=b.zolnierkie@samsung.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=sachin.kamat@linaro.org \
--cc=sbkim73@samsung.com \
--cc=t.figa@samsung.com \
--cc=yadi.brar01@gmail.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).