[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120824233835.GA29178@ubuntu>
Date: Sat, 25 Aug 2012 01:40:14 +0200
From: Rabin Vincent <rabin@....in>
To: Laxman Dewangan <ldewangan@...dia.com>
Cc: Mark Brown <broonie@...nsource.wolfsonmicro.com>,
"lrg@...com" <lrg@...com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] regulator: disable supply regulator if it is enabled for
boot-on
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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists