summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Langlais <philippe.langlais@linaro.org>2012-03-09 08:20:55 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:02:46 +0200
commitb8784b428d9a990124a1295cb51f40eb22fa3843 (patch)
tree5045030ab37da053e7661d6ad518b1d4ae0899e5
parent8cc483dc079b636e94d8f552cc63599b07dafb17 (diff)
mach-ux500: Camera flash put under conditional compilation
Signed-off-by: Philippe Langlais <philippe.langlais@linaro.org>
-rw-r--r--arch/arm/mach-ux500/board-mop500-cyttsp.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-cyttsp.c b/arch/arm/mach-ux500/board-mop500-cyttsp.c
index 48f4187d887..a6aa6647bd6 100644
--- a/arch/arm/mach-ux500/board-mop500-cyttsp.c
+++ b/arch/arm/mach-ux500/board-mop500-cyttsp.c
@@ -11,7 +11,9 @@
#include <linux/delay.h>
#include <linux/gpio/nomadik.h>
#include <linux/i2c.h>
-#include <linux/i2c/adp1653_plat.h>
+#ifdef CONFIG_U8500_FLASH
+#include <../drivers/staging/camera_flash/adp1653_plat.h>
+#endif
#include <linux/input/matrix_keypad.h>
#include <linux/mfd/tc3589x.h>
#include <linux/mfd/dbx500-prcmu.h>
@@ -27,15 +29,19 @@
#define NUM_SSP_CLIENTS 10
+#ifdef CONFIG_U8500_FLASH
static struct adp1653_platform_data __initdata adp1653_pdata_u8500_uib = {
.irq_no = CAMERA_FLASH_INT_PIN
};
+#endif
static struct i2c_board_info __initdata mop500_i2c2_devices_u8500_r3[] = {
+#ifdef CONFIG_U8500_FLASH
{
I2C_BOARD_INFO("adp1653", 0x30),
.platform_data = &adp1653_pdata_u8500_uib
}
+#endif
};
/* cyttsp_gpio_board_init : configures the touch panel. */
@@ -232,6 +238,8 @@ void __init mop500_u8500uib_r3_init(void)
mop500_cyttsp_init();
db8500_add_spi2(&mop500_spi2_data);
nmk_config_pin((GPIO64_GPIO | PIN_INPUT_PULLUP), false);
+
+#ifdef CONFIG_U8500_FLASH
if (machine_is_hrefv60() || machine_is_u8520()) {
adp1653_pdata_u8500_uib.enable_gpio =
HREFV60_CAMERA_FLASH_ENABLE;
@@ -239,6 +247,7 @@ void __init mop500_u8500uib_r3_init(void)
adp1653_pdata_u8500_uib.enable_gpio =
GPIO_CAMERA_FLASH_ENABLE;
}
+#endif
mop500_uib_i2c_add(0, mop500_i2c0_devices_u8500,
ARRAY_SIZE(mop500_i2c0_devices_u8500));
mop500_uib_i2c_add(0, mop500_i2c0_devices_u8500,