From: Yuxi Sun Date: Mon, 6 Feb 2012 05:45:05 +0000 (+0800) Subject: ENGR00173845 MX6Q SABRESD camera: add camera power down function X-Git-Tag: v3.0.35-fsl~1525 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f31c66da2fffbaab927c541907474687cc90c512;p=karo-tx-linux.git ENGR00173845 MX6Q SABRESD camera: add camera power down function Add camera power down function and change default camera to ov5642 for parallel interface camera Signed-off-by: Yuxi Sun --- diff --git a/arch/arm/mach-mx6/board-mx6q_sabresd.c b/arch/arm/mach-mx6/board-mx6q_sabresd.c index 764abced9497..1121feacc72b 100644 --- a/arch/arm/mach-mx6/board-mx6q_sabresd.c +++ b/arch/arm/mach-mx6/board-mx6q_sabresd.c @@ -486,6 +486,14 @@ static struct platform_device mx6_sabresd_audio_device = { .name = "imx-sgtl5000", }; +static void mx6q_csi0_cam_powerdown(int powerdown) +{ + if (powerdown) + gpio_set_value(MX6Q_SABRESD_CSI0_PWN, 1); + else + gpio_set_value(MX6Q_SABRESD_CSI0_PWN, 0); +} + static void mx6q_csi0_io_init(void) { mxc_iomux_v3_setup_multiple_pads(mx6q_sabresd_csi0_sensor_pads, @@ -520,8 +528,17 @@ static struct fsl_mxc_camera_platform_data camera_data = { .mclk = 24000000, .csi = 0, .io_init = mx6q_csi0_io_init, + .pwdn = mx6q_csi0_cam_powerdown, }; +static void mx6q_mipi_powerdown(int powerdown) +{ + if (powerdown) + gpio_set_value(MX6Q_SABRESD_MIPICSI_PWN, 1); + else + gpio_set_value(MX6Q_SABRESD_MIPICSI_PWN, 0); +} + static void mx6q_mipi_sensor_io_init(void) { mxc_iomux_v3_setup_multiple_pads(mx6q_sabresd_mipi_sensor_pads, @@ -544,6 +561,7 @@ static struct fsl_mxc_camera_platform_data mipi_csi2_data = { .mclk = 24000000, .csi = 0, .io_init = mx6q_mipi_sensor_io_init, + .pwdn = mx6q_mipi_powerdown, }; static struct imxi2c_platform_data mx6q_sabresd_i2c_data = { @@ -555,7 +573,7 @@ static struct i2c_board_info mxc_i2c0_board_info[] __initdata = { I2C_BOARD_INFO("sgtl5000", 0x0a), }, { - I2C_BOARD_INFO("ov5640", 0x3c), + I2C_BOARD_INFO("ov5642", 0x3c), .platform_data = (void *)&camera_data, }, };