From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 01/01] regulator: support max8649
Date: Tue, 26 Jan 2010 11:04:20 +0000 [thread overview]
Message-ID: <20100126110420.GI15759@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <771cded01001252226k342723b3p3ea235fe79c46843@mail.gmail.com>
On Tue, Jan 26, 2010 at 01:26:08AM -0500, Haojian Zhuang wrote:
This all looks good except...
> +static int max8649_enable_time(struct regulator_dev *rdev)
> +{
...
> + return (voltage / step);
I'd expect the time taken to enable to be the voltage multipled by the
step size rather than divided by the step size?
> +static int max8649_set_mode(struct regulator_dev *rdev, unsigned int mode)
> +{
> + struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
> +
> + switch (mode) {
> + case REGULATOR_MODE_FAST:
> + max8649_set_bits(info->i2c, info->vol_reg, MAX8649_FORCE_PWM,
> + MAX8649_FORCE_PWM);
> + break;
> + case REGULATOR_MODE_NORMAL:
> + max8649_set_bits(info->i2c, info->vol_reg,
> + MAX8649_FORCE_PWM, 0);
> + break;
This should really have a default case which rejects other modes.
next prev parent reply other threads:[~2010-01-26 11:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <771cded01001120041ue24edabk8e4638ef7151c947@mail.gmail.com>
[not found] ` <771cded01001120051l44fd76bx80d2fd4b6f60bd0b@mail.gmail.com>
2010-01-12 11:51 ` [PATCH 01/01] regulator: support max8649 Mark Brown
2010-01-25 11:01 ` Haojian Zhuang
2010-01-25 13:56 ` Mark Brown
2010-01-26 6:26 ` Haojian Zhuang
2010-01-26 11:01 ` Liam Girdwood
2010-01-26 11:51 ` Haojian Zhuang
2010-01-26 11:04 ` Mark Brown [this message]
2010-01-26 11:54 ` Haojian Zhuang
2010-01-26 12:00 ` Mark Brown
2010-01-26 12:14 ` Haojian Zhuang
2010-01-26 12:41 ` Mark Brown
2010-01-26 16:10 ` Liam Girdwood
2010-03-08 6:28 ` Haojian Zhuang
2010-03-08 8:18 ` Liam Girdwood
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=20100126110420.GI15759@rakim.wolfsonmicro.main \
--to=broonie@opensource.wolfsonmicro.com \
--cc=haojian.zhuang@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
/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