summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Langlais <philippe.langlais@linaro.org>2012-01-11 14:18:27 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:02:29 +0200
commit1138a0bd24e6303160e8a16362f17d2fcc3da87a (patch)
treef21e0dbff2025c1e7c1a95a1eaf364a155635a9d
parent6aecb648d3e44326c1ef3ec9386139ebb29ad524 (diff)
mach-ux500: mcde: Remove static board configuration
Make device registration more dynamic using mach_is_xxx() and uib_is_xxx() type of calls instead of having compile time Kconfig settings. And clean out most unused static configuration data. ST-Ericsson ID: 368402 ST-Ericsson FOSS-OUT ID: Trivial ST-Ericsson Linux next: NA Signed-off-by: Marcus Lorentzon <marcus.xm.lorentzon@stericsson.com>
-rw-r--r--arch/arm/mach-ux500/Makefile7
-rw-r--r--arch/arm/mach-ux500/board-mop500.c8
2 files changed, 5 insertions, 10 deletions
diff --git a/arch/arm/mach-ux500/Makefile b/arch/arm/mach-ux500/Makefile
index 3409b626d04..2f6b784924d 100644
--- a/arch/arm/mach-ux500/Makefile
+++ b/arch/arm/mach-ux500/Makefile
@@ -13,10 +13,12 @@ obj-$(CONFIG_CACHE_L2X0) += cache-l2x0.o
ifeq ($(CONFIG_UX500_SOC_DB5500), y)
obj-$(CONFIG_UX500_SOC_DBX500) += cpu-db5500.o dma-db5500.o \
devices-db5500.o clock-db5500.o
+board-mcde-objs += board-u5500-mcde.o
endif
ifeq ($(CONFIG_UX500_SOC_DB8500), y)
obj-$(CONFIG_UX500_SOC_DBX500) += cpu-db8500.o devices-db8500.o \
clock-db8500.o dma-db8500.o
+board-mcde-objs += board-mop500-mcde.o
endif
obj-$(CONFIG_MACH_MOP500) += board-mop500.o board-mop500-sdi.o \
board-mop500-regulators.o \
@@ -51,10 +53,7 @@ endif
ifdef CONFIG_SENSORS_LSM303DLH
obj-$(CONFIG_MACH_MOP500) += board-mop500-sensors.o
endif
-ifdef CONFIG_FB_MCDE
-obj-$(CONFIG_MACH_MOP8500) += board-mop500-mcde.o
-obj-$(CONFIG_MACH_U5500) += board-u5500-mcde.o
-endif
+obj-$(CONFIG_FB_MCDE) += board-mcde.o
ifdef CONFIG_STM_MSP_I2S
obj-$(CONFIG_MACH_MOP500) += board-mop500-msp.o
endif
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index bf299087926..15b04fb1e12 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -788,7 +788,6 @@ static struct led_pwm pwm_leds_data[] = {
.lth_brightness = 90,
.pwm_period_ns = 1023,
},
-#ifdef CONFIG_DISPLAY_GENERIC_DSI_SECONDARY
[1] = {
.name = "sec-lcd-backlight",
.pwm_id = 2,
@@ -796,15 +795,10 @@ static struct led_pwm pwm_leds_data[] = {
.lth_brightness = 90,
.pwm_period_ns = 1023,
},
-#endif
};
static struct led_pwm_platform_data u8500_leds_data = {
-#ifdef CONFIG_DISPLAY_GENERIC_DSI_SECONDARY
- .num_leds = 2,
-#else
.num_leds = 1,
-#endif
.leds = pwm_leds_data,
};
@@ -1361,6 +1355,8 @@ static void __init hrefv60_init_machine(void)
hsi_register_board_info(u8500_hsi_devices,
ARRAY_SIZE(u8500_hsi_devices));
#endif
+ if (uib_is_stuib())
+ u8500_leds_data.num_leds = 2;
mop500_sensors1p_init();