From: Karol Lewandowski <k.lewandowsk@samsung.com>
To: Karol Lewandowski <k.lewandowsk@samsung.com>
Cc: broonie@opensource.wolfsonmicro.com,
linux-kernel@vger.kernel.org, m.szyprowski@samsung.com,
s.nawrocki@samsung.com, lrg@ti.com,
Kyungmin Park <kyungmin.park@samsung.com>,
Thomas Abraham <thomas.abraham@linaro.org>
Subject: Re: [PATCH] regulator: Set apply_uV only when min and max voltages are defined
Date: Wed, 25 Jan 2012 11:15:12 +0100 [thread overview]
Message-ID: <4F1FD630.8070606@samsung.com> (raw)
In-Reply-To: <1327483905-27007-1-git-send-email-k.lewandowsk@samsung.com>
On 25.01.2012 10:31, Karol Lewandowski wrote:
> apply_uV is errornously set when regulator is instantiated from device
> tree, even when it doesn't contain any voltage constraints.
...
> - if (constraints->min_uV == constraints->max_uV)
> + if (min_uV&& max_uV&& constraints->min_uV == constraints->max_uV)
> constraints->apply_uV = true;
While this fixes obvious error I doubt that apply_uV should be set based
on min max equality. It have required fix to fixed regulator[1]
as well for max8997[2]. It'll probably require fixes in other places too.
Wouldn't it be better to explicitly use property like
"regulator-voltage-apply" in DT to set apply_uV?
if (min_uV && max_uV && constraints->min_uV == constraints->max_uV
&& of_find_property "regulator-voltage-apply")
constraints->apply_uV = true;
This would be consistent with handling of this flag from platform data.
[1] http://permalink.gmane.org/gmane.linux.kernel/1234969
[2] http://permalink.gmane.org/gmane.linux.kernel/1243714
Regards,
--
Karol Lewandowski | Samsung Poland R&D Center | Linux/Platform
next prev parent reply other threads:[~2012-01-25 10:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-25 9:31 [PATCH] regulator: Set apply_uV only when min and max voltages are defined Karol Lewandowski
2012-01-25 10:15 ` Karol Lewandowski [this message]
2012-01-25 10:33 ` Karol Lewandowski
2012-01-25 11:22 ` Mark Brown
2012-01-25 11:39 ` Mark Brown
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=4F1FD630.8070606@samsung.com \
--to=k.lewandowsk@samsung.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
--cc=m.szyprowski@samsung.com \
--cc=s.nawrocki@samsung.com \
--cc=thomas.abraham@linaro.org \
/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).