From: Joonyoung Shim <jy0922.shim@samsung.com>
To: broonie@opensource.wolfsonmicro.com
Cc: linux-kernel@vger.kernel.org, kyungmin.park@samsung.com,
yadi.brar@samsung.com, jonghwa3.lee@samsung.com
Subject: [PATCH] regulator: max77686: add of_node assignment
Date: Tue, 28 Aug 2012 20:25:30 +0900 [thread overview]
Message-ID: <1346153130-29038-1-git-send-email-jy0922.shim@samsung.com> (raw)
Consumer nodes can reference regulators using <name>-supply from dts
file with this patch.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
drivers/regulator/max77686.c | 2 ++
include/linux/mfd/max77686.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c
index c564af6..87544b3 100644
--- a/drivers/regulator/max77686.c
+++ b/drivers/regulator/max77686.c
@@ -265,6 +265,7 @@ static int max77686_pmic_dt_parse_pdata(struct max77686_dev *iodev,
rmatch.of_node = NULL;
of_regulator_match(iodev->dev, regulators_np, &rmatch, 1);
rdata[i].initdata = rmatch.init_data;
+ rdata[i].of_node = rmatch.of_node;
}
pdata->regulators = rdata;
@@ -325,6 +326,7 @@ static __devinit int max77686_pmic_probe(struct platform_device *pdev)
for (i = 0; i < MAX77686_REGULATORS; i++) {
config.init_data = pdata->regulators[i].initdata;
+ config.of_node = pdata->regulators[i].of_node;
rdev[i] = regulator_register(®ulators[i], &config);
if (IS_ERR(rdev[i])) {
diff --git a/include/linux/mfd/max77686.h b/include/linux/mfd/max77686.h
index 3d7ae4d..46c0f32 100644
--- a/include/linux/mfd/max77686.h
+++ b/include/linux/mfd/max77686.h
@@ -74,6 +74,7 @@ enum max77686_regulators {
struct max77686_regulator_data {
int id;
struct regulator_init_data *initdata;
+ struct device_node *of_node;
};
enum max77686_opmode {
--
1.7.9.5
next reply other threads:[~2012-08-28 11:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-28 11:25 Joonyoung Shim [this message]
2012-08-28 17:16 ` [PATCH] regulator: max77686: add of_node assignment Mark Brown
2012-08-28 23:31 ` Joonyoung Shim
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=1346153130-29038-1-git-send-email-jy0922.shim@samsung.com \
--to=jy0922.shim@samsung.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=jonghwa3.lee@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=yadi.brar@samsung.com \
/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).