From: snjw23@gmail.com (Sylwester Nawrocki)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] regulator: Add support for MAX77686.
Date: Wed, 09 May 2012 21:54:14 +0200 [thread overview]
Message-ID: <4FAACB66.3020706@gmail.com> (raw)
In-Reply-To: <1336580695-1184-3-git-send-email-yadi.brar@samsung.com>
Hi,
just a few nitpicks...
On 05/09/2012 06:24 PM, Yadwinder Singh wrote:
> From: Yadwinder Singh Brar<yadi.brar@samsung.com>
>
> Add support for PMIC/regulator portion of MAX77686 multifunction device.
> MAX77686 provides LDOs[1-26] and BUCKs[1-9]. This is initial release of driver
> which supports setting and getting the voltage of a regulator with I2C
> interface.
>
> Signed-off-by: Yadwinder Singh Brar<yadi.brar@samsung.com>
...
> diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c
> new file mode 100644
> index 0000000..4aa9722
> --- /dev/null
> +++ b/drivers/regulator/max77686.c
> @@ -0,0 +1,660 @@
> +/*
> + * max77686.c - Regulator driver for the Maxim 77686
> + *
> + * Copyright (C) 2012 Samsung Electronics
I believe this should read:
+ * Copyright (C) 2012 Samsung Electronics Co., Ltd.
In patch 1/2 the copyright notice is also not exactly correct.
> + * Chiwoong Byun<woong.byun@smasung.com>
s/smasung/samsung
...
> +static int max77686_get_enable_register(struct regulator_dev *rdev,
> + int *reg, int *mask, int *pattern)
> +{
> + int rid = rdev_get_id(rdev);
> +
> + switch (rid) {
> + case MAX77686_LDO1...MAX77686_LDO26:
> + *reg = MAX77686_REG_LDO1CTRL1 + (rid - MAX77686_LDO1);
> + *mask = 0xC0;
> + *pattern = 0xC0;
What about using lower case for all hex numbers ?
...
> +static int max77686_get_voltage_register(struct regulator_dev *rdev,
> + int *_reg, int *_shift, int *_mask)
> +{
...
> + case MAX77686_BUCK2:
> + reg = MAX77686_REG_BUCK2DVS1;
> + mask = 0xff;
> + break;
> + case MAX77686_BUCK3:
> + reg = MAX77686_REG_BUCK3DVS1;
> + mask = 0xff;
> + break;
> + case MAX77686_BUCK4:
> + reg = MAX77686_REG_BUCK4DVS1;
> + mask = 0xff;
> + break;
> + case MAX77686_BUCK5...MAX77686_BUCK9:
> + reg = MAX77686_REG_BUCK5OUT + (rid - MAX77686_BUCK5) * 2;
> + break;
> + default:
> + return -EINVAL;
> + }
> +
> + *_reg = reg;
> + *_shift = shift;
> + *_mask = mask;
> +
> + return 0;
> +}
Thanks,
Sylwester
next prev parent reply other threads:[~2012-05-09 19:54 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-09 16:24 [PATCH 0/2] regulator: add initial suport for max77686 Yadwinder Singh
2012-05-09 16:24 ` [PATCH 1/2] mfd: Add support for MAX77686 Yadwinder Singh
2012-05-09 18:27 ` Mark Brown
2012-05-09 23:42 ` Chanwoo Choi
2012-05-10 7:30 ` Yadwinder Singh Brar
2012-05-09 16:24 ` [PATCH 2/2] regulator: " Yadwinder Singh
2012-05-09 18:47 ` Mark Brown
2012-05-10 7:24 ` Yadwinder Singh Brar
2012-05-10 9:34 ` Mark Brown
2012-05-10 10:56 ` Yadwinder Singh Brar
2012-05-15 13:47 ` Yadwinder Singh Brar
2012-05-16 13:08 ` Mark Brown
2012-05-09 19:54 ` Sylwester Nawrocki [this message]
2012-05-10 7:31 ` Yadwinder Singh Brar
2012-05-09 18:23 ` [PATCH 0/2] regulator: add initial suport for max77686 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=4FAACB66.3020706@gmail.com \
--to=snjw23@gmail.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).