From: Liam Girdwood <lrg@slimlogic.co.uk>
To: Colin Cross <ccross@android.com>
Cc: linux-kernel@vger.kernel.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: [PATCH] regulator: twl-regulator: fix n_voltages for twl6030 variable LDOs
Date: Mon, 30 May 2011 13:51:06 +0100 [thread overview]
Message-ID: <1306759866.3227.4.camel@odin> (raw)
In-Reply-To: <1306524327-24150-1-git-send-email-ccross@android.com>
On Fri, 2011-05-27 at 12:25 -0700, Colin Cross wrote:
> The n_voltages initializer for the TWL6030_ADJUSTABLE_LDO macro is
> off by one, causing the the highest supported voltage to be
> unreachable. Setting the machine constraints to only allow the
> highest voltage causes errors:
>
> machine_constraints_voltage: VAUX3_6030: unsupportable voltage constraints
> twl_reg twl_reg.39: can't register VAUX3_6030, -22
> twl_reg: probe of twl_reg.39 failed with error -22
>
> This patch fixes the off by one error. Tested by setting
> VAUX3_6030 to 3.3V.
>
> Signed-off-by: Colin Cross <ccross@android.com>
> ---
> drivers/regulator/twl-regulator.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
> index 6a29285..afd9c7e 100644
> --- a/drivers/regulator/twl-regulator.c
> +++ b/drivers/regulator/twl-regulator.c
> @@ -520,7 +520,7 @@ static struct regulator_ops twl6030_fixed_resource = {
> .desc = { \
> .name = #label, \
> .id = TWL6030_REG_##label, \
> - .n_voltages = (max_mVolts - min_mVolts)/100, \
> + .n_voltages = (max_mVolts - min_mVolts)/100 + 1, \
> .ops = &twl6030ldo_ops, \
> .type = REGULATOR_VOLTAGE, \
> .owner = THIS_MODULE, \
Applied.
Thanks
Liam
prev parent reply other threads:[~2011-05-30 12:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-27 19:25 [PATCH] regulator: twl-regulator: fix n_voltages for twl6030 variable LDOs Colin Cross
2011-05-28 17:56 ` Mark Brown
2011-05-30 12:51 ` Liam Girdwood [this message]
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=1306759866.3227.4.camel@odin \
--to=lrg@slimlogic.co.uk \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=ccross@android.com \
--cc=linux-kernel@vger.kernel.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