From: Kyle Manna <kyle.manna@fuel7.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: linux-kernel@vger.kernel.org,
Samuel Ortiz <sameo@linux.intel.com>, Liam Girdwood <lrg@ti.com>,
Jorge Eduardo Candelaria <jedu@slimlogic.co.uk>,
Graeme Gregory <gg@slimlogic.co.uk>
Subject: Re: [PATCH 5/6] mfd: TPS65910: Fix tps65910_set_voltage
Date: Thu, 20 Oct 2011 10:21:42 -0500 [thread overview]
Message-ID: <4EA03C86.7020900@fuel7.com> (raw)
In-Reply-To: <20111019133258.GG18713@sirena.org.uk>
Hi Mark,
I've reviewed the patch and the core regulator framework after reading
your comments. This patch worked around a subtle bug that I didn't
notice and is hence not needed. The root cause was fixed and the
voltage selectors work as desired.
Will update the patch series and resend.
- Kyle
On 10/19/2011 08:32 AM, Mark Brown wrote:
> On Tue, Oct 18, 2011 at 01:26:27PM -0500, Kyle Manna wrote:
>
> *Always* CC maintainers on patches.
>
>> Previously tps65910_set_voltage() only selected from a fixed number of
>> voltages. Rename that function to tps65910_set_voltage_sel(). Do the
>> same for tps65911_set_voltage().
> What is the issue being fixed here? This looks like a stylistic change
> rateher than a bug fix.
>
>> Also add a tps65910_set_voltage that works with the regulator framework
>> and applies the correct voltage with apply_uv is set in the regulator's
>> constraints.
> So this is adding support for a new chip? Whatever the answer it's
> clearly a distinct change from the above and should therefore be a
> separate patch.
>
>> + /* Pick the nearest selector */
>> + for (i = 0; i< tps65910_regs[id].table_len; i++) {
>> + new_uV = tps65910_regs[id].table[i] * 1000;
>> +
>> + if (new_uV>= min_uV&& new_uV<= max_uV&&
>> + (abs(new_uV - midpoint)< abs(selected_uV - midpoint))) {
>> + *selector = i;
>> + selected_uV = tps65910_regs[id].table[i] * 1000;
>> + }
>> + }
> This looks wrong, the expected behaviour for the regulator API is that
> the driver will pick the minimum voltage within the range. Why is this
> being done?
next prev parent reply other threads:[~2011-10-20 15:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-18 18:26 [PATCH 0/6] mfd: TPS65910 bug fixes and enhancements Kyle Manna
2011-10-18 18:26 ` [PATCH 1/6] mfd: TPS65910: Handle non-existent devices Kyle Manna
2011-10-18 18:26 ` [PATCH 2/6] mfd: TPS65910: Add I2C slave address macros Kyle Manna
2011-10-18 18:26 ` [PATCH 3/6] mfd: TPS65910: Fix typo that clobbers genirq Kyle Manna
2011-10-18 18:26 ` [PATCH 4/6] mfd: TPS65910: Move linux/gpio.h include to header Kyle Manna
2011-10-18 18:26 ` [PATCH 5/6] mfd: TPS65910: Fix tps65910_set_voltage Kyle Manna
2011-10-19 13:32 ` Mark Brown
2011-10-20 15:21 ` Kyle Manna [this message]
2011-10-18 18:26 ` [PATCH 6/6] mfd: TPS65910: Improve regulator init data Kyle Manna
2011-10-19 14:00 ` Mark Brown
2011-10-24 16:13 ` Kyle Manna
2011-10-18 18:42 ` [PATCH 0/6] mfd: TPS65910 bug fixes and enhancements Graeme Gregory
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=4EA03C86.7020900@fuel7.com \
--to=kyle.manna@fuel7.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=gg@slimlogic.co.uk \
--cc=jedu@slimlogic.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.com \
--cc=sameo@linux.intel.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).