Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 178791
b: refs/heads/master
c: 9d00278
h: refs/heads/master
i:
  178789: f234694
  178787: 9ccb3d0
  178783: 491a6db
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and Sascha Hauer committed Jan 4, 2010
1 parent 9a8e740 commit 0d1a2ed
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2243b649aa9e5669bea5413c5b520f333f96be07
refs/heads/master: 9d00278d481b148fa99222553bb2339bc5f65036
32 changes: 25 additions & 7 deletions trunk/arch/arm/mach-mx3/pcm037.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,16 +322,25 @@ static int pcm037_camera_power(struct device *dev, int on)
return 0;
}

static struct i2c_board_info pcm037_i2c_2_devices[] = {
static struct i2c_board_info pcm037_i2c_camera[] = {
{
I2C_BOARD_INFO("mt9t031", 0x5d),
}, {
I2C_BOARD_INFO("mt9v022", 0x48),
},
};

static struct soc_camera_link iclink = {
static struct soc_camera_link iclink_mt9v022 = {
.bus_id = 0, /* Must match with the camera ID */
.board_info = &pcm037_i2c_camera[1],
.i2c_adapter_id = 2,
.module_name = "mt9v022",
};

static struct soc_camera_link iclink_mt9t031 = {
.bus_id = 0, /* Must match with the camera ID */
.power = pcm037_camera_power,
.board_info = &pcm037_i2c_2_devices[0],
.board_info = &pcm037_i2c_camera[0],
.i2c_adapter_id = 2,
.module_name = "mt9t031",
};
Expand All @@ -345,11 +354,19 @@ static struct i2c_board_info pcm037_i2c_devices[] = {
}
};

static struct platform_device pcm037_camera = {
static struct platform_device pcm037_mt9t031 = {
.name = "soc-camera-pdrv",
.id = 0,
.dev = {
.platform_data = &iclink,
.platform_data = &iclink_mt9t031,
},
};

static struct platform_device pcm037_mt9v022 = {
.name = "soc-camera-pdrv",
.id = 1,
.dev = {
.platform_data = &iclink_mt9v022,
},
};

Expand Down Expand Up @@ -449,7 +466,8 @@ static int __init pcm037_camera_alloc_dma(const size_t buf_size)
static struct platform_device *devices[] __initdata = {
&pcm037_flash,
&pcm037_sram_device,
&pcm037_camera,
&pcm037_mt9t031,
&pcm037_mt9v022,
};

static struct ipu_platform_data mx3_ipu_data = {
Expand Down Expand Up @@ -599,7 +617,7 @@ static void __init mxc_board_init(void)
if (!ret)
gpio_direction_output(IOMUX_TO_GPIO(MX31_PIN_CSI_D5), 1);
else
iclink.power = NULL;
iclink_mt9t031.power = NULL;

if (!pcm037_camera_alloc_dma(4 * 1024 * 1024))
mxc_register_device(&mx3_camera, &camera_pdata);
Expand Down

0 comments on commit 0d1a2ed

Please sign in to comment.