From: Keerthy <a0393675@ti.com>
To: Mark Brown <broonie@kernel.org>
Cc: Keerthy <j-keerthy@ti.com>, <rob.herring@calxeda.com>,
<pawel.moll@arm.com>, <mark.rutland@arm.com>,
<swarren@wwwdotorg.org>, <ijc+devicetree@hellion.org.uk>,
<rob@landley.net>, <sameo@linux.intel.com>,
<lee.jones@linaro.org>, <grant.likely@linaro.org>,
<lgirdwood@gmail.com>, <devicetree@vger.kernel.org>,
<linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-omap@vger.kernel.org>
Subject: Re: [PATCH 3/4] Regulators: TPS65218: Add Regulator driver for TPS65218 PMIC
Date: Wed, 4 Dec 2013 11:29:15 +0530 [thread overview]
Message-ID: <529EC4B3.7030009@ti.com> (raw)
In-Reply-To: <20131203151654.GB27568@sirena.org.uk>
Thanks for the review Mark.
On Tuesday 03 December 2013 08:46 PM, Mark Brown wrote:
> On Tue, Dec 03, 2013 at 12:13:24PM +0530, Keerthy wrote:
>
>> +static int tps65218_ldo1_dcdc3_vsel_to_uv(unsigned int vsel)
>> +{
>> + int uV = 0;
>> +
>> + if (vsel <= 26)
>> + uV = vsel * 25000 + 900000;
>> + else
>> + uV = (vsel - 26) * 50000 + 1550000;
>> +
>> + return uV;
>> +}
> Use regulator_map_voltage_linear_range() (and similarly for most of the
> other functions).
Ok.
>> +static const struct of_device_id tps65218_of_match[] = {
>> + TPS65218_OF_MATCH("ti,tps65218-dcdc1", tps65218_pmic_regs[0]),
>> + TPS65218_OF_MATCH("ti,tps65218-dcdc2", tps65218_pmic_regs[1]),
>> + TPS65218_OF_MATCH("ti,tps65218-dcdc3", tps65218_pmic_regs[2]),
>> + TPS65218_OF_MATCH("ti,tps65218-dcdc4", tps65218_pmic_regs[3]),
>> + TPS65218_OF_MATCH("ti,tps65218-dcdc5", tps65218_pmic_regs[4]),
>> + TPS65218_OF_MATCH("ti,tps65218-dcdc6", tps65218_pmic_regs[5]),
>> + TPS65218_OF_MATCH("ti,tps65218-ldo1", tps65218_pmic_regs[6]),
>> +};
>> +MODULE_DEVICE_TABLE(of, tps65218_of_match);
> Indexing into another array by magic number like this is both error
> prone and hard to read. Either use defined constants or individual
> variables for the things being referenced.
Okay.
Regards,
Keerthy
next prev parent reply other threads:[~2013-12-04 5:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-03 6:43 [PATCH 0/4] mfd: TPS65218: Add support for TPS65218 PMIC Keerthy
2013-12-03 6:43 ` [PATCH 1/4] mfd: DT bindings " Keerthy
2013-12-03 9:36 ` Lee Jones
2013-12-03 10:52 ` Keerthy
2013-12-03 11:04 ` Lee Jones
2013-12-03 6:43 ` [PATCH 2/4] MFD: TPS65218: Add driver for the " Keerthy
2013-12-03 9:24 ` Lee Jones
2013-12-03 10:06 ` Keerthy
2013-12-03 11:21 ` Lee Jones
2013-12-03 13:28 ` Mark Brown
2013-12-03 15:19 ` Mark Brown
2013-12-03 6:43 ` [PATCH 3/4] Regulators: TPS65218: Add Regulator driver for " Keerthy
2013-12-03 15:16 ` Mark Brown
2013-12-04 5:59 ` Keerthy [this message]
2013-12-04 7:39 ` Manish Badarkhe
2013-12-03 6:43 ` [PATCH 4/4] ARM: dts: AM437x: Add TPS65218 device tree nodes Keerthy
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=529EC4B3.7030009@ti.com \
--to=a0393675@ti.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=j-keerthy@ti.com \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=sameo@linux.intel.com \
--cc=swarren@wwwdotorg.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