diff options
author | Robert Marklund <robert.marklund@stericsson.com> | 2011-05-17 21:33:40 +0200 |
---|---|---|
committer | Robert Marklund <robert.marklund@stericsson.com> | 2011-10-05 15:10:56 +0200 |
commit | 623237c65cebe91a1ab0fd57938bdfd4bfcd33d0 (patch) | |
tree | 21b84b2b6abb6997411fbca39fec926125eecbcc /arch | |
parent | ab76fb4bcbea8fc9acb285cd29a701ae0e934da5 (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.c | 21 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-regulators.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 21 |
3 files changed, 43 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c index 180565df911..a474394f061 100644 --- a/arch/arm/mach-ux500/board-mop500-regulators.c +++ b/arch/arm/mach-ux500/board-mop500-regulators.c @@ -14,6 +14,27 @@ #include "board-mop500-regulators.h" /* + * 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 0ece1e4f1d8..82b22d29d9b 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -463,6 +463,18 @@ static struct ske_keypad_platform_data mop500_ske_keypad_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 */ @@ -649,6 +661,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, @@ -1125,6 +1145,7 @@ static struct platform_device *snowball_platform_devs[] __initdata = { &snowball_led_dev, &snowball_key_dev, &snowball_sbnet_dev, + &snowball_gpio_wlan_vbat_regulator_device, &u8500_mcde_device, &u8500_b2r2_device, }; |