From: broonie@opensource.wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] regulator: Add support for MAX77686.
Date: Sun, 20 May 2012 11:00:15 +0100 [thread overview]
Message-ID: <20120520100015.GC20652@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1337261967-26004-3-git-send-email-yadi.brar@samsung.com>
On Thu, May 17, 2012 at 07:09:27PM +0530, Yadwinder Singh Brar wrote:
Looks mostly good. A couple of fairly small things:
> +static int max77686_get_voltage_sel(struct regulator_dev *rdev)
> +{
This looks like it should be regulator_get_voltage_sel_regmap().
> +static int max77686_set_voltage_sel(struct regulator_dev *rdev,
> + unsigned sel)
> +{
This looks like it should be regulator_set_voltage_sel_regmap().
> + max77686->ramp_delay = pdata->ramp_delay - 1;
> + max77686_update_reg(i2c, MAX77686_REG_BUCK2CTRL1,
> + RAMP_VALUE, RAMP_MASK);
> + max77686_update_reg(i2c, MAX77686_REG_BUCK3CTRL1,
> + RAMP_VALUE, RAMP_MASK);
> + max77686_update_reg(i2c, MAX77686_REG_BUCK4CTRL1,
> + RAMP_VALUE, RAMP_MASK);
This code is unclear because RAMP_VALUE looks like a constant that has
nothing to do with ramp_delay when in fact it's actually this:
> +#define RAMP_VALUE (max77686->ramp_delay << 6)
which isn't constant - this is why I queried this last time. Just
remove the define and write this out directly. The way the code is
written@the minute it looks like ramp_delay is just stored and not
referred to unless you go searching around the rest of the driver.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120520/bb6500c2/attachment.sig>
next prev parent reply other threads:[~2012-05-20 10:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-17 13:39 [PATCH v2 0/2] regulator: Add initial suport for max77686 Yadwinder Singh Brar
2012-05-17 13:39 ` [PATCH v2 1/2] mfd: Add support for MAX77686 Yadwinder Singh Brar
2012-05-20 9:47 ` Mark Brown
2012-05-17 13:39 ` [PATCH v2 2/2] regulator: " Yadwinder Singh Brar
2012-05-20 10:00 ` Mark Brown [this message]
2012-05-21 7:57 ` Yadwinder Singh Brar
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=20120520100015.GC20652@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=linux-arm-kernel@lists.infradead.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).