From 6e3bda7f01ccef08f231085d27e93270a8cdfac2 Mon Sep 17 00:00:00 2001 From: Greg Meiste Date: Fri, 28 May 2010 15:18:30 -0500 Subject: [PATCH] [ARM] tegra: stingray: Add SW2 and SW4 regulators Change-Id: Idf53392a596885ea2cb4c02ca2eb9d55aa07d307 Signed-off-by: Greg Meiste --- arch/arm/mach-tegra/board-stingray-spi.c | 32 ++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/arch/arm/mach-tegra/board-stingray-spi.c b/arch/arm/mach-tegra/board-stingray-spi.c index cd4a0dde0ee8..bed0ad8cbb2b 100644 --- a/arch/arm/mach-tegra/board-stingray-spi.c +++ b/arch/arm/mach-tegra/board-stingray-spi.c @@ -230,6 +230,8 @@ struct cpcap_spi_init_data stingray_cpcap_spi_init[] = { }; unsigned short cpcap_regulator_mode_values[CPCAP_NUM_REGULATORS] = { + [CPCAP_SW2] = 0x0100, + [CPCAP_SW4] = 0x0100, [CPCAP_SW5] = 0x0022, [CPCAP_VCAM] = 0x0003, [CPCAP_VCSI] = 0x0003, @@ -252,6 +254,8 @@ unsigned short cpcap_regulator_mode_values[CPCAP_NUM_REGULATORS] = { }; unsigned short cpcap_regulator_off_mode_values[CPCAP_NUM_REGULATORS] = { + [CPCAP_SW2] = 0x0000, + [CPCAP_SW4] = 0x0000, [CPCAP_SW5] = 0x0000, [CPCAP_VCAM] = 0x0000, [CPCAP_VCSI] = 0x0000, @@ -275,6 +279,14 @@ unsigned short cpcap_regulator_off_mode_values[CPCAP_NUM_REGULATORS] = { #define REGULATOR_CONSUMER(name, device) { .supply = name, .dev = device, } +struct regulator_consumer_supply cpcap_sw2_consumers[] = { + REGULATOR_CONSUMER("sw2", NULL), +}; + +struct regulator_consumer_supply cpcap_sw4_consumers[] = { + REGULATOR_CONSUMER("sw4", NULL), +}; + struct regulator_consumer_supply cpcap_sw5_consumers[] = { REGULATOR_CONSUMER("sw5", NULL), }; @@ -319,6 +331,26 @@ struct regulator_consumer_supply cpcap_vaudio_consumers[] = { }; static struct regulator_init_data cpcap_regulator[CPCAP_NUM_REGULATORS] = { + [CPCAP_SW2] = { + .constraints = { + .min_uV = 1000000, + .max_uV = 1200000, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, + .always_on = 1, + }, + .num_consumer_supplies = ARRAY_SIZE(cpcap_sw2_consumers), + .consumer_supplies = cpcap_sw2_consumers, + }, + [CPCAP_SW4] = { + .constraints = { + .min_uV = 1000000, + .max_uV = 1200000, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, + .always_on = 1, + }, + .num_consumer_supplies = ARRAY_SIZE(cpcap_sw4_consumers), + .consumer_supplies = cpcap_sw4_consumers, + }, [CPCAP_SW5] = { .constraints = { .min_uV = 5050000, -- 2.34.1