summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-ux500/Kconfig6
-rw-r--r--arch/arm/mach-ux500/Makefile4
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.c1082
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.h28
-rw-r--r--arch/arm/mach-ux500/board-mop500.c49
-rw-r--r--arch/arm/mach-ux500/include/mach/regulator.h96
-rw-r--r--arch/arm/mach-ux500/pm/runtime.c2
-rw-r--r--arch/arm/mach-ux500/regulator-u8500.c265
-rw-r--r--arch/arm/mach-ux500/regulator-u8500.h46
-rw-r--r--arch/arm/mach-ux500/regulator-ux500.c562
-rw-r--r--arch/arm/mach-ux500/regulator-ux500.h39
-rw-r--r--arch/arm/mach-ux500/virt-regulator-u8500.c333
12 files changed, 142 insertions, 2370 deletions
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig
index 7da7b8d457d..697a4da87ef 100644
--- a/arch/arm/mach-ux500/Kconfig
+++ b/arch/arm/mach-ux500/Kconfig
@@ -80,12 +80,6 @@ config UX500_DEBUG_UART
Choose the UART on which kernel low-level debug messages should be
output.
-config U8500_REGULATOR_DEBUG
- bool "Regulator debug support"
- depends on REGULATOR_VIRTUAL_CONSUMER
- help
- Add support for U8500 regulator debug
-
config SENSORS1P_MOP
tristate "HAL and Proximity sensors support"
depends on REGULATOR && (GPIO_STMPE2401 || GPIO_TC35892)
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile
index 8d5d620ef4f..86eaa8444f1 100644
--- a/arch/arm/mach-ux500/Makefile
+++ b/arch/arm/mach-ux500/Makefile
@@ -8,7 +8,7 @@ obj-y := clock.o cpu.o devices.o dcache.o \
uart-db8500.o
obj-y += pm/
-obj-$(CONFIG_REGULATOR) += regulator-ux500.o
+
ifeq ($(CONFIG_UX500_SOC_DB5500), y)
obj-$(CONFIG_REGULATOR) += regulator-u5500.o
@@ -18,7 +18,7 @@ obj-$(CONFIG_UX500_SOC_DBX500) += cpu-db5500.o dma-db5500.o \
obj-$(CONFIG_TOUCHSCREEN_CYTTSP_SPI) += board-u5500-cyttsp.o
endif
ifeq ($(CONFIG_UX500_SOC_DB8500), y)
-obj-$(CONFIG_REGULATOR) += regulator-u8500.o
+
obj-$(CONFIG_UX500_SOC_DBX500) += cpu-db8500.o devices-db8500.o \
clock-db8500.o dma-db8500.o
endif
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c
index 92af82bec47..2735d03996c 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.c
+++ b/arch/arm/mach-ux500/board-mop500-regulators.c
@@ -1,102 +1,155 @@
/*
- * Copyright (C) STMicroelectronics 2009
* Copyright (C) ST-Ericsson SA 2010
*
* License Terms: GNU General Public License v2
*
- * Authors: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson
- * Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson
+ * Authors: Sundar Iyer <sundar.iyer@stericsson.com>
+ * Bengt Jonsson <bengt.g.jonsson@stericsson.com>
*
* MOP500 board specific initialization for regulators
*/
-
-#include <linux/init.h>
-#include <linux/platform_device.h>
-#include <linux/amba/bus.h>
+#include <linux/kernel.h>
#include <linux/regulator/machine.h>
-
+#include <linux/regulator/ab8500.h>
#include "board-mop500-regulators.h"
-#include "board-mop500-mcde.h"
-
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
-#define REGULATOR_SUPPLY_DEBUG REGULATOR_SUPPLY
-#else
-#define REGULATOR_SUPPLY_DEBUG(_name, _dev_name)
-#endif
/*
- * AB8500 Regulator Configuration
+ * TPS61052 regulator
*/
+static struct regulator_consumer_supply tps61052_vaudio_consumers[] = {
+ /*
+ * Boost converter supply to raise voltage on audio speaker, this
+ * is actually connected to three pins, VInVhfL (left amplifier)
+ * VInVhfR (right amplifier) and VIntDClassInt - all three must
+ * be connected to the same voltage.
+ */
+ REGULATOR_SUPPLY("vintdclassint", "ab8500-codec.0"),
+};
+
+struct regulator_init_data tps61052_regulator = {
+ .constraints = {
+ .name = "vaudio-hf",
+ .min_uV = 4500000,
+ .max_uV = 4500000,
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+ },
+ .num_consumer_supplies = ARRAY_SIZE(tps61052_vaudio_consumers),
+ .consumer_supplies = tps61052_vaudio_consumers,
+};
+
+static struct regulator_consumer_supply ab8500_vaux1_consumers[] = {
+ /* External displays, connector on board 2v5 power supply */
+ REGULATOR_SUPPLY("vaux12v5", "mcde.0"),
+ /* SFH7741 proximity sensor */
+ REGULATOR_SUPPLY("vcc", "gpio-keys.0"),
+ /* BH1780GLS ambient light sensor */
+ REGULATOR_SUPPLY("vcc", "2-0029"),
+ /* lsm303dlh accelerometer */
+ REGULATOR_SUPPLY("vdd", "3-0018"),
+ /* lsm303dlh magnetometer */
+ REGULATOR_SUPPLY("vdd", "3-001e"),
+ /* Rohm BU21013 Touchscreen devices */
+ REGULATOR_SUPPLY("avdd", "3-005c"),
+ REGULATOR_SUPPLY("avdd", "3-005d"),
+ /* Synaptics RMI4 Touchscreen device */
+ REGULATOR_SUPPLY("vdd", "3-004b"),
+};
+
+static struct regulator_consumer_supply ab8500_vaux2_consumers[] = {
+ /* On-board eMMC power */
+ REGULATOR_SUPPLY("vmmc", "sdi4"),
+ /* AB8500 audio codec */
+ REGULATOR_SUPPLY("vcc-N2158", "ab8500-codec.0"),
+};
+
+static struct regulator_consumer_supply ab8500_vaux3_consumers[] = {
+ /* External MMC slot power */
+ REGULATOR_SUPPLY("vmmc", "sdi0"),
+};
+
+static struct regulator_consumer_supply ab8500_vtvout_consumers[] = {
+ /* TV-out DENC supply */
+ REGULATOR_SUPPLY("vtvout", "ab8500-denc.0"),
+ /* Internal general-purpose ADC */
+ REGULATOR_SUPPLY("vddadc", "ab8500-gpadc.0"),
+};
+
+static struct regulator_consumer_supply ab8500_vintcore_consumers[] = {
+ /* SoC core supply, no device */
+ REGULATOR_SUPPLY("v-intcore", NULL),
+ /* USB Transceiver */
+ REGULATOR_SUPPLY("vddulpivio18", "ab8500-usb.0"),
+};
+
+static struct regulator_consumer_supply ab8500_vana_consumers[] = {
+ /* External displays, connector on board, 1v8 power supply */
+ REGULATOR_SUPPLY("vsmps2", "mcde.0"),
+};
/* ab8500 regulator register initialization */
struct ab8500_regulator_reg_init
- ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = {
+ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = {
/*
* VanaRequestCtrl = HP/LP depending on VxRequest
- * VpllRequestCtrl = HP/LP depending on VxRequest
* VextSupply1RequestCtrl = HP/LP depending on VxRequest
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL2, 0xfc, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL2, 0x00),
/*
* VextSupply2RequestCtrl = HP/LP depending on VxRequest
* VextSupply3RequestCtrl = HP/LP depending on VxRequest
* Vaux1RequestCtrl = HP/LP depending on VxRequest
* Vaux2RequestCtrl = HP/LP depending on VxRequest
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL3, 0xff, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL3, 0x00),
/*
* Vaux3RequestCtrl = HP/LP depending on VxRequest
* SwHPReq = Control through SWValid disabled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL4, 0x07, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL4, 0x00),
/*
- * Vsmps1SysClkReq1HPValid = enabled
- * Vsmps2SysClkReq1HPValid = enabled
- * Vsmps3SysClkReq1HPValid = enabled
* VanaSysClkReq1HPValid = disabled
- * VpllSysClkReq1HPValid = enabled
* Vaux1SysClkReq1HPValid = disabled
* Vaux2SysClkReq1HPValid = disabled
* Vaux3SysClkReq1HPValid = disabled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID1, 0xff, 0x17),
+ INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID1, 0x00),
/*
* VextSupply1SysClkReq1HPValid = disabled
* VextSupply2SysClkReq1HPValid = disabled
* VextSupply3SysClkReq1HPValid = SysClkReq1 controlled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID2, 0x70, 0x40),
+ INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID2, 0x40),
/*
* VanaHwHPReq1Valid = disabled
* Vaux1HwHPreq1Valid = disabled
* Vaux2HwHPReq1Valid = disabled
* Vaux3HwHPReqValid = disabled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID1, 0xe8, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID1, 0x00),
/*
* VextSupply1HwHPReq1Valid = disabled
* VextSupply2HwHPReq1Valid = disabled
* VextSupply3HwHPReq1Valid = disabled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID2, 0x07, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID2, 0x00),
/*
* VanaHwHPReq2Valid = disabled
* Vaux1HwHPReq2Valid = disabled
* Vaux2HwHPReq2Valid = disabled
* Vaux3HwHPReq2Valid = disabled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID1, 0xe8, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID1, 0x00),
/*
* VextSupply1HwHPReq2Valid = disabled
* VextSupply2HwHPReq2Valid = disabled
* VextSupply3HwHPReq2Valid = HWReq2 controlled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID2, 0x07, 0x04),
+ INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID2, 0x04),
/*
* VanaSwHPReqValid = disabled
* Vaux1SwHPReqValid = disabled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID1, 0xa0, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID1, 0x00),
/*
* Vaux2SwHPReqValid = disabled
* Vaux3SwHPReqValid = disabled
@@ -104,7 +157,7 @@ struct ab8500_regulator_reg_init
* VextSupply2SwHPReqValid = disabled
* VextSupply3SwHPReqValid = disabled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID2, 0x1f, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID2, 0x00),
/*
* SysClkReq2Valid1 = SysClkReq2 controlled
* SysClkReq3Valid1 = disabled
@@ -114,7 +167,7 @@ struct ab8500_regulator_reg_init
* SysClkReq7Valid1 = disabled
* SysClkReq8Valid1 = disabled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID1, 0xfe, 0x2a),
+ INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID1, 0x2a),
/*
* SysClkReq2Valid2 = disabled
* SysClkReq3Valid2 = disabled
@@ -124,7 +177,7 @@ struct ab8500_regulator_reg_init
* SysClkReq7Valid2 = disabled
* SysClkReq8Valid2 = disabled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID2, 0xfe, 0x20),
+ INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID2, 0x20),
/*
* VTVoutEna = disabled
* Vintcore12Ena = disabled
@@ -132,93 +185,66 @@ struct ab8500_regulator_reg_init
* Vintcore12LP = inactive (HP)
* VTVoutLP = inactive (HP)
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUMISC1, 0xfe, 0x10),
+ INIT_REGULATOR_REGISTER(AB8500_REGUMISC1, 0x10),
/*
* VaudioEna = disabled
* VdmicEna = disabled
* Vamic1Ena = disabled
* Vamic2Ena = disabled
*/
- INIT_REGULATOR_REGISTER(AB8500_VAUDIOSUPPLY, 0x1e, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_VAUDIOSUPPLY, 0x00),
/*
* Vamic1_dzout = high-Z when Vamic1 is disabled
* Vamic2_dzout = high-Z when Vamic2 is disabled
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUCTRL1VAMIC, 0x03, 0x00),
- /*
- * Vsmps1Regu = HW control
- * Vsmps1SelCtrl = Vsmps1 voltage defined by Vsmsp1Sel2
- */
- INIT_REGULATOR_REGISTER(AB8500_VSMPS1REGU, 0x0f, 0x06),
- /*
- * Vsmps2Regu = HW control
- * Vsmps2SelCtrl = Vsmps2 voltage defined by Vsmsp2Sel2
- */
- INIT_REGULATOR_REGISTER(AB8500_VSMPS2REGU, 0x0f, 0x06),
- /*
- * Vsmps3Sel2 = 1.2125 V
- * NOTE! PRCMU register
- */
- INIT_REGULATOR_REGISTER(AB8500_VSMPS3SEL2, 0x7f, 0x29),
- /*
- * Vsmps3Regu = HW control
- * Vsmps3SelCtrl = Vsmps3 voltage defined by Vsmps3Sel2
- * NOTE! PRCMU register
- */
- INIT_REGULATOR_REGISTER(AB8500_VSMPS3REGU, 0x0f, 0x06),
- /*
- * Vsmps3Sel1 = 0.925V
- * NOTE! PRCMU register
- */
- INIT_REGULATOR_REGISTER(AB8500_VSMPS3SEL1, 0x7f, 0x12),
+ INIT_REGULATOR_REGISTER(AB8500_REGUCTRL1VAMIC, 0x00),
/*
* VPll = Hw controlled
* VanaRegu = force off
*/
- INIT_REGULATOR_REGISTER(AB8500_VPLLVANAREGU, 0x0f, 0x02),
+ INIT_REGULATOR_REGISTER(AB8500_VPLLVANAREGU, 0x02),
/*
* VrefDDREna = disabled
* VrefDDRSleepMode = inactive (no pulldown)
*/
- INIT_REGULATOR_REGISTER(AB8500_VREFDDR, 0x03, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_VREFDDR, 0x00),
/*
* VextSupply1Regu = HW control
* VextSupply2Regu = HW control
- * VextSupply3Regu = Low Power mode
+ * VextSupply3Regu = HW control
* ExtSupply2Bypass = ExtSupply12LPn ball is 0 when Ena is 0
* ExtSupply3Bypass = ExtSupply3LPn ball is 0 when Ena is 0
*/
- INIT_REGULATOR_REGISTER(AB8500_EXTSUPPLYREGU, 0xff, 0x1a),
+ INIT_REGULATOR_REGISTER(AB8500_EXTSUPPLYREGU, 0x2a),
/*
* Vaux1Regu = force HP
* Vaux2Regu = force off
*/
- INIT_REGULATOR_REGISTER(AB8500_VAUX12REGU, 0x0f, 0x01),
+ INIT_REGULATOR_REGISTER(AB8500_VAUX12REGU, 0x01),
/*
- * Vrf1Regu = HW control
- * Vaux3Regu = force off
+ * Vaux3regu = force off
*/
- INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3REGU, 0x0f, 0x08),
+ INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3REGU, 0x00),
/*
- * Vsmps1Sel1 = 1.2 V
+ * Vsmps1 = 1.15V
*/
- INIT_REGULATOR_REGISTER(AB8500_VSMPS1SEL1, 0x3f, 0x28),
+ INIT_REGULATOR_REGISTER(AB8500_VSMPS1SEL1, 0x24),
/*
- * Vaux1Sel = 2.8 V
+ * Vaux1Sel = 2.5 V
*/
- INIT_REGULATOR_REGISTER(AB8500_VAUX1SEL, 0x0f, 0x0C),
+ INIT_REGULATOR_REGISTER(AB8500_VAUX1SEL, 0x08),
/*
* Vaux2Sel = 2.9 V
*/
- INIT_REGULATOR_REGISTER(AB8500_VAUX2SEL, 0x0f, 0x0d),
+ INIT_REGULATOR_REGISTER(AB8500_VAUX2SEL, 0x0d),
/*
* Vaux3Sel = 2.91 V
*/
- INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3SEL, 0x07, 0x07),
+ INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3SEL, 0x07),
/*
* VextSupply12LP = disabled (no LP)
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUCTRL2SPARE, 0x01, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_REGUCTRL2SPARE, 0x00),
/*
* Vaux1Disch = short discharge time
* Vaux2Disch = short discharge time
@@ -227,241 +253,33 @@ struct ab8500_regulator_reg_init
* VTVoutDisch = short discharge time
* VaudioDisch = short discharge time
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH, 0xfc, 0x00),
+ INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH, 0x00),
/*
* VanaDisch = short discharge time
* VdmicPullDownEna = pulldown disabled when Vdmic is disabled
* VdmicDisch = short discharge time
*/
- INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH2, 0x16, 0x00),
-};
-
-/* vana regulator configuration, for analogue part of displays */
-static struct regulator_consumer_supply ab8500_vana_consumers[] = {
- /* External displays, connector on board, 1v8 power supply */
- REGULATOR_SUPPLY("vsmps2", "mcde.0"),
- {
- .dev_name = "mcde",
- .supply = "v-ana",
- },
- {
- .dev_name = "mmio_camera",
- .supply = "v-ana",
- },
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.9",
- .supply = "ana",
- },
-#endif
-};
-
-#ifdef CONFIG_SENSORS1P_MOP
-extern struct platform_device sensors1p_device;
-#endif
-
-/* vaux1 regulator configuration */
-static struct regulator_consumer_supply ab8500_vaux1_consumers[] = {
- /* External displays, connector on board 2v5 power supply */
- REGULATOR_SUPPLY("vaux12v5", "mcde_disp_generic.0"),
- /* SFH7741 proximity sensor */
- REGULATOR_SUPPLY("vcc", "gpio-keys.0"),
- /* BH1780GLS ambient light sensor */
- REGULATOR_SUPPLY("vcc", "2-0029"),
- /* lsm303dlh accelerometer */
- REGULATOR_SUPPLY("vdd", "lsm303dlh.0"),
- /* lsm303dlh magnetometer */
- REGULATOR_SUPPLY("vdd", "lsm303dlh.1"),
- /* Rohm BU21013 Touchscreen devices */
- REGULATOR_SUPPLY("avdd", "3-005c"),
- REGULATOR_SUPPLY("avdd", "3-005d"),
- /* Synaptics RMI4 Touchscreen device */
- REGULATOR_SUPPLY("vdd", "3-004b"),
- /* L3G4200D Gyroscope device */
- REGULATOR_SUPPLY("vdd", "l3g4200d"),
- REGULATOR_SUPPLY("v-mmio-camera", "mmio_camera"),
-
- {
- .dev = NULL,
- .supply = "v-display",
- },
-#ifdef CONFIG_SENSORS1P_MOP
- {
- .dev = &sensors1p_device.dev,
- .supply = "v-proximity",
- },
- {
- .dev = &sensors1p_device.dev,
- .supply = "v-hal",
- },
-#endif
-#ifdef CONFIG_SENSORS_BH1780
- {
- .dev_name = "bh1780",
- .supply = "v-als",
- },
-#endif
- {
- .dev_name = "spi8.0",
- .supply = "vcpin",
- },
- REGULATOR_SUPPLY_DEBUG("aux1", "reg-virt-consumer.0")
+ INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH2, 0x00),
};
-/* vaux2 regulator configuration */
-static struct regulator_consumer_supply ab8500_vaux2_consumers[] = {
- /* On-board eMMC power */
- REGULATOR_SUPPLY("vmmc", "sdi4"),
- /* AB8500 audio codec */
- REGULATOR_SUPPLY("vcc-avswitch", "ab8500-codec.0"),
- REGULATOR_SUPPLY("vcc-avswitch", "ab8500-acc-det.0"),
- {
- .dev_name = "sdi4",
- .supply = "v-eMMC",
- },
-#ifdef CONFIG_DISPLAY_AB8500_TERTIARY
- {
- .dev = &tvout_ab8500_display.dev,
- .supply = "v-ab8500-AV-switch",
- },
-#endif
-#ifdef CONFIG_DISPLAY_AV8100_TERTIARY
- {
- .dev = &av8100_hdmi.dev,
- .supply = "v-av8100-AV-switch",
- },
-#endif
- REGULATOR_SUPPLY_DEBUG("aux2", "reg-virt-consumer.1")
-};
-
-/* vaux3 regulator configuration */
-static struct regulator_consumer_supply ab8500_vaux3_consumers[] = {
- /* External MMC slot power */
- REGULATOR_SUPPLY("vmmc", "sdi0"),
-
- {
- .dev_name = "sdi0",
- .supply = "v-MMC-SD"
- },
- REGULATOR_SUPPLY_DEBUG("aux3", "reg-virt-consumer.2")
-};
-
-/* vtvout regulator configuration, supply for tvout, gpadc, TVOUT LDO */
-static struct regulator_consumer_supply ab8500_vtvout_consumers[] = {
- /* TV-out DENC supply */
- REGULATOR_SUPPLY("vtvout", "ab8500-denc.0"),
- /* Internal general-purpose ADC */
- REGULATOR_SUPPLY("vddadc", "ab8500-gpadc.0"),
- REGULATOR_SUPPLY("vddadc", "ab8500-charger.0"),
-#ifdef CONFIG_DISPLAY_AB8500_TERTIARY
- {
- .dev = &tvout_ab8500_display.dev,
- .supply = "v-tvout",
- },
-#endif
- REGULATOR_SUPPLY_DEBUG("tvout", "reg-virt-consumer.4")
-};
-
-/* vaudio regulator configuration, supply for ab8500-vaudio, VAUDIO LDO */
-static struct regulator_consumer_supply ab8500_vaudio_consumers[] = {
- /* vaudio regulator, supply for ab8500-vaudio */
- REGULATOR_SUPPLY("v-audio", NULL),
- REGULATOR_SUPPLY_DEBUG("audio", "reg-virt-consumer.5")
-};
-
-/* vamic1 regulator configuration */
-static struct regulator_consumer_supply ab8500_vamic1_consumers[] = {
- {
- .supply = "v-amic1",
- },
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.6",
- .supply = "anamic1",
- },
-#endif
-};
-
-/* supply for v-amic2, VAMIC2 LDO, reuse constants for AMIC1 */
-static struct regulator_consumer_supply ab8500_vamic2_consumers[] = {
- {
- .supply = "v-amic2",
- },
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.7",
- .supply = "anamic2",
- },
-#endif
-};
-
-/* supply for v-dmic, VDMIC LDO */
-static struct regulator_consumer_supply ab8500_vdmic_consumers[] = {
- {
- .supply = "v-dmic",
- },
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.8",
- .supply = "dmic",
- },
-#endif
-};
-
-/* supply for v-intcore12, VINTCORE12 LDO */
-static struct regulator_consumer_supply ab8500_vintcore_consumers[] = {
- /* SoC core supply, no device */
- REGULATOR_SUPPLY("v-intcore", NULL),
- /* USB Transciever */
- REGULATOR_SUPPLY("vddulpivio18", "ab8500-usb.0"),
- {
- .dev_name = "ab8500-usb.0",
- .supply = "v-intcore",
- },
- REGULATOR_SUPPLY_DEBUG("intcore", "reg-virt-consumer.3")
-};
-
-/* supply for CG2900 */
-static struct regulator_consumer_supply ab8500_sysclkreq_2_consumers[] = {
- {
- .dev_name = "cg2900-uart.0",
- .supply = "gbf_1v8",
- },
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.10",
- .supply = "sysclkreq-2",
- },
-#endif
-};
-
-/* supply for CW1200 */
-static struct regulator_consumer_supply ab8500_sysclkreq_4_consumers[] = {
- {
- .dev_name = "cw1200",
- .supply = "wlan_1v8",
- },
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.11",
- .supply = "sysclkreq-4",
- },
-#endif
-};
-
-/*
- * AB8500 regulators
- */
+/* AB8500 regulators */
struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
/* supplies to the display/camera */
[AB8500_LDO_AUX1] = {
.constraints = {
- .name = "ab8500-vaux1",
- .min_uV = 2800000,
- .max_uV = 3300000,
+ .name = "V-DISPLAY",
+ .min_uV = 2500000,
+ .max_uV = 2900000,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
REGULATOR_CHANGE_STATUS,
- .boot_on = 1, /* must be on for display */
+ .boot_on = 1, /* display is on at boot */
+ /*
+ * This voltage cannot be disabled right now because
+ * it is somehow affecting the external MMC
+ * functionality, though that typically will use
+ * AUX3.
+ */
+ .always_on = 1,
},
.num_consumer_supplies = ARRAY_SIZE(ab8500_vaux1_consumers),
.consumer_supplies = ab8500_vaux1_consumers,
@@ -469,14 +287,11 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
/* supplies to the on-board eMMC */
[AB8500_LDO_AUX2] = {
.constraints = {
- .name = "ab8500-vaux2",
+ .name = "V-eMMC1",
.min_uV = 1100000,
.max_uV = 3300000,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
- REGULATOR_CHANGE_STATUS |
- REGULATOR_CHANGE_MODE,
- .valid_modes_mask = REGULATOR_MODE_NORMAL |
- REGULATOR_MODE_IDLE,
+ REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(ab8500_vaux2_consumers),
.consumer_supplies = ab8500_vaux2_consumers,
@@ -484,14 +299,11 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
/* supply for VAUX3, supplies to SDcard slots */
[AB8500_LDO_AUX3] = {
.constraints = {
- .name = "ab8500-vaux3",
+ .name = "V-MMC-SD",
.min_uV = 1100000,
.max_uV = 3300000,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
- REGULATOR_CHANGE_STATUS |
- REGULATOR_CHANGE_MODE,
- .valid_modes_mask = REGULATOR_MODE_NORMAL |
- REGULATOR_MODE_IDLE,
+ REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(ab8500_vaux3_consumers),
.consumer_supplies = ab8500_vaux3_consumers,
@@ -499,7 +311,7 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
/* supply for tvout, gpadc, TVOUT LDO */
[AB8500_LDO_TVOUT] = {
.constraints = {
- .name = "ab8500-vtvout",
+ .name = "V-TVOUT",
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(ab8500_vtvout_consumers),
@@ -508,52 +320,36 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
/* supply for ab8500-vaudio, VAUDIO LDO */
[AB8500_LDO_AUDIO] = {
.constraints = {
- .name = "ab8500-vaudio",
+ .name = "V-AUD",
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
- .num_consumer_supplies = ARRAY_SIZE(ab8500_vaudio_consumers),
- .consumer_supplies = ab8500_vaudio_consumers,
},
/* supply for v-anamic1 VAMic1-LDO */
[AB8500_LDO_ANAMIC1] = {
.constraints = {
- .name = "ab8500-vamic1",
+ .name = "V-AMIC1",
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
- .num_consumer_supplies = ARRAY_SIZE(ab8500_vamic1_consumers),
- .consumer_supplies = ab8500_vamic1_consumers,
},
/* supply for v-amic2, VAMIC2 LDO, reuse constants for AMIC1 */
[AB8500_LDO_ANAMIC2] = {
.constraints = {
- .name = "ab8500-vamic2",
+ .name = "V-AMIC2",
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
- .num_consumer_supplies = ARRAY_SIZE(ab8500_vamic2_consumers),
- .consumer_supplies = ab8500_vamic2_consumers,
},
/* supply for v-dmic, VDMIC LDO */
[AB8500_LDO_DMIC] = {
.constraints = {
- .name = "ab8500-vdmic",
+ .name = "V-DMIC",
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
- .num_consumer_supplies = ARRAY_SIZE(ab8500_vdmic_consumers),
- .consumer_supplies = ab8500_vdmic_consumers,
},
/* supply for v-intcore12, VINTCORE12 LDO */
[AB8500_LDO_INTCORE] = {
.constraints = {
- .name = "ab8500-vintcore",
- .min_uV = 1250000,
- .max_uV = 1350000,
- .input_uV = 1800000,
- .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
- REGULATOR_CHANGE_STATUS |
- REGULATOR_CHANGE_MODE |
- REGULATOR_CHANGE_DRMS,
- .valid_modes_mask = REGULATOR_MODE_NORMAL |
- REGULATOR_MODE_IDLE,
+ .name = "V-INTCORE",
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(ab8500_vintcore_consumers),
.consumer_supplies = ab8500_vintcore_consumers,
@@ -561,626 +357,10 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
/* supply for U8500 CSI/DSI, VANA LDO */
[AB8500_LDO_ANA] = {
.constraints = {
- .name = "ab8500-vana",
+ .name = "V-CSI/DSI",
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(ab8500_vana_consumers),
.consumer_supplies = ab8500_vana_consumers,
},
- /* sysclkreq 2 pin */
- [AB8500_SYSCLKREQ_2] = {
- .constraints = {
- .name = "ab8500-sysclkreq-2",
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .num_consumer_supplies =
- ARRAY_SIZE(ab8500_sysclkreq_2_consumers),
- .consumer_supplies = ab8500_sysclkreq_2_consumers,
- },
- /* sysclkreq 4 pin */
- [AB8500_SYSCLKREQ_4] = {
- .constraints = {
- .name = "ab8500-sysclkreq-4",
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .num_consumer_supplies =
- ARRAY_SIZE(ab8500_sysclkreq_4_consumers),
- .consumer_supplies = ab8500_sysclkreq_4_consumers,
- },
-};
-
-/*
- * Power State Regulator Configuration
- */
-#define U8500_VAPE_REGULATOR_MIN_VOLTAGE 1800000
-#define U8500_VAPE_REGULATOR_MAX_VOLTAGE 2000000
-
-/* vape regulator configuration */
-static struct regulator_consumer_supply u8500_vape_consumers[] = {
- {
- .supply = "v-ape",
- },
- {
- .dev_name = "nmk-i2c.0",
- .supply = "v-i2c",
- },
- {
- .dev_name = "nmk-i2c.1",
- .supply = "v-i2c",
- },
- {
- .dev_name = "nmk-i2c.2",
- .supply = "v-i2c",
- },
- {
- .dev_name = "nmk-i2c.3",
- .supply = "v-i2c",
- },
- {
- .dev_name = "sdi0",
- .supply = "v-mmc",
- },
- {
- .dev_name = "sdi1",
- .supply = "v-mmc",
- },
- {
- .dev_name = "sdi2",
- .supply = "v-mmc",
- },
- {
- .dev_name = "sdi4",
- .supply = "v-mmc",
- },
- {
- .dev_name = "dma40.0",
- .supply = "v-dma",
- },
- {
- .dev_name = "ab8500-usb.0",
- .supply = "v-ape",
- },
- {
- .dev_name = "uart0",
- .supply = "v-uart",
- },
- {
- .dev_name = "uart1",
- .supply = "v-uart",
- },
- {
- .dev_name = "uart2",
- .supply = "v-uart",
- },
- {
- .dev_name = "nmk-ske-keypad",
- .supply = "v-ape",
- },
- {
- .dev_name = "ste_hsi.0",
- .supply = "v-hsi",
- },
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.12",
- .supply = "test",
- },
-#endif
-};
-
-struct regulator_init_data u8500_vape_regulator = {
- .constraints = {
- .name = "u8500-vape",
- .min_uV = U8500_VAPE_REGULATOR_MIN_VOLTAGE,
- .max_uV = U8500_VAPE_REGULATOR_MAX_VOLTAGE,
- .input_uV = 1, /* notional, for set_mode* */
- .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
- REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_DRMS |
- REGULATOR_CHANGE_STATUS,
- .valid_modes_mask = REGULATOR_MODE_NORMAL |
- REGULATOR_MODE_IDLE,
- },
- .consumer_supplies = u8500_vape_consumers,
- .num_consumer_supplies = ARRAY_SIZE(u8500_vape_consumers),
-};
-
-/* varm regulator_configuration */
-static struct regulator_consumer_supply u8500_varm_consumers[] = {
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.13",
- .supply = "test",
- },
-#endif
-};
-
-struct regulator_init_data u8500_varm_regulator = {
- .constraints = {
- .name = "u8500-varm",
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .consumer_supplies = u8500_varm_consumers,
- .num_consumer_supplies = ARRAY_SIZE(u8500_varm_consumers),
-};
-
-/* vmodem regulator configuration */
-static struct regulator_consumer_supply u8500_vmodem_consumers[] = {
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.14",
- .supply = "test",
- },
-#endif
-};
-
-struct regulator_init_data u8500_vmodem_regulator = {
- .constraints = {
- .name = "u8500-vmodem",
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .consumer_supplies = u8500_vmodem_consumers,
- .num_consumer_supplies = ARRAY_SIZE(u8500_vmodem_consumers),
-};
-
-/* vpll regulator configuration */
-static struct regulator_consumer_supply u8500_vpll_consumers[] = {
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.15",
- .supply = "test",
- },
-#endif
-};
-
-struct regulator_init_data u8500_vpll_regulator = {
- .constraints = {
- .name = "u8500-vpll",
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .consumer_supplies = u8500_vpll_consumers,
- .num_consumer_supplies = ARRAY_SIZE(u8500_vpll_consumers),
-};
-
-/* vsmps1 regulator configuration */
-static struct regulator_consumer_supply u8500_vsmps1_consumers[] = {
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.16",
- .supply = "test",
- },
-#endif
-};
-
-struct regulator_init_data u8500_vsmps1_regulator = {
- .constraints = {
- .name = "u8500-vsmps1",
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .consumer_supplies = u8500_vsmps1_consumers,
- .num_consumer_supplies = ARRAY_SIZE(u8500_vsmps1_consumers),
-};
-
-/* vsmsp2 regulator configuration */
-static struct regulator_consumer_supply u8500_vsmps2_consumers[] = {
- {
- .dev_name = "ab8500-usb.0",
- .supply = "musb_1v8",
- },
- {
- .dev_name = "0-0070",
- .supply = "hdmi_1v8",
- },
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.17",
- .supply = "test",
- },
-#endif
-};
-
-struct regulator_init_data u8500_vsmps2_regulator = {
- .constraints = {
- .name = "u8500-vsmps2",
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .consumer_supplies = u8500_vsmps2_consumers,
- .num_consumer_supplies = ARRAY_SIZE(u8500_vsmps2_consumers),
-};
-
-/* vsmps3 regulator configuration */
-static struct regulator_consumer_supply u8500_vsmps3_consumers[] = {
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.18",
- .supply = "test",
- },
-#endif
-};
-
-struct regulator_init_data u8500_vsmps3_regulator = {
- .constraints = {
- .name = "u8500-vsmps3",
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .consumer_supplies = u8500_vsmps3_consumers,
- .num_consumer_supplies = ARRAY_SIZE(u8500_vsmps3_consumers),
-};
-
-/* vrf1 regulator configuration */
-static struct regulator_consumer_supply u8500_vrf1_consumers[] = {
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.19",
- .supply = "test",
- },
-#endif
-};
-
-struct regulator_init_data u8500_vrf1_regulator = {
- .constraints = {
- .name = "u8500-vrf1",
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .consumer_supplies = u8500_vrf1_consumers,
- .num_consumer_supplies = ARRAY_SIZE(u8500_vrf1_consumers),
-};
-
-/*
- * Power Domain Switch Configuration
- */
-
-/* SVA MMDSP regulator switch */
-static struct regulator_consumer_supply u8500_svammdsp_consumers[] = {
- {
- /* NOTE! This is a temporary supply for prcmu_set_hwacc */
- .supply = "hwacc-sva-mmdsp",
- },
- {
- .dev_name = "cm_control",
- .supply = "sva-mmdsp",
- },
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.20",
- .supply = "test",
- },
-#endif
-};
-
-struct regulator_init_data u8500_svammdsp_regulator = {
- /* dependency to u8500-vape is handled outside regulator framework */
- .constraints = {
- .name = "u8500-sva-mmdsp",
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .consumer_supplies = u8500_svammdsp_consumers,
- .num_consumer_supplies = ARRAY_SIZE(u8500_svammdsp_consumers),
-};
-
-/* SVA MMDSP retention regulator switch */
-static struct regulator_consumer_supply u8500_svammdspret_consumers[] = {
- {
- /* NOTE! This is a temporary supply for prcmu_set_hwacc */
- .supply = "hwacc-sva-mmdsp-ret",
- },
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.21",
- .supply = "test",
- },
-#endif
-};
-
-struct regulator_init_data u8500_svammdspret_regulator = {
- .constraints = {
- .name = "u8500-sva-mmdsp-ret",
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .consumer_supplies = u8500_svammdspret_consumers,
- .num_consumer_supplies = ARRAY_SIZE(u8500_svammdspret_consumers),
-};
-
-/* SVA pipe regulator switch */
-static struct regulator_consumer_supply u8500_svapipe_consumers[] = {
- /* Add SVA pipe device supply here */
- {
- /* NOTE! This is a temporary supply for prcmu_set_hwacc */
- .supply = "hwacc-sva-pipe",
- },
- {
- .dev_name = "cm_control",
- .supply = "sva-pipe",
- },
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.22",
- .supply = "test",
- },
-#endif
-};
-
-struct regulator_init_data u8500_svapipe_regulator = {
- /* dependency to u8500-vape is handled outside regulator framework */
- .constraints = {
- .name = "u8500-sva-pipe",
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .consumer_supplies = u8500_svapipe_consumers,
- .num_consumer_supplies = ARRAY_SIZE(u8500_svapipe_consumers),
-};
-
-/* SIA MMDSP regulator switch */
-static struct regulator_consumer_supply u8500_siammdsp_consumers[] = {
- {
- /* NOTE! This is a temporary supply for prcmu_set_hwacc */
- .supply = "hwacc-sia-mmdsp",
- },
- {
- .dev_name = "cm_control",
- .supply = "sia-mmdsp",
- },
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.23",
- .supply = "test",
- },
-#endif
-};
-
-struct regulator_init_data u8500_siammdsp_regulator = {
- /* dependency to u8500-vape is handled outside regulator framework */
- .constraints = {
- .name = "u8500-sia-mmdsp",
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .consumer_supplies = u8500_siammdsp_consumers,
- .num_consumer_supplies = ARRAY_SIZE(u8500_siammdsp_consumers),
-};
-
-/* SIA MMDSP retention regulator switch */
-static struct regulator_consumer_supply u8500_siammdspret_consumers[] = {
- {
- /* NOTE! This is a temporary supply for prcmu_set_hwacc */
- .supply = "hwacc-sia-mmdsp-ret",
- },
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.24",
- .supply = "test",
- },
-#endif
-};
-
-struct regulator_init_data u8500_siammdspret_regulator = {
- .constraints = {
- .name = "u8500-sia-mmdsp-ret",
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .consumer_supplies = u8500_siammdspret_consumers,
- .num_consumer_supplies = ARRAY_SIZE(u8500_siammdspret_consumers),
-};
-
-/* SIA pipe regulator switch */
-static struct regulator_consumer_supply u8500_siapipe_consumers[] = {
- /* Add SIA pipe device supply here */
- {
- /* NOTE! This is a temporary supply for prcmu_set_hwacc */
- .supply = "hwacc-sia-pipe",
- },
- {
- .dev_name = "cm_control",
- .supply = "sia-pipe",
- },
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.25",
- .supply = "test",
- },
-#endif
-};
-
-struct regulator_init_data u8500_siapipe_regulator = {
- /* dependency to u8500-vape is handled outside regulator framework */
- .constraints = {
- .name = "u8500-sia-pipe",
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .consumer_supplies = u8500_siapipe_consumers,
- .num_consumer_supplies = ARRAY_SIZE(u8500_siapipe_consumers),
-};
-
-/* SGA regulator switch */
-static struct regulator_consumer_supply u8500_sga_consumers[] = {
- /* Add SGA device supply here */
- {
- /* NOTE! This is a temporary supply for prcmu_set_hwacc */
- .supply = "hwacc-sga",
- },
- {
- /*
- * The Mali driver doesn't have access to the device when
- * requesting the SGA regulator. Therefore only supply name.
- */
- .supply = "v-mali",
- },
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.26",
- .supply = "test",
- },
-#endif
-};
-
-struct regulator_init_data u8500_sga_regulator = {
- .supply_regulator = "u8500-vape",
- .constraints = {
- .name = "u8500-sga",
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .consumer_supplies = u8500_sga_consumers,
- .num_consumer_supplies = ARRAY_SIZE(u8500_sga_consumers),
-};
-
-/* B2R2-MCDE regulator switch */
-static struct regulator_consumer_supply u8500_b2r2_mcde_consumers[] = {
- {
- .dev_name = "b2r2_bus",
- .supply = "vsupply",
- },
- {
- .dev_name = "mcde",
- .supply = "vsupply",
- },
- {
- /* NOTE! This is a temporary supply for prcmu_set_hwacc */
- .supply = "hwacc-b2r2",
- },
- {
- /* NOTE! This is a temporary supply for prcmu_set_hwacc */
- .supply = "hwacc-mcde",
- },
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.27",
- .supply = "test",
- },
-#endif
-};
-
-struct regulator_init_data u8500_b2r2_mcde_regulator = {
- .supply_regulator = "u8500-vape",
- .constraints = {
- .name = "u8500-b2r2-mcde",
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .consumer_supplies = u8500_b2r2_mcde_consumers,
- .num_consumer_supplies = ARRAY_SIZE(u8500_b2r2_mcde_consumers),
-};
-
-/* ESRAM1 and 2 regulator switch */
-static struct regulator_consumer_supply u8500_esram12_consumers[] = {
- {
- /* NOTE! This is a temporary supply for prcmu_set_hwacc */
- .supply = "hwacc-esram1",
- },
- {
- /* NOTE! This is a temporary supply for prcmu_set_hwacc */
- .supply = "hwacc-esram2",
- },
- {
- .dev_name = "cm_control",
- .supply = "esram12",
- },
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.28",
- .supply = "test",
- },
-#endif
-};
-
-struct regulator_init_data u8500_esram12_regulator = {
- /*
- * esram12 is set in retention and supplied by Vsafe when Vape is off,
- * no need to hold Vape
- */
- .constraints = {
- .name = "u8500-esram12",
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .consumer_supplies = u8500_esram12_consumers,
- .num_consumer_supplies = ARRAY_SIZE(u8500_esram12_consumers),
-};
-
-/* ESRAM1 and 2 retention regulator switch */
-static struct regulator_consumer_supply u8500_esram12ret_consumers[] = {
- {
- /* NOTE! This is a temporary supply for prcmu_set_hwacc */
- .supply = "hwacc-esram1-ret",
- },
- {
- /* NOTE! This is a temporary supply for prcmu_set_hwacc */
- .supply = "hwacc-esram2-ret",
- },
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.29",
- .supply = "test",
- },
-#endif
-};
-
-struct regulator_init_data u8500_esram12ret_regulator = {
- .constraints = {
- .name = "u8500-esram12-ret",
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .consumer_supplies = u8500_esram12ret_consumers,
- .num_consumer_supplies = ARRAY_SIZE(u8500_esram12ret_consumers),
-};
-
-/* ESRAM3 and 4 regulator switch */
-static struct regulator_consumer_supply u8500_esram34_consumers[] = {
- {
- .dev_name = "mcde",
- .supply = "v-esram34",
- },
- {
- /* NOTE! This is a temporary supply for prcmu_set_hwacc */
- .supply = "hwacc-esram3",
- },
- {
- /* NOTE! This is a temporary supply for prcmu_set_hwacc */
- .supply = "hwacc-esram4",
- },
- {
- .dev_name = "cm_control",
- .supply = "esram34",
- },
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.30",
- .supply = "test",
- },
-#endif
-};
-
-struct regulator_init_data u8500_esram34_regulator = {
- /*
- * esram34 is set in retention and supplied by Vsafe when Vape is off,
- * no need to hold Vape
- */
- .constraints = {
- .name = "u8500-esram34",
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .consumer_supplies = u8500_esram34_consumers,
- .num_consumer_supplies = ARRAY_SIZE(u8500_esram34_consumers),
-};
-
-/* ESRAM3 and 4 retention regulator switch */
-static struct regulator_consumer_supply u8500_esram34ret_consumers[] = {
- {
- /* NOTE! This is a temporary supply for prcmu_set_hwacc */
- .supply = "hwacc-esram3-ret",
- },
- {
- /* NOTE! This is a temporary supply for prcmu_set_hwacc */
- .supply = "hwacc-esram4-ret",
- },
-#ifdef CONFIG_U8500_REGULATOR_DEBUG
- {
- .dev_name = "reg-virt-consumer.31",
- .supply = "test",
- },
-#endif
-};
-
-struct regulator_init_data u8500_esram34ret_regulator = {
- .constraints = {
- .name = "u8500-esram34-ret",
- .valid_ops_mask = REGULATOR_CHANGE_STATUS,
- },
- .consumer_supplies = u8500_esram34ret_consumers,
- .num_consumer_supplies = ARRAY_SIZE(u8500_esram34ret_consumers),
};
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.h b/arch/arm/mach-ux500/board-mop500-regulators.h
index 5a4f9560b1e..94992158d96 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.h
+++ b/arch/arm/mach-ux500/board-mop500-regulators.h
@@ -14,33 +14,9 @@
#include <linux/regulator/machine.h>
#include <linux/regulator/ab8500.h>
-/* AB8500 regulators */
extern struct ab8500_regulator_reg_init
- ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS];
+ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS];
extern struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS];
-
-/* U8500 specific regulators */
-extern struct regulator_init_data u8500_vape_regulator;
-extern struct regulator_init_data u8500_varm_regulator;
-extern struct regulator_init_data u8500_vmodem_regulator;
-extern struct regulator_init_data u8500_vpll_regulator;
-extern struct regulator_init_data u8500_vsmps1_regulator;
-extern struct regulator_init_data u8500_vsmps2_regulator;
-extern struct regulator_init_data u8500_vsmps3_regulator;
-extern struct regulator_init_data u8500_vrf1_regulator;
-
-/* U8500 specific regulator switches */
-extern struct regulator_init_data u8500_svammdsp_regulator;
-extern struct regulator_init_data u8500_svammdspret_regulator;
-extern struct regulator_init_data u8500_svapipe_regulator;
-extern struct regulator_init_data u8500_siammdsp_regulator;
-extern struct regulator_init_data u8500_siammdspret_regulator;
-extern struct regulator_init_data u8500_siapipe_regulator;
-extern struct regulator_init_data u8500_sga_regulator;
-extern struct regulator_init_data u8500_b2r2_mcde_regulator;
-extern struct regulator_init_data u8500_esram12_regulator;
-extern struct regulator_init_data u8500_esram12ret_regulator;
-extern struct regulator_init_data u8500_esram34_regulator;
-extern struct regulator_init_data u8500_esram34ret_regulator;
+extern struct regulator_init_data tps61052_regulator;
#endif
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 0060f0399a4..6d6a3d4c5ac 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -68,7 +68,6 @@
#include "devices-db8500.h"
#include "board-mop500.h"
#include "board-mop500-regulators.h"
-#include "regulator-u8500.h"
#include "board-mop500-bm.h"
#include "board-mop500-wlan.h"
#include "board-ux500-usb.h"
@@ -108,7 +107,7 @@ static struct platform_device snowball_led_dev = {
static struct ab8500_gpio_platform_data ab8500_gpio_pdata = {
.gpio_base = MOP500_AB8500_GPIO(0),
.irq_base = MOP500_AB8500_VIR_GPIO_IRQ_BASE,
- /* initial_pin_config is the initial configuration of ab8500 pins.
+ /* config_reg is the initial configuration of ab8500 pins.
* The pins can be configured as GPIO or alt functions based
* on value present in GpioSel1 to GpioSel6 and AlternatFunction
* register. This is the array of 7 configuration settings.
@@ -129,18 +128,18 @@ static struct ab8500_gpio_platform_data ab8500_gpio_pdata = {
* AlternaFunction = 0x00 => If Pins GPIO10 to 13 are not configured
* as GPIO then this register selectes the alternate functions
*/
- .initial_pin_config = {0x0F, 0x9E, 0x80, 0x01, 0x78, 0x02, 0x00},
+ .config_reg = {0x0F, 0x9E, 0x80, 0x01, 0x78, 0x02, 0x00},
- /* initial_pin_direction allows for the initial GPIO direction to
+ /* config_direction allows for the initial GPIO direction to
* be set. For Snowball we set GPIO26 to output.
*/
- .initial_pin_direction = {0x00, 0x00, 0x00, 0x02, 0x00, 0x00},
+ .config_direction = {0x00, 0x00, 0x00, 0x02, 0x00, 0x00},
/*
- * initial_pin_pullups allows for the intial configuration of the
+ * config_pullups allows for the intial configuration of the
* GPIO pullup/pulldown configuration.
*/
- .initial_pin_pullups = {0xE0, 0x01, 0x00, 0x00, 0x00, 0x00},
+ .config_pullups = {0xE0, 0x01, 0x00, 0x00, 0x00, 0x00},
};
#ifdef CONFIG_INPUT_AB8500_ACCDET
@@ -243,38 +242,6 @@ static struct platform_device snowball_sbnet_dev = {
},
};
-static struct regulator_init_data *u8500_regulators[U8500_NUM_REGULATORS] = {
- [U8500_REGULATOR_VAPE] = &u8500_vape_regulator,
- [U8500_REGULATOR_VARM] = &u8500_varm_regulator,
- [U8500_REGULATOR_VMODEM] = &u8500_vmodem_regulator,
- [U8500_REGULATOR_VPLL] = &u8500_vpll_regulator,
- [U8500_REGULATOR_VSMPS1] = &u8500_vsmps1_regulator,
- [U8500_REGULATOR_VSMPS2] = &u8500_vsmps2_regulator,
- [U8500_REGULATOR_VSMPS3] = &u8500_vsmps3_regulator,
- [U8500_REGULATOR_VRF1] = &u8500_vrf1_regulator,
- [U8500_REGULATOR_SWITCH_SVAMMDSP] = &u8500_svammdsp_regulator,
- [U8500_REGULATOR_SWITCH_SVAMMDSPRET] = &u8500_svammdspret_regulator,
- [U8500_REGULATOR_SWITCH_SVAPIPE] = &u8500_svapipe_regulator,
- [U8500_REGULATOR_SWITCH_SIAMMDSP] = &u8500_siammdsp_regulator,
- [U8500_REGULATOR_SWITCH_SIAMMDSPRET] = &u8500_siammdspret_regulator,
- [U8500_REGULATOR_SWITCH_SIAPIPE] = &u8500_siapipe_regulator,
- [U8500_REGULATOR_SWITCH_SGA] = &u8500_sga_regulator,
- [U8500_REGULATOR_SWITCH_B2R2_MCDE] = &u8500_b2r2_mcde_regulator,
- [U8500_REGULATOR_SWITCH_ESRAM12] = &u8500_esram12_regulator,
- [U8500_REGULATOR_SWITCH_ESRAM12RET] = &u8500_esram12ret_regulator,
- [U8500_REGULATOR_SWITCH_ESRAM34] = &u8500_esram34_regulator,
- [U8500_REGULATOR_SWITCH_ESRAM34RET] = &u8500_esram34ret_regulator,
-};
-
-static struct platform_device u8500_regulator_dev = {
- .name = "u8500-regulators",
- .id = 0,
- .dev = {
- .platform_data = u8500_regulators,
- },
-};
-
-
#ifdef CONFIG_MODEM_U8500
static struct platform_device u8500_modem_dev = {
.name = "u8500-modem",
@@ -1181,10 +1148,6 @@ static void __init mop500_init_machine(void)
{
int i2c0_devs;
-#ifdef CONFIG_REGULATOR
- platform_device_register(&u8500_regulator_dev);
-#endif
-
/*
* The HREFv60 board removed a GPIO expander and routed
* all these GPIO pins to the internal GPIO controller
diff --git a/arch/arm/mach-ux500/include/mach/regulator.h b/arch/arm/mach-ux500/include/mach/regulator.h
deleted file mode 100644
index 18c0a011a8f..00000000000
--- a/arch/arm/mach-ux500/include/mach/regulator.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (C) ST-Ericsson SA 2010
- *
- * Author: Bengt Jonsson <bengt.jonsson@stericsson.com> for ST-Ericsson,
- * Jonas Aaberg <jonas.aberg@stericsson.com> for ST-Ericsson
- *
- * License Terms: GNU General Public License v2
- *
- */
-
-#ifndef MACH_UX500_REGULATOR_H
-#define MACH_UX500_REGULATOR_H
-
-#include <linux/device.h>
-
-struct ux500_regulator;
-
-#ifdef CONFIG_REGULATOR
-/*
- * NOTE! The device will be connected to the correct regulator by this
- * new framework. A list with connections will match up dev_name(dev)
- * to the specific regulator. This follows the same principle as the
- * normal regulator framework.
- *
- * This framework shall only be used in special cases when a regulator
- * has to be enabled/disabled in atomic context.
- */
-
-/**
- * ux500_regulator_get()
- *
- * @dev: Drivers device struct
- *
- * Returns a ux500_regulator struct. Shall be used as argument for
- * ux500_regulator_atomic_enable/disable calls.
- * Return ERR_PTR(-EINVAL) upon no matching regulator found.
- */
-struct ux500_regulator *__must_check ux500_regulator_get(struct device *dev);
-
-/**
- * ux500_regulator_atomic_enable()
- *
- * @regulator: Regulator handle, provided from ux500_regulator_get.
- *
- * The enable/disable functions keep an internal counter, so every
- * enable must be paired with an disable in order to turn off regulator.
- */
-int ux500_regulator_atomic_enable(struct ux500_regulator *regulator);
-
-/**
- * ux500_regulator_atomic_disable()
- *
- * @regulator: Regulator handle, provided from ux500_regulator_get.
- *
- */
-int ux500_regulator_atomic_disable(struct ux500_regulator *regulator);
-
-/**
- * ux500_regulator_put()
- *
- * @regulator: Regulator handle, provided from ux500_regulator_get.
- */
-void ux500_regulator_put(struct ux500_regulator *regulator);
-#else
-static inline struct ux500_regulator *__must_check
-ux500_regulator_get(struct device *dev)
-{
- return ERR_PTR(-EINVAL);
-}
-
-static inline int
-ux500_regulator_atomic_enable(struct ux500_regulator *regulator)
-{
- return -EINVAL;
-}
-
-static inline int
-ux500_regulator_atomic_disable(struct ux500_regulator *regulator)
-{
- return -EINVAL;
-}
-
-static inline void ux500_regulator_put(struct ux500_regulator *regulator)
-{
-}
-#endif
-
-#ifdef CONFIG_REGULATOR_DEBUG
-void ux500_regulator_suspend_debug(void);
-void ux500_regulator_resume_debug(void);
-#else
-static inline void ux500_regulator_suspend_debug(void) { }
-static inline void ux500_regulator_resume_debug(void) { }
-#endif
-
-#endif
diff --git a/arch/arm/mach-ux500/pm/runtime.c b/arch/arm/mach-ux500/pm/runtime.c
index f50d934bd2d..839b6a007b3 100644
--- a/arch/arm/mach-ux500/pm/runtime.c
+++ b/arch/arm/mach-ux500/pm/runtime.c
@@ -17,9 +17,9 @@
#include <linux/pm_runtime.h>
#include <linux/platform_device.h>
#include <linux/amba/bus.h>
+#include <linux/mfd/dbx500-prcmu.h>
#include <linux/clk.h>
#include <plat/pincfg.h>
-#include <mach/regulator.h>
#include "../pins.h"
diff --git a/arch/arm/mach-ux500/regulator-u8500.c b/arch/arm/mach-ux500/regulator-u8500.c
deleted file mode 100644
index 49900251b06..00000000000
--- a/arch/arm/mach-ux500/regulator-u8500.c
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * Copyright (C) ST-Ericsson SA 2010
- *
- * License Terms: GNU General Public License v2
- * Author: Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/platform_device.h>
-#include <linux/regulator/driver.h>
-#include <linux/regulator/machine.h>
-#include <linux/mfd/dbx500-prcmu.h>
-
-#include "regulator-ux500.h"
-#include "regulator-u8500.h"
-
-static struct u8500_regulator_info
- u8500_regulator_info[U8500_NUM_REGULATORS] = {
- [U8500_REGULATOR_VAPE] = {
- .desc = {
- .name = "u8500-vape",
- .id = U8500_REGULATOR_VAPE,
- .ops = &ux500_regulator_ops,
- .type = REGULATOR_VOLTAGE,
- .owner = THIS_MODULE,
- },
- },
- [U8500_REGULATOR_VARM] = {
- .desc = {
- .name = "u8500-varm",
- .id = U8500_REGULATOR_VARM,
- .ops = &ux500_regulator_ops,
- .type = REGULATOR_VOLTAGE,
- .owner = THIS_MODULE,
- },
- },
- [U8500_REGULATOR_VMODEM] = {
- .desc = {
- .name = "u8500-vmodem",
- .id = U8500_REGULATOR_VMODEM,
- .ops = &ux500_regulator_ops,
- .type = REGULATOR_VOLTAGE,
- .owner = THIS_MODULE,
- },
- },
- [U8500_REGULATOR_VPLL] = {
- .desc = {
- .name = "u8500-vpll",
- .id = U8500_REGULATOR_VPLL,
- .ops = &ux500_regulator_ops,
- .type = REGULATOR_VOLTAGE,
- .owner = THIS_MODULE,
- },
- },
- [U8500_REGULATOR_VSMPS1] = {
- .desc = {
- .name = "u8500-vsmps1",
- .id = U8500_REGULATOR_VSMPS1,
- .ops = &ux500_regulator_ops,
- .type = REGULATOR_VOLTAGE,
- .owner = THIS_MODULE,
- },
- },
- [U8500_REGULATOR_VSMPS2] = {
- .desc = {
- .name = "u8500-vsmps2",
- .id = U8500_REGULATOR_VSMPS2,
- .ops = &ux500_regulator_ops,
- .type = REGULATOR_VOLTAGE,
- .owner = THIS_MODULE,
- },
- .exclude_from_power_state = true,
- },
- [U8500_REGULATOR_VSMPS3] = {
- .desc = {
- .name = "u8500-vsmps3",
- .id = U8500_REGULATOR_VSMPS3,
- .ops = &ux500_regulator_ops,
- .type = REGULATOR_VOLTAGE,
- .owner = THIS_MODULE,
- },
- },
- [U8500_REGULATOR_VRF1] = {
- .desc = {
- .name = "u8500-vrf1",
- .id = U8500_REGULATOR_VRF1,
- .ops = &ux500_regulator_ops,
- .type = REGULATOR_VOLTAGE,
- .owner = THIS_MODULE,
- },
- },
- [U8500_REGULATOR_SWITCH_SVAMMDSP] = {
- .desc = {
- .name = "u8500-sva-mmdsp",
- .id = U8500_REGULATOR_SWITCH_SVAMMDSP,
- .ops = &ux500_regulator_switch_ops,
- .type = REGULATOR_VOLTAGE,
- .owner = THIS_MODULE,
- },
- .epod_id = EPOD_ID_SVAMMDSP,
- },
- [U8500_REGULATOR_SWITCH_SVAMMDSPRET] = {
- .desc = {
- .name = "u8500-sva-mmdsp-ret",
- .id = U8500_REGULATOR_SWITCH_SVAMMDSPRET,
- .ops = &ux500_regulator_switch_ops,
- .type = REGULATOR_VOLTAGE,
- .owner = THIS_MODULE,
- },
- .epod_id = EPOD_ID_SVAMMDSP,
- .is_ramret = true,
- },
- [U8500_REGULATOR_SWITCH_SVAPIPE] = {
- .desc = {
- .name = "u8500-sva-pipe",
- .id = U8500_REGULATOR_SWITCH_SVAPIPE,
- .ops = &ux500_regulator_switch_ops,
- .type = REGULATOR_VOLTAGE,
- .owner = THIS_MODULE,
- },
- .epod_id = EPOD_ID_SVAPIPE,
- },
- [U8500_REGULATOR_SWITCH_SIAMMDSP] = {
- .desc = {
- .name = "u8500-sia-mmdsp",
- .id = U8500_REGULATOR_SWITCH_SIAMMDSP,
- .ops = &ux500_regulator_switch_ops,
- .type = REGULATOR_VOLTAGE,
- .owner = THIS_MODULE,
- },
- .epod_id = EPOD_ID_SIAMMDSP,
- },
- [U8500_REGULATOR_SWITCH_SIAMMDSPRET] = {
- .desc = {
- .name = "u8500-sia-mmdsp-ret",
- .id = U8500_REGULATOR_SWITCH_SIAMMDSPRET,
- .ops = &ux500_regulator_switch_ops,
- .type = REGULATOR_VOLTAGE,
- .owner = THIS_MODULE,
- },
- .epod_id = EPOD_ID_SIAMMDSP,
- .is_ramret = true,
- },
- [U8500_REGULATOR_SWITCH_SIAPIPE] = {
- .desc = {
- .name = "u8500-sia-pipe",
- .id = U8500_REGULATOR_SWITCH_SIAPIPE,
- .ops = &ux500_regulator_switch_ops,
- .type = REGULATOR_VOLTAGE,
- .owner = THIS_MODULE,
- },
- .epod_id = EPOD_ID_SIAPIPE,
- },
- [U8500_REGULATOR_SWITCH_SGA] = {
- .desc = {
- .name = "u8500-sga",
- .id = U8500_REGULATOR_SWITCH_SGA,
- .ops = &ux500_regulator_switch_ops,
- .type = REGULATOR_VOLTAGE,
- .owner = THIS_MODULE,
- },
- .epod_id = EPOD_ID_SGA,
- },
- [U8500_REGULATOR_SWITCH_B2R2_MCDE] = {
- .desc = {
- .name = "u8500-b2r2-mcde",
- .id = U8500_REGULATOR_SWITCH_B2R2_MCDE,
- .ops = &ux500_regulator_switch_ops,
- .type = REGULATOR_VOLTAGE,
- .owner = THIS_MODULE,
- },
- .epod_id = EPOD_ID_B2R2_MCDE,
- },
- [U8500_REGULATOR_SWITCH_ESRAM12] = {
- .desc = {
- .name = "u8500-esram12",
- .id = U8500_REGULATOR_SWITCH_ESRAM12,
- .ops = &ux500_regulator_switch_ops,
- .type = REGULATOR_VOLTAGE,
- .owner = THIS_MODULE,
- },
- .epod_id = EPOD_ID_ESRAM12,
- .is_enabled = true,
- },
- [U8500_REGULATOR_SWITCH_ESRAM12RET] = {
- .desc = {
- .name = "u8500-esram12-ret",
- .id = U8500_REGULATOR_SWITCH_ESRAM12RET,
- .ops = &ux500_regulator_switch_ops,
- .type = REGULATOR_VOLTAGE,
- .owner = THIS_MODULE,
- },
- .epod_id = EPOD_ID_ESRAM12,
- .is_ramret = true,
- },
- [U8500_REGULATOR_SWITCH_ESRAM34] = {
- .desc = {
- .name = "u8500-esram34",
- .id = U8500_REGULATOR_SWITCH_ESRAM34,
- .ops = &ux500_regulator_switch_ops,
- .type = REGULATOR_VOLTAGE,
- .owner = THIS_MODULE,
- },
- .epod_id = EPOD_ID_ESRAM34,
- .is_enabled = true,
- },
- [U8500_REGULATOR_SWITCH_ESRAM34RET] = {
- .desc = {
- .name = "u8500-esram34-ret",
- .id = U8500_REGULATOR_SWITCH_ESRAM34RET,
- .ops = &ux500_regulator_switch_ops,
- .type = REGULATOR_VOLTAGE,
- .owner = THIS_MODULE,
- },
- .epod_id = EPOD_ID_ESRAM34,
- .is_ramret = true,
- },
-};
-
-static int __devinit u8500_regulator_probe(struct platform_device *pdev)
-{
- int ret;
-
- ret = ux500_regulator_probe(pdev, u8500_regulator_info,
- ARRAY_SIZE(u8500_regulator_info));
- if (!ret)
- regulator_has_full_constraints();
-
- return ret;
-}
-
-static int __devexit u8500_regulator_remove(struct platform_device *pdev)
-{
- return ux500_regulator_remove(pdev, u8500_regulator_info,
- ARRAY_SIZE(u8500_regulator_info));
-}
-
-static struct platform_driver u8500_regulator_driver = {
- .driver = {
- .name = "u8500-regulators",
- .owner = THIS_MODULE,
- },
- .probe = u8500_regulator_probe,
- .remove = __devexit_p(u8500_regulator_remove),
-};
-
-static int __init u8500_regulator_init(void)
-{
- return platform_driver_register(&u8500_regulator_driver);
-}
-
-static void __exit u8500_regulator_exit(void)
-{
- platform_driver_unregister(&u8500_regulator_driver);
-}
-
-/* replaced subsys_initcall as regulators must be turned on early */
-arch_initcall(u8500_regulator_init);
-module_exit(u8500_regulator_exit);
-
-MODULE_AUTHOR("Bengt Jonsson <bengt.g.jonsson@stericsson.com>");
-MODULE_DESCRIPTION("U8500 regulator driver");
-MODULE_LICENSE("GPL v2");
diff --git a/arch/arm/mach-ux500/regulator-u8500.h b/arch/arm/mach-ux500/regulator-u8500.h
deleted file mode 100644
index 01dfeeb9da7..00000000000
--- a/arch/arm/mach-ux500/regulator-u8500.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) ST-Ericsson SA 2010
- *
- * License Terms: GNU General Public License v2
- *
- * Author: Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson
- *
- * Interface to platform specific regulators on U8500
- */
-
-#ifndef __REGULATOR_H__
-#define __REGULATOR_H__
-
-/* Number of U8500 regulators and regulator enumeration */
-enum u8500_regulator_id {
- U8500_REGULATOR_VAPE,
- U8500_REGULATOR_VARM,
- U8500_REGULATOR_VMODEM,
- U8500_REGULATOR_VPLL,
- U8500_REGULATOR_VSMPS1,
- U8500_REGULATOR_VSMPS2,
- U8500_REGULATOR_VSMPS3,
- U8500_REGULATOR_VRF1,
- U8500_REGULATOR_SWITCH_SVAMMDSP,
- U8500_REGULATOR_SWITCH_SVAMMDSPRET,
- U8500_REGULATOR_SWITCH_SVAPIPE,
- U8500_REGULATOR_SWITCH_SIAMMDSP,
- U8500_REGULATOR_SWITCH_SIAMMDSPRET,
- U8500_REGULATOR_SWITCH_SIAPIPE,
- U8500_REGULATOR_SWITCH_SGA,
- U8500_REGULATOR_SWITCH_B2R2_MCDE,
- U8500_REGULATOR_SWITCH_ESRAM12,
- U8500_REGULATOR_SWITCH_ESRAM12RET,
- U8500_REGULATOR_SWITCH_ESRAM34,
- U8500_REGULATOR_SWITCH_ESRAM34RET,
- U8500_NUM_REGULATORS
-};
-
-/*
- * Exported interface for CPUIdle only. This function is called with all
- * interrupts turned off.
- */
-int power_state_active_is_enabled(void);
-
-#endif
-
diff --git a/arch/arm/mach-ux500/regulator-ux500.c b/arch/arm/mach-ux500/regulator-ux500.c
deleted file mode 100644
index 4f84b9ac48d..00000000000
--- a/arch/arm/mach-ux500/regulator-ux500.c
+++ /dev/null
@@ -1,562 +0,0 @@
-/*
- * Copyright (C) ST-Ericsson SA 2010
- *
- * License Terms: GNU General Public License v2
- * Authors: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson
- * Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson
- *
- * Platform specific regulators on U8500
- *
- * NOTE! The power domains in here will be updated once B2R2 and MCDE are
- * converted to use the regulator API.
- */
-
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/err.h>
-#include <linux/spinlock.h>
-#include <linux/platform_device.h>
-#include <linux/regulator/driver.h>
-#include <linux/regulator/machine.h>
-#include <linux/mfd/dbx500-prcmu.h>
-#include <linux/debugfs.h>
-#include <linux/seq_file.h>
-#include <linux/slab.h>
-
-#include "regulator-ux500.h"
-
-#ifdef CONFIG_REGULATOR_DEBUG
-
-static struct ux500_regulator_debug {
- struct dentry *dir;
- struct dentry *status_file;
- struct u8500_regulator_info *regulator_array;
- int num_regulators;
- u8 *state_before_suspend;
- u8 *state_after_suspend;
-} rdebug;
-
-void ux500_regulator_suspend_debug(void)
-{
- int i;
- for (i = 0; i < rdebug.num_regulators; i++)
- rdebug.state_before_suspend[i] =
- rdebug.regulator_array[i].is_enabled;
-}
-
-void ux500_regulator_resume_debug(void)
-{
- int i;
- for (i = 0; i < rdebug.num_regulators; i++)
- rdebug.state_after_suspend[i] =
- rdebug.regulator_array[i].is_enabled;
-}
-
-static int ux500_regulator_status_print(struct seq_file *s, void *p)
-{
- struct device *dev = s->private;
- int err;
- int i;
-
- /* print dump header */
- err = seq_printf(s, "ux500-regulator status:\n");
- if (err < 0)
- dev_err(dev, "seq_printf overflow\n");
-
- err = seq_printf(s, "%31s : %8s : %8s\n", "current",
- "before", "after");
- if (err < 0)
- dev_err(dev, "seq_printf overflow\n");
-
- for (i = 0; i < rdebug.num_regulators; i++) {
- struct u8500_regulator_info *info;
- /* Access per-regulator data */
- info = &rdebug.regulator_array[i];
-
- /* print status */
- err = seq_printf(s, "%20s : %8s : %8s : %8s\n", info->desc.name,
- info->is_enabled ? "enabled" : "disabled",
- rdebug.state_before_suspend[i] ? "enabled" : "disabled",
- rdebug.state_after_suspend[i] ? "enabled" : "disabled");
- if (err < 0)
- dev_err(dev, "seq_printf overflow\n");
- }
-
- return 0;
-}
-
-static int ux500_regulator_status_open(struct inode *inode, struct file *file)
-{
- return single_open(file, ux500_regulator_status_print,
- inode->i_private);
-}
-
-static const struct file_operations ux500_regulator_status_fops = {
- .open = ux500_regulator_status_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
- .owner = THIS_MODULE,
-};
-
-static int __devinit
-ux500_regulator_debug_init(struct platform_device *pdev,
- struct u8500_regulator_info *regulator_info,
- int num_regulators)
-{
- /* create directory */
- rdebug.dir = debugfs_create_dir("ux500-regulator", NULL);
- if (!rdebug.dir)
- goto exit_no_debugfs;
-
- /* create "status" file */
- rdebug.status_file = debugfs_create_file("status",
- S_IRUGO, rdebug.dir, &pdev->dev,
- &ux500_regulator_status_fops);
- if (!rdebug.status_file)
- goto exit_destroy_dir;
-
- rdebug.regulator_array = regulator_info;
- rdebug.num_regulators = num_regulators;
-
- rdebug.state_before_suspend = kzalloc(num_regulators, GFP_KERNEL);
- if (!rdebug.state_before_suspend) {
- dev_err(&pdev->dev,
- "could not allocate memory for saving state\n");
- goto exit_destory_status;
- }
-
- rdebug.state_after_suspend = kzalloc(num_regulators, GFP_KERNEL);
- if (!rdebug.state_after_suspend) {
- dev_err(&pdev->dev,
- "could not allocate memory for saving state\n");
- goto exit_free;
- }
- return 0;
-
-exit_free:
- kfree(rdebug.state_before_suspend);
-exit_destory_status:
- debugfs_remove(rdebug.status_file);
-exit_destroy_dir:
- debugfs_remove(rdebug.dir);
-exit_no_debugfs:
- dev_err(&pdev->dev, "failed to create debugfs entries.\n");
- return -ENOMEM;
-}
-
-static int __devexit ux500_regulator_debug_exit(void)
-{
- debugfs_remove_recursive(rdebug.dir);
- kfree(rdebug.state_after_suspend);
- kfree(rdebug.state_before_suspend);
-
- return 0;
-}
-
-#else
-
-static inline int
-ux500_regulator_debug_init(struct platform_device *pdev,
- struct u8500_regulator_info *regulator_info,
- int num_regulators) {}
-
-static inline int ux500_regulator_debug_exit(void) {}
-
-#endif
-
-/*
- * power state reference count
- */
-static int power_state_active_cnt; /* will initialize to zero */
-static DEFINE_SPINLOCK(power_state_active_lock);
-
-static void power_state_active_enable(void)
-{
- unsigned long flags;
-
- spin_lock_irqsave(&power_state_active_lock, flags);
- power_state_active_cnt++;
- spin_unlock_irqrestore(&power_state_active_lock, flags);
-}
-
-static int power_state_active_disable(void)
-{
- int ret = 0;
- unsigned long flags;
-
- spin_lock_irqsave(&power_state_active_lock, flags);
- if (power_state_active_cnt <= 0) {
- pr_err("power state: unbalanced enable/disable calls\n");
- ret = -EINVAL;
- goto out;
- }
-
- power_state_active_cnt--;
-out:
- spin_unlock_irqrestore(&power_state_active_lock, flags);
- return ret;
-}
-
-/*
- * Exported interface for CPUIdle only. This function is called when interrupts
- * are turned off. Hence, no locking.
- */
-int power_state_active_is_enabled(void)
-{
- return (power_state_active_cnt > 0);
-}
-
-struct ux500_regulator {
- char *name;
- void (*enable)(void);
- int (*disable)(void);
-};
-
-/*
- * Don't add any clients to this struct without checking with regulator
- * responsible!
- */
-static struct ux500_regulator ux500_atomic_regulators[] = {
- {
- .name = "dma40.0",
- .enable = power_state_active_enable,
- .disable = power_state_active_disable,
- },
- {
- .name = "ssp0",
- .enable = power_state_active_enable,
- .disable = power_state_active_disable,
- },
- {
- .name = "ssp1",
- .enable = power_state_active_enable,
- .disable = power_state_active_disable,
- },
- {
- .name = "spi0",
- .enable = power_state_active_enable,
- .disable = power_state_active_disable,
- },
- {
- .name = "spi1",
- .enable = power_state_active_enable,
- .disable = power_state_active_disable,
- },
- {
- .name = "spi2",
- .enable = power_state_active_enable,
- .disable = power_state_active_disable,
- },
- {
- .name = "spi3",
- .enable = power_state_active_enable,
- .disable = power_state_active_disable,
- },
- {
- .name = "cryp1",
- .enable = power_state_active_enable,
- .disable = power_state_active_disable,
- },
- {
- .name = "hash1",
- .enable = power_state_active_enable,
- .disable = power_state_active_disable,
- },
-};
-
-struct ux500_regulator *__must_check ux500_regulator_get(struct device *dev)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(ux500_atomic_regulators); i++) {
- if (!strcmp(dev_name(dev), ux500_atomic_regulators[i].name))
- return &ux500_atomic_regulators[i];
- }
-
- return ERR_PTR(-EINVAL);
-}
-EXPORT_SYMBOL_GPL(ux500_regulator_get);
-
-int ux500_regulator_atomic_enable(struct ux500_regulator *regulator)
-{
- if (regulator) {
- regulator->enable();
- return 0;
- }
- return -EINVAL;
-}
-EXPORT_SYMBOL_GPL(ux500_regulator_atomic_enable);
-
-int ux500_regulator_atomic_disable(struct ux500_regulator *regulator)
-{
- if (regulator)
- return regulator->disable();
- else
- return -EINVAL;
-}
-EXPORT_SYMBOL_GPL(ux500_regulator_atomic_disable);
-
-void ux500_regulator_put(struct ux500_regulator *regulator)
-{
- /* Here for symetric reasons and for possible future use */
-}
-EXPORT_SYMBOL_GPL(ux500_regulator_put);
-
-static int u8500_regulator_enable(struct regulator_dev *rdev)
-{
- struct u8500_regulator_info *info = rdev_get_drvdata(rdev);
-
- if (info == NULL)
- return -EINVAL;
-
- dev_vdbg(rdev_get_dev(rdev), "regulator-%s-enable\n",
- info->desc.name);
-
- info->is_enabled = 1;
- if (!info->exclude_from_power_state)
- power_state_active_enable();
-
- return 0;
-}
-
-static int u8500_regulator_disable(struct regulator_dev *rdev)
-{
- struct u8500_regulator_info *info = rdev_get_drvdata(rdev);
- int ret = 0;
-
- if (info == NULL)
- return -EINVAL;
-
- dev_vdbg(rdev_get_dev(rdev), "regulator-%s-disable\n",
- info->desc.name);
-
- info->is_enabled = 0;
- if (!info->exclude_from_power_state)
- ret = power_state_active_disable();
-
- return ret;
-}
-
-static int u8500_regulator_is_enabled(struct regulator_dev *rdev)
-{
- struct u8500_regulator_info *info = rdev_get_drvdata(rdev);
-
- if (info == NULL)
- return -EINVAL;
-
- dev_vdbg(rdev_get_dev(rdev), "regulator-%s-is_enabled (is_enabled):"
- " %i\n", info->desc.name, info->is_enabled);
-
- return info->is_enabled;
-}
-
-/* u8500 regulator operations */
-struct regulator_ops ux500_regulator_ops = {
- .enable = u8500_regulator_enable,
- .disable = u8500_regulator_disable,
- .is_enabled = u8500_regulator_is_enabled,
-};
-
-/*
- * EPOD control
- */
-static bool epod_on[NUM_EPOD_ID];
-static bool epod_ramret[NUM_EPOD_ID];
-
-static int epod_id_to_index(u16 epod_id)
-{
- if (cpu_is_u5500())
- return epod_id - DB5500_EPOD_ID_BASE;
- else
- return epod_id;
-}
-
-static int enable_epod(u16 epod_id, bool ramret)
-{
- int idx = epod_id_to_index(epod_id);
- int ret;
-
- if (ramret) {
- if (!epod_on[idx]) {
- ret = prcmu_set_epod(epod_id, EPOD_STATE_RAMRET);
- if (ret < 0)
- return ret;
- }
- epod_ramret[idx] = true;
- } else {
- ret = prcmu_set_epod(epod_id, EPOD_STATE_ON);
- if (ret < 0)
- return ret;
- epod_on[idx] = true;
- }
-
- return 0;
-}
-
-static int disable_epod(u16 epod_id, bool ramret)
-{
- int idx = epod_id_to_index(epod_id);
- int ret;
-
- if (ramret) {
- if (!epod_on[idx]) {
- ret = prcmu_set_epod(epod_id, EPOD_STATE_OFF);
- if (ret < 0)
- return ret;
- }
- epod_ramret[idx] = false;
- } else {
- if (epod_ramret[idx]) {
- ret = prcmu_set_epod(epod_id, EPOD_STATE_RAMRET);
- if (ret < 0)
- return ret;
- } else {
- ret = prcmu_set_epod(epod_id, EPOD_STATE_OFF);
- if (ret < 0)
- return ret;
- }
- epod_on[idx] = false;
- }
-
- return 0;
-}
-
-/*
- * Regulator switch
- */
-static int u8500_regulator_switch_enable(struct regulator_dev *rdev)
-{
- struct u8500_regulator_info *info = rdev_get_drvdata(rdev);
- int ret;
-
- if (info == NULL)
- return -EINVAL;
-
- dev_vdbg(rdev_get_dev(rdev), "regulator-switch-%s-enable\n",
- info->desc.name);
-
- ret = enable_epod(info->epod_id, info->is_ramret);
- if (ret < 0) {
- dev_err(rdev_get_dev(rdev),
- "regulator-switch-%s-enable: prcmu call failed\n",
- info->desc.name);
- goto out;
- }
-
- info->is_enabled = 1;
-out:
- return ret;
-}
-
-static int u8500_regulator_switch_disable(struct regulator_dev *rdev)
-{
- struct u8500_regulator_info *info = rdev_get_drvdata(rdev);
- int ret;
-
- if (info == NULL)
- return -EINVAL;
-
- dev_vdbg(rdev_get_dev(rdev), "regulator-switch-%s-disable\n",
- info->desc.name);
-
- ret = disable_epod(info->epod_id, info->is_ramret);
- if (ret < 0) {
- dev_err(rdev_get_dev(rdev),
- "regulator_switch-%s-disable: prcmu call failed\n",
- info->desc.name);
- goto out;
- }
-
- info->is_enabled = 0;
-out:
- return ret;
-}
-
-static int u8500_regulator_switch_is_enabled(struct regulator_dev *rdev)
-{
- struct u8500_regulator_info *info = rdev_get_drvdata(rdev);
-
- if (info == NULL)
- return -EINVAL;
-
- dev_vdbg(rdev_get_dev(rdev),
- "regulator-switch-%s-is_enabled (is_enabled): %i\n",
- info->desc.name, info->is_enabled);
-
- return info->is_enabled;
-}
-
-struct regulator_ops ux500_regulator_switch_ops = {
- .enable = u8500_regulator_switch_enable,
- .disable = u8500_regulator_switch_disable,
- .is_enabled = u8500_regulator_switch_is_enabled,
-};
-
-int __devinit
-ux500_regulator_probe(struct platform_device *pdev,
- struct u8500_regulator_info *regulator_info,
- int num_regulators)
-{
- struct regulator_init_data **u8500_init_data =
- dev_get_platdata(&pdev->dev);
- int i, err;
-
- /* register all regulators */
- for (i = 0; i < num_regulators; i++) {
- struct u8500_regulator_info *info;
- struct regulator_init_data *init_data = u8500_init_data[i];
-
- /* assign per-regulator data */
- info = &regulator_info[i];
- info->dev = &pdev->dev;
-
- /* register with the regulator framework */
- info->rdev = regulator_register(&info->desc, &pdev->dev,
- init_data, info);
- if (IS_ERR(info->rdev)) {
- err = PTR_ERR(info->rdev);
- dev_err(&pdev->dev, "failed to register %s: err %i\n",
- info->desc.name, err);
-
- /* if failing, unregister all earlier regulators */
- i--;
- while (i >= 0) {
- info = &regulator_info[i];
- regulator_unregister(info->rdev);
- i--;
- }
- return err;
- }
-
- dev_vdbg(rdev_get_dev(info->rdev),
- "regulator-%s-probed\n", info->desc.name);
- }
-
- err = ux500_regulator_debug_init(pdev, regulator_info, num_regulators);
-
- return err;
-}
-
-int __devexit
-ux500_regulator_remove(struct platform_device *pdev,
- struct u8500_regulator_info *regulator_info,
- int num_regulators)
-{
- int i;
-
- ux500_regulator_debug_exit();
-
- for (i = 0; i < num_regulators; i++) {
- struct u8500_regulator_info *info;
-
- info = &regulator_info[i];
-
- dev_vdbg(rdev_get_dev(info->rdev),
- "regulator-%s-remove\n", info->desc.name);
-
- regulator_unregister(info->rdev);
- }
-
- return 0;
-}
diff --git a/arch/arm/mach-ux500/regulator-ux500.h b/arch/arm/mach-ux500/regulator-ux500.h
deleted file mode 100644
index b62863881b1..00000000000
--- a/arch/arm/mach-ux500/regulator-ux500.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef __REGULATOR_UX500_H
-#define __REGULATOR_UX500_H
-
-struct platform_device;
-
-/**
- * struct u8500_regulator_info - u8500 regulator information
- * @dev: device pointer
- * @desc: regulator description
- * @rdev: regulator device pointer
- * @is_enabled: status of the regulator
- * @epod_id: id for EPOD (power domain)
- * @is_ramret: RAM retention switch for EPOD (power domain)
- * @operating_point: operating point (only for vape, to be removed)
- * @exclude_from_power_state: don't let this regulator prevent ApSLeep
- */
-struct u8500_regulator_info {
- struct device *dev;
- struct regulator_desc desc;
- struct regulator_dev *rdev;
- bool is_enabled;
- u16 epod_id;
- bool is_ramret;
- bool exclude_from_power_state;
- unsigned int operating_point;
-};
-
-extern struct regulator_ops ux500_regulator_ops;
-extern struct regulator_ops ux500_regulator_switch_ops;
-
-int ux500_regulator_probe(struct platform_device *pdev,
- struct u8500_regulator_info *info,
- int num_regulators);
-
-int ux500_regulator_remove(struct platform_device *pdev,
- struct u8500_regulator_info *info,
- int num_regulators);
-
-#endif
diff --git a/arch/arm/mach-ux500/virt-regulator-u8500.c b/arch/arm/mach-ux500/virt-regulator-u8500.c
deleted file mode 100644
index 4915a4cf636..00000000000
--- a/arch/arm/mach-ux500/virt-regulator-u8500.c
+++ /dev/null
@@ -1,333 +0,0 @@
-/*
- * Copyright (C) ST-Ericsson SA 2010
- *
- * License Terms: GNU General Public License v2
- * Author: Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson
- *
- * Board specific file for configuration of virtual regulators. These virtual
- * regulators are used for debug purposes. They connect to the regulator device
- * just like any other consumer and expose controls in sysfs, so that
- * regulators can be controlled from user space.
- */
-
-#include <linux/init.h>
-#include <linux/platform_device.h>
-
-/*
- * Configuration for AB8500 virtual regulators
- */
-static struct platform_device u8500_aux1_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 0,
- .dev = {
- .platform_data = "aux1",
- },
-};
-
-static struct platform_device u8500_aux2_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 1,
- .dev = {
- .platform_data = "aux2",
- },
-};
-
-static struct platform_device u8500_aux3_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 2,
- .dev = {
- .platform_data = "aux3",
- },
-};
-
-static struct platform_device u8500_intcore_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 3,
- .dev = {
- .platform_data = "intcore",
- },
-};
-
-static struct platform_device u8500_tvout_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 4,
- .dev = {
- .platform_data = "tvout",
- },
-};
-
-static struct platform_device u8500_audio_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 5,
- .dev = {
- .platform_data = "audio",
- },
-};
-
-static struct platform_device u8500_anamic1_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 6,
- .dev = {
- .platform_data = "anamic1",
- },
-};
-
-static struct platform_device u8500_anamic2_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 7,
- .dev = {
- .platform_data = "anamic2",
- },
-};
-
-static struct platform_device u8500_dmic_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 8,
- .dev = {
- .platform_data = "dmic",
- },
-};
-
-static struct platform_device u8500_ana_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 9,
- .dev = {
- .platform_data = "ana",
- },
-};
-
-static struct platform_device u8500_sysclkreq_2_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 10,
- .dev = {
- .platform_data = "sysclkreq-2",
- },
-};
-
-static struct platform_device u8500_sysclkreq_4_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 11,
- .dev = {
- .platform_data = "sysclkreq-4",
- },
-};
-
-/*
- * Configuration for other U8500 virtual regulators
- */
-static struct platform_device u8500_ape_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 12,
- .dev = {
- .platform_data = "test",
- },
-};
-
-static struct platform_device u8500_arm_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 13,
- .dev = {
- .platform_data = "test",
- },
-};
-
-static struct platform_device u8500_modem_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 14,
- .dev = {
- .platform_data = "test",
- },
-};
-
-static struct platform_device u8500_pll_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 15,
- .dev = {
- .platform_data = "test",
- },
-};
-
-static struct platform_device u8500_smps1_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 16,
- .dev = {
- .platform_data = "test",
- },
-};
-
-static struct platform_device u8500_smps2_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 17,
- .dev = {
- .platform_data = "test",
- },
-};
-
-static struct platform_device u8500_smps3_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 18,
- .dev = {
- .platform_data = "test",
- },
-};
-
-static struct platform_device u8500_rf1_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 19,
- .dev = {
- .platform_data = "test",
- },
-};
-
-/*
- * Configuration for U8500 power domain virtual regulators
- */
-static struct platform_device u8500_sva_mmdsp_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 20,
- .dev = {
- .platform_data = "test",
- },
-};
-
-static struct platform_device u8500_sva_mmdsp_ret_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 21,
- .dev = {
- .platform_data = "test",
- },
-};
-
-static struct platform_device u8500_sva_pipe_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 22,
- .dev = {
- .platform_data = "test",
- },
-};
-
-static struct platform_device u8500_sia_mmdsp_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 23,
- .dev = {
- .platform_data = "test",
- },
-};
-
-static struct platform_device u8500_sia_mmdsp_ret_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 24,
- .dev = {
- .platform_data = "test",
- },
-};
-
-static struct platform_device u8500_sia_pipe_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 25,
- .dev = {
- .platform_data = "test",
- },
-};
-
-static struct platform_device u8500_sga_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 26,
- .dev = {
- .platform_data = "test",
- },
-};
-
-static struct platform_device u8500_b2r2_mcde_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 27,
- .dev = {
- .platform_data = "test",
- },
-};
-
-static struct platform_device u8500_esram12_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 28,
- .dev = {
- .platform_data = "test",
- },
-};
-
-static struct platform_device u8500_esram12_ret_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 29,
- .dev = {
- .platform_data = "test",
- },
-};
-
-static struct platform_device u8500_esram34_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 30,
- .dev = {
- .platform_data = "test",
- },
-};
-
-static struct platform_device u8500_esram34_ret_virtual_regulator_device = {
- .name = "reg-virt-consumer",
- .id = 31,
- .dev = {
- .platform_data = "test",
- },
-};
-
-static struct platform_device *u8500_virtual_regulator_devices[] = {
- &u8500_aux1_virtual_regulator_device,
- &u8500_aux2_virtual_regulator_device,
- &u8500_aux3_virtual_regulator_device,
- &u8500_intcore_virtual_regulator_device,
- &u8500_tvout_virtual_regulator_device,
- &u8500_audio_virtual_regulator_device,
- &u8500_anamic1_virtual_regulator_device,
- &u8500_anamic2_virtual_regulator_device,
- &u8500_dmic_virtual_regulator_device,
- &u8500_ana_virtual_regulator_device,
- &u8500_sysclkreq_2_virtual_regulator_device,
- &u8500_sysclkreq_4_virtual_regulator_device,
- &u8500_ape_virtual_regulator_device,
- &u8500_arm_virtual_regulator_device,
- &u8500_modem_virtual_regulator_device,
- &u8500_pll_virtual_regulator_device,
- &u8500_smps1_virtual_regulator_device,
- &u8500_smps2_virtual_regulator_device,
- &u8500_smps3_virtual_regulator_device,
- &u8500_rf1_virtual_regulator_device,
- &u8500_sva_mmdsp_virtual_regulator_device,
- &u8500_sva_mmdsp_ret_virtual_regulator_device,
- &u8500_sva_pipe_virtual_regulator_device,
- &u8500_sia_mmdsp_virtual_regulator_device,
- &u8500_sia_mmdsp_ret_virtual_regulator_device,
- &u8500_sia_pipe_virtual_regulator_device,
- &u8500_sga_virtual_regulator_device,
- &u8500_b2r2_mcde_virtual_regulator_device,
- &u8500_esram12_virtual_regulator_device,
- &u8500_esram12_ret_virtual_regulator_device,
- &u8500_esram34_virtual_regulator_device,
- &u8500_esram34_ret_virtual_regulator_device,
-};
-
-static int __init u8500_virtual_regulator_init(void)
-{
- int ret;
-
- ret = platform_add_devices(u8500_virtual_regulator_devices,
- ARRAY_SIZE(u8500_virtual_regulator_devices));
- if (ret != 0)
- pr_err("Failed to register U8500 virtual regulator devices:"
- " %d\n", ret);
-
- return ret;
-}
-module_init(u8500_virtual_regulator_init);
-
-MODULE_LICENSE("GPL v2");
-MODULE_AUTHOR("Bengt Jonsson <bengt.g.jonsson@stericsson.com");
-MODULE_DESCRIPTION("Configuration of u8500 virtual regulators");
-MODULE_ALIAS("platform:u8500-virtual-regulator");