summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRobert Marklund <robert.marklund@stericsson.com>2011-05-17 21:33:40 +0200
committerPhilippe LANGLAIS <philippe.langlais@stericsson.com>2011-06-07 15:00:13 +0200
commitad3fae8f71d539b0a7dbbec3cd5ce859397cd72f (patch)
treeaee194c309537483faa141d3d8246e466ae36d06 /arch
parent62b90962aa2c1eeb1cb49988d80c04bfc4bddb55 (diff)
mach-ux500: reg: Add snowball wlan regulator
Add snowball wlan regulator to regulators and add the device to snowball. ST-Ericsson Linux next: 340134 ST-Ericsson ID: 340139 ST-Ericsson FOSS-OUT ID: Trivial Signed-off-by: Robert Marklund <robert.marklund@stericsson.com> Change-Id: I80aef0e8d005822bbd7c23f226155b5404292d5a Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/24085 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.c21
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.h1
-rw-r--r--arch/arm/mach-ux500/board-mop500.c22
3 files changed, 44 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c
index 343a0826d6c..2a83cb62889 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.c
+++ b/arch/arm/mach-ux500/board-mop500-regulators.c
@@ -21,6 +21,27 @@
#endif
/*
+ * GPIO regulator controlled by the ab8500 GPIO16
+ */
+static struct regulator_consumer_supply gpio_wlan_vbat_consumers[] = {
+ /* for cg2900 chip */
+ REGULATOR_SUPPLY("vdd", "cg2900-uart.0"),
+ /* for cw1200 chip */
+ REGULATOR_SUPPLY("vdd", "cw1200_wlan"),
+};
+
+struct regulator_init_data gpio_wlan_vbat_regulator = {
+ .constraints = {
+ .name = "WLAN-VBAT",
+ .min_uV = 3600000,
+ .max_uV = 3600000,
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .num_consumer_supplies = ARRAY_SIZE(gpio_wlan_vbat_consumers),
+ .consumer_supplies = gpio_wlan_vbat_consumers,
+};
+
+/*
* TPS61052 regulator
*/
static struct regulator_consumer_supply tps61052_vaudio_consumers[] = {
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.h b/arch/arm/mach-ux500/board-mop500-regulators.h
index 94992158d96..d8c5694a35d 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.h
+++ b/arch/arm/mach-ux500/board-mop500-regulators.h
@@ -18,5 +18,6 @@ extern struct ab8500_regulator_reg_init
ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS];
extern struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS];
extern struct regulator_init_data tps61052_regulator;
+extern struct regulator_init_data gpio_wlan_vbat_regulator;
#endif
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 72e94a3aa66..d2e50e9709a 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -25,6 +25,7 @@
#include <linux/mfd/tc3589x.h>
#include <linux/mfd/tps6105x.h>
#include <linux/mfd/ab8500/gpio.h>
+#include <linux/regulator/fixed.h>
#include <linux/leds-lp5521.h>
#include <linux/input.h>
#include <linux/smsc911x.h>
@@ -266,6 +267,18 @@ static struct tps6105x_platform_data mop500_tps61052_data = {
};
/*
+ * GPIO-regulator wlan vbat data
+ */
+
+static struct fixed_voltage_config snowball_gpio_wlan_vbat_data = {
+ .supply_name = "WLAN-VBAT",
+ .gpio = SNOWBALL_EN_3V6_GPIO,
+ .microvolts = 3600000,
+ .enable_high = 1,
+ .init_data = &gpio_wlan_vbat_regulator,
+};
+
+/*
* TC35892
*/
@@ -456,6 +469,14 @@ static struct platform_device mop500_gpio_keys_device = {
},
};
+static struct platform_device snowball_gpio_wlan_vbat_regulator_device = {
+ .name = "reg-fixed-voltage",
+ .id = 0,
+ .dev = {
+ .platform_data = &snowball_gpio_wlan_vbat_data,
+ },
+};
+
static int mop500_sensors1p_activate(struct device *dev)
{
sensors1p_regulator = regulator_get(&mop500_gpio_keys_device.dev,
@@ -819,6 +840,7 @@ static struct platform_device *snowball_platform_devs[] __initdata = {
&snowball_key_dev,
&snowball_sbnet_dev,
&ab8500_device,
+ &snowball_gpio_wlan_vbat_regulator_device,
&ux500_hwmem_device,
&u8500_mcde_device,
&u8500_b2r2_device,