From: Rabin Vincent <rabin@rab.in>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>,
"lrg@ti.com" <lrg@ti.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] regulator: disable supply regulator if it is enabled for boot-on
Date: Sat, 25 Aug 2012 01:40:14 +0200 [thread overview]
Message-ID: <20120824233835.GA29178@ubuntu> (raw)
In-Reply-To: <5037BF45.1070205@nvidia.com>
On Fri, Aug 24, 2012 at 11:22:05PM +0530, Laxman Dewangan wrote:
> I tried to reproduce the issue but could not able to do this.
> Can you please send me your board/dt files where you are porviding
> platform data for regulator?
> This will help me to reproduce the issue.
Here's a dts patch:
diff --git a/arch/arm/boot/dts/vexpress-v2m.dtsi b/arch/arm/boot/dts/vexpress-v2m.dtsi
index dba53fd..386eafa 100644
--- a/arch/arm/boot/dts/vexpress-v2m.dtsi
+++ b/arch/arm/boot/dts/vexpress-v2m.dtsi
@@ -207,5 +207,20 @@
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
+
+ vbat: fixedregulator@1 {
+ compatible = "regulator-fixed";
+ regulator-name = "vbat";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+
+ fixedregulator@2 {
+ compatible = "regulator-fixed";
+ regulator-name = "vtest1";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&vbat>;
+ regulator-boot-on;
+ };
};
};
If you want to test it with fixed regulators, you'll need the hack below
to bypass the ops->disable check in regulator_init_complete().
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index 185468c..05f3028 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -129,9 +129,16 @@ static int fixed_voltage_list_voltage(struct regulator_dev *dev,
return data->microvolts;
}
+static int fixed_enable(struct regulator_dev *dev)
+{
+ return 0;
+}
+
static struct regulator_ops fixed_voltage_ops = {
.get_voltage = fixed_voltage_get_voltage,
.list_voltage = fixed_voltage_list_voltage,
+ .disable = fixed_enable,
+ .enable = fixed_enable,
};
static int __devinit reg_fixed_voltage_probe(struct platform_device *pdev)
next prev parent reply other threads:[~2012-08-24 23:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-14 10:07 [PATCH] regulator: disable supply regulator if it is enabled for boot-on Laxman Dewangan
2012-08-14 11:08 ` Rabin Vincent
2012-08-22 9:45 ` Laxman Dewangan
2012-08-23 14:53 ` Mark Brown
2012-08-23 14:43 ` Laxman Dewangan
2012-08-24 17:52 ` Laxman Dewangan
2012-08-24 23:40 ` Rabin Vincent [this message]
2012-08-28 12:20 ` Laxman Dewangan
2012-08-28 15:52 ` Rabin Vincent
2012-08-24 17:53 ` Laxman Dewangan
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=20120824233835.GA29178@ubuntu \
--to=rabin@rab.in \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=ldewangan@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.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