summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-ux500/board-mop500-mcde.c8
-rw-r--r--arch/arm/mach-ux500/board-mop500-mcde.h24
-rw-r--r--arch/arm/mach-ux500/board-mop500-regulators.c17
3 files changed, 46 insertions, 3 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-mcde.c b/arch/arm/mach-ux500/board-mop500-mcde.c
index ca10a7e5b92..5d8f0f9058b 100644
--- a/arch/arm/mach-ux500/board-mop500-mcde.c
+++ b/arch/arm/mach-ux500/board-mop500-mcde.c
@@ -270,7 +270,8 @@ static struct mcde_port port_tvout1 = {
};
static struct ab8500_display_platform_data ab8500_display_pdata = {
- .denc_regulator_id = "v-tvout",
+ .nr_regulators = 2,
+ .regulator_id = {"v-tvout", "v-ab8500-AV-switch"},
.rgb_2_yCbCr_transform = {
.matrix = {
{0x42, 0x81, 0x19},
@@ -321,7 +322,7 @@ failed:
return res;
}
-static struct mcde_display_device tvout_ab8500_display = {
+struct mcde_display_device tvout_ab8500_display = {
.name = "mcde_tv_ab8500",
.id = TERTIARY_DISPLAY_ID,
.port = &port_tvout1,
@@ -381,6 +382,7 @@ struct mcde_display_hdmi_platform_data av8100_hdmi_pdata = {
.reset_gpio = 0,
.reset_delay = 1,
.regulator_id = NULL, /* TODO: "display_main" */
+ .cvbs_regulator_id = "v-av8100-AV-switch",
.ddb_id = 1,
.rgb_2_yCbCr_transform = {
.matrix = {
@@ -392,7 +394,7 @@ struct mcde_display_hdmi_platform_data av8100_hdmi_pdata = {
}
};
-static struct mcde_display_device av8100_hdmi = {
+struct mcde_display_device av8100_hdmi = {
.name = "av8100_hdmi",
.id = TERTIARY_DISPLAY_ID,
.port = &port2,
diff --git a/arch/arm/mach-ux500/board-mop500-mcde.h b/arch/arm/mach-ux500/board-mop500-mcde.h
new file mode 100644
index 00000000000..38094b81b34
--- /dev/null
+++ b/arch/arm/mach-ux500/board-mop500-mcde.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) ST-Ericsson SA 2011
+ *
+ * License Terms: GNU General Public License v2
+ *
+ * Author: Marcel Tunnissen <marcel.tuennissen@stericsson.com> for ST-Ericsson
+ *
+ * MOP500 board specific initialization for regulators
+ */
+
+#ifndef __BOARD_MOP500_MCDE_H
+#define __BOARD_MOP500_MCDE_H
+
+#include <video/mcde_display.h>
+
+#ifdef CONFIG_DISPLAY_AB8500_TERTIARY
+extern struct mcde_display_device tvout_ab8500_display;
+#endif
+
+#ifdef CONFIG_DISPLAY_AV8100_TERTIARY
+extern struct mcde_display_device av8100_hdmi;
+#endif
+
+#endif /* __BOARD_MOP500_MCDE_H */
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c
index bdc01c0a3c5..44533ee280e 100644
--- a/arch/arm/mach-ux500/board-mop500-regulators.c
+++ b/arch/arm/mach-ux500/board-mop500-regulators.c
@@ -12,12 +12,20 @@
#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
+
+#define REGULATOR_SUPPLY_DEV(_name, _dev) \
+{ \
+ .supply = _name, \
+ .dev = _dev, \
+}
+
/*
* TPS61052 regulator
*/
@@ -69,6 +77,12 @@ static struct regulator_consumer_supply ab8500_vaux2_consumers[] = {
/* AB8500 audio codec */
REGULATOR_SUPPLY("vcc-avswitch", "ab8500-codec.0"),
REGULATOR_SUPPLY("vcc-avswitch", "ab8500-acc-det.0"),
+#ifdef CONFIG_DISPLAY_AB8500_TERTIARY
+ REGULATOR_SUPPLY_DEV("v-ab8500-AV-switch", &tvout_ab8500_display.dev),
+#endif
+#ifdef CONFIG_DISPLAY_AV8100_TERTIARY
+ REGULATOR_SUPPLY_DEV("v-av8100-AV-switch", &av8100_hdmi.dev),
+#endif
REGULATOR_SUPPLY_DEBUG("aux2", "reg-virt-consumer.1")
};
@@ -91,6 +105,9 @@ static struct regulator_consumer_supply ab8500_vtvout_consumers[] = {
REGULATOR_SUPPLY("vtvout", "ab8500-denc.0"),
/* Internal general-purpose ADC */
REGULATOR_SUPPLY("vddadc", "ab8500-gpadc.0"),
+#ifdef CONFIG_DISPLAY_AB8500_TERTIARY
+ REGULATOR_SUPPLY_DEV("vtvout", &tvout_ab8500_display.dev),
+#endif
REGULATOR_SUPPLY_DEBUG("tvout", "reg-virt-consumer.4")
};