From: k.lewandowsk@samsung•com (Karol Lewandowski)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v2 2/2] regulator: add device tree support for max8997
Date: Wed, 25 Jan 2012 10:55:49 +0100 [thread overview]
Message-ID: <4F1FD1A5.1060305@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:
> 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;
> + rdata->id = i;
> + rdata->initdata = of_get_regulator_init_data(
> + iodev->dev, reg_np);
One more thing - of_get_regulator_init_data() will set apply_uV to 1 so
we need to reset it for BUCK6, which doesn't provide set_voltage() ops,
like:
if (rdata->initdata && regulators[i].id == MAX8997_BUCK6)
rdata->initdata->constraints.apply_uV = 0;
Thanks
next prev parent reply other threads:[~2012-01-25 9:55 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
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 [this message]
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=4F1FD1A5.1060305@samsung.com \
--to=k.lewandowsk@samsung$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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