lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu,  2 Feb 2012 14:16:58 +0200
From:	Peter Ujfalusi <peter.ujfalusi@...com>
To:	Samuel Ortiz <sameo@...ux.intel.com>,
	Tony Lindgren <tony@...mide.com>,
	Santosh Shilimkar <santosh.shilimkar@...com>,
	Liam Girdwood <lrg@...com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	Dmitry Torokhov <dtor@...l.ru>
Cc:	Misael Lopez Cruz <misael.lopez@...com>,
	linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org,
	alsa-devel@...a-project.org, linux-arm-kernel@...ts.infradead.org
Subject: [RFC 6/7] OMAP: omap4panda: Add fixed regulator for twl6040 needs

The twl6040 VIO power is connected to SMPS V1V8, the
V2V1 power is coming from SMPS V2V1 of twl6030.
These are fixed, always on regulators.
Create fixed voltage regulators for these supplies.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@...com>
---
 arch/arm/mach-omap2/board-omap4panda.c |   62 +++++++++++++++++++++++++++++++-
 1 files changed, 61 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index da31a72..4d66c60 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -56,6 +56,10 @@
 #define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */
 #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
 
+#define FIXED_REG_VWLAN_ID	0
+#define FIXED_REG_V2V1_ID	1
+#define FIXED_REG_V1V8_ID	2
+
 /* wl127x BT, FM, GPS connectivity chip */
 static int wl1271_gpios[] = {46, -1, -1};
 static struct platform_device wl1271_device = {
@@ -116,10 +120,66 @@ static struct platform_device panda_abe_audio = {
 	},
 };
 
+static struct regulator_consumer_supply panda_vdd_v2v1_supply[] = {
+	REGULATOR_SUPPLY("v2v1", "1-004b"),
+};
+
+static struct regulator_init_data panda_v2v1smps = {
+	.constraints = {
+		.always_on		= true,
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(panda_vdd_v2v1_supply),
+	.consumer_supplies	= panda_vdd_v2v1_supply,
+};
+
+static struct fixed_voltage_config panda_v2v1_pdata = {
+	.supply_name	= "VDD-V2V1",
+	.microvolts	= 2100000,
+	.init_data	= &panda_v2v1smps,
+	.gpio		= -EINVAL,
+};
+
+static struct platform_device panda_v2v1 = {
+	.name		= "reg-fixed-voltage",
+	.id		= FIXED_REG_V2V1_ID,
+	.dev = {
+		.platform_data = &panda_v2v1_pdata,
+	},
+};
+
+static struct regulator_consumer_supply panda_vio_v1v8_supply[] = {
+	REGULATOR_SUPPLY("vio", "1-004b"),
+};
+
+static struct regulator_init_data panda_v1v8smps = {
+	.constraints = {
+		.always_on		= true,
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(panda_vio_v1v8_supply),
+	.consumer_supplies	= panda_vio_v1v8_supply,
+};
+
+static struct fixed_voltage_config panda_v1v8_pdata = {
+	.supply_name	= "VIO-V1V8",
+	.microvolts	= 1800000,
+	.init_data	= &panda_v1v8smps,
+	.gpio		= -EINVAL,
+};
+
+static struct platform_device panda_v1v8 = {
+	.name		= "reg-fixed-voltage",
+	.id		= FIXED_REG_V1V8_ID,
+	.dev = {
+		.platform_data = &panda_v1v8_pdata,
+	},
+};
+
 static struct platform_device *panda_devices[] __initdata = {
 	&leds_gpio,
 	&wl1271_device,
 	&panda_abe_audio,
+	&panda_v1v8,
+	&panda_v2v1,
 };
 
 static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
@@ -218,7 +278,7 @@ static struct fixed_voltage_config panda_vwlan = {
 
 static struct platform_device omap_vwlan_device = {
 	.name		= "reg-fixed-voltage",
-	.id		= 1,
+	.id		= FIXED_REG_VWLAN_ID,
 	.dev = {
 		.platform_data = &panda_vwlan,
 	},
-- 
1.7.8.4

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ