summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mx5/board-mx53_smd.c
diff options
context:
space:
mode:
authorLiu Ying <Ying.Liu@freescale.com>2011-02-22 17:13:28 +0800
committerJason Liu <r64343@freescale.com>2012-01-09 20:07:58 +0800
commit322d529ed3f6397b58a8dac8f24adea3d6f74cdd (patch)
treee7d1deb54f4181a8fcd61aabe543fc5beaab0f0d /arch/arm/mach-mx5/board-mx53_smd.c
parentc772defabfa3e5a79354a9803438874181626fbd (diff)
ENGR00139383-3 MX53 SMD:Support ISL29023 light sensor
This patch adds ISL29023 light sensor support. Signed-off-by: Liu Ying <Ying.Liu@freescale.com> Signed-off-by: Frank Li <Frank.Li@freescale.com>
Diffstat (limited to 'arch/arm/mach-mx5/board-mx53_smd.c')
-rwxr-xr-xarch/arm/mach-mx5/board-mx53_smd.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/board-mx53_smd.c b/arch/arm/mach-mx5/board-mx53_smd.c
index d1b597cf81cf..9ca2023ccdff 100755
--- a/arch/arm/mach-mx5/board-mx53_smd.c
+++ b/arch/arm/mach-mx5/board-mx53_smd.c
@@ -60,6 +60,7 @@
#define MX53_SMD_OSC_CKIH1_EN IMX_GPIO_NR(6, 11)
#define MX53_SMD_DCDC1V8_EN IMX_GPIO_NR(3, 1)
#define MX53_SMD_DCDC5V_BB_EN IMX_GPIO_NR(4, 14)
+#define MX53_SMD_ALS_INT IMX_GPIO_NR(3, 22)
extern int mx53_smd_init_da9052(void);
@@ -250,6 +251,10 @@ static struct fsl_mxc_camera_platform_data camera_data = {
.csi = 0,
};
+static struct fsl_mxc_lightsensor_platform_data ls_data = {
+ .rext = 700, /* calibration: 499K->700K */
+};
+
static struct i2c_board_info mxc_i2c0_board_info[] __initdata = {
{
.type = "mma8451",
@@ -260,6 +265,7 @@ static struct i2c_board_info mxc_i2c0_board_info[] __initdata = {
.addr = 0x3C,
.platform_data = (void *)&camera_data,
},
+
};
static u16 smd_touchkey_martix[4] = {
@@ -339,6 +345,13 @@ static struct i2c_board_info mxc_i2c2_board_info[] __initdata = {
I2C_BOARD_INFO("p1003_ts", 0x41),
.irq = gpio_to_irq(MX53_SMD_CAP_TCH_INT1),
},
+ {
+ .type = "isl29023",
+ .addr = 0x44,
+ .irq = gpio_to_irq(MX53_SMD_ALS_INT),
+ .platform_data = &ls_data,
+ },
+
};
/* HW Initialization, if return 0, initialization is successful. */
@@ -563,6 +576,10 @@ static void __init mx53_smd_board_init(void)
gpio_request(MX53_SMD_DCDC1V8_EN, "dcdc1v8-en");
gpio_direction_output(MX53_SMD_DCDC1V8_EN, 1);
+ /* ambient light sensor */
+ gpio_request(MX53_SMD_ALS_INT, "als int");
+ gpio_direction_input(MX53_SMD_ALS_INT);
+
mxc_register_device(&smd_audio_device, &smd_audio_data);
imx53_add_imx_ssi(1, &smd_ssi_pdata);
}