From: Karol Lewandowski <k.lewandowsk@samsung.com>
To: Thomas Abraham <thomas.abraham@linaro.org>
Cc: linux-kernel@vger.kernel.org, rpurdie@rpsys.net,
rob.herring@calxeda.com, grant.likely@secretlab.ca,
kgene.kim@samsung.com, broonie@opensource.wolfsonmicro.com,
myungjoo.ham@samsung.com, kyungmin.park@samsung.com,
dg77.kim@samsung.com, linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org,
"Rajendra Nayak" <rnayak@ti.com>,
"Marek Szyprowski" <m.szyprowski@samsung.com>,
"Sylwester Nawrocki" <s.nawrocki@samsung.com>,
"\"'\\\"박경민/Mobile S/W Platform Lab(DMC연)/E5(책임)/삼성전자\\\"'\""
<kyungmin.park@samsung.com>
Subject: Re: [PATCH v2 2/2] regulator: add device tree support for max8997
Date: Mon, 23 Jan 2012 18:50:22 +0100 [thread overview]
Message-ID: <4F1D9DDE.2070106@samsung.com> (raw)
In-Reply-To: <1326353738-26864-3-git-send-email-thomas.abraham@linaro.org>
On 12.01.2012 08:35, Thomas Abraham wrote:
Hi!
> Add device tree based discovery support for max8997.
> +static int max8997_pmic_dt_parse_pdata(struct max8997_dev *iodev,
> + struct max8997_platform_data *pdata)
> +{
...
> + pdata->regulators = rdata;
> + for_each_child_of_node(regulators_np, reg_np) {
> + for (i = 0; i< ARRAY_SIZE(regulators); i++)
> + if (!of_node_cmp(reg_np->name, regulators[i].name))
> + break;
If I read your patch correctly it would impossible to configure
following outputs when pmic is instantiated from DT:
enum max8998_regulators {
...
1 MAX8997_EN32KHZ_AP,
2 MAX8997_EN32KHZ_CP,
3 MAX8997_CHARGER_CV,
4 MAX8997_CHARGER_TOPOFF, /* MBCCTRL5 */
This is due to use of embedded spaces in regulator names (which are used
in comparision).
This can be fixed with trivial patch[1].
What bothers me more, are following regulators:
MAX8997_EN32KHZ_AP,
MAX8997_EN32KHZ_CP,
MAX8997_ENVICHG,
MAX8997_ESAFEOUT1,
MAX8997_ESAFEOUT2,
Aren't these fixed? i.e. - is it really needed to configure these either
by platform data or DT at all?
[1]
From 5cfba526210bc596c7d14e33fea93648baa0a227 Mon Sep 17 00:00:00 2001
From: Karol Lewandowski <k.lewandowsk@samsung.com>
Date: Mon, 23 Jan 2012 17:20:25 +0100
Subject: [PATCH] max8997: Avoid spaces in regulator names
max8997-pmic instantiated from device tree uses names,
not numerical ids to distinguish between outputs.
Use names without spaces to make it possible to specify
parameters for said regulators in DTS.
Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
drivers/regulator/max8997.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/regulator/max8997.c b/drivers/regulator/max8997.c
index 053d0b7..4b572eb 100644
--- a/drivers/regulator/max8997.c
+++ b/drivers/regulator/max8997.c
@@ -910,13 +910,13 @@ static struct regulator_desc regulators[] = {
},
regulator_desc_buck(7),
{
- .name = "EN32KHz AP",
+ .name = "EN32KHz_AP",
.id = MAX8997_EN32KHZ_AP,
.ops = &max8997_fixedvolt_ops,
.type = REGULATOR_VOLTAGE,
.owner = THIS_MODULE,
}, {
- .name = "EN32KHz CP",
+ .name = "EN32KHz_CP",
.id = MAX8997_EN32KHZ_CP,
.ops = &max8997_fixedvolt_ops,
.type = REGULATOR_VOLTAGE,
@@ -940,7 +940,7 @@ static struct regulator_desc regulators[] = {
.type = REGULATOR_VOLTAGE,
.owner = THIS_MODULE,
}, {
- .name = "CHARGER CV",
+ .name = "CHARGER_CV",
.id = MAX8997_CHARGER_CV,
.ops = &max8997_fixedstate_ops,
.type = REGULATOR_VOLTAGE,
@@ -952,7 +952,7 @@ static struct regulator_desc regulators[] = {
.type = REGULATOR_CURRENT,
.owner = THIS_MODULE,
}, {
- .name = "CHARGER TOPOFF",
+ .name = "CHARGER_TOPOFF",
.id = MAX8997_CHARGER_TOPOFF,
.ops = &max8997_charger_fixedstate_ops,
.type = REGULATOR_CURRENT,
--
1.7.8.3
next prev parent reply other threads:[~2012-01-23 17:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-12 7:35 [PATCH v2 0/2] Add device tree support for MAX8997 Thomas Abraham
2012-01-12 7:35 ` [PATCH v2 1/2] mfd: add irq domain support for max8997 interrupts Thomas Abraham
2012-01-12 7:35 ` [PATCH v2 2/2] regulator: add device tree support for max8997 Thomas Abraham
2012-01-12 9:49 ` MyungJoo Ham
2012-01-12 10:39 ` Thomas Abraham
2012-01-23 17:50 ` Karol Lewandowski [this message]
2012-01-23 18:20 ` Mark Brown
2012-01-23 19:21 ` Karol Lewandowski
2012-01-23 19:33 ` Mark Brown
2012-01-25 9:55 ` Karol Lewandowski
2012-01-25 11:26 ` Mark Brown
2012-01-25 12:02 ` Karol Lewandowski
2012-01-25 13:32 ` Mark Brown
2012-01-26 15:28 ` Karol Lewandowski
2012-01-26 16:17 ` Mark Brown
2012-01-27 9:58 ` Karol Lewandowski
2012-01-27 11:19 ` 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=4F1D9DDE.2070106@samsung.com \
--to=k.lewandowsk@samsung.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dg77.kim@samsung.com \
--cc=grant.likely@secretlab.ca \
--cc=kgene.kim@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=myungjoo.ham@samsung.com \
--cc=rnayak@ti.com \
--cc=rob.herring@calxeda.com \
--cc=rpurdie@rpsys.net \
--cc=s.nawrocki@samsung.com \
--cc=thomas.abraham@linaro.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).