Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130039
b: refs/heads/master
c: ff04ea4
h: refs/heads/master
i:
  130037: 7d5f7cf
  130035: 196587b
  130031: c848083
v: v3
  • Loading branch information
Kuninori Morimoto authored and Paul Mundt committed Jan 21, 2009
1 parent 6bf7d6c commit 8171170
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c2bcc4a7ffa7438a8ded91fbd0313c50d420ff45
refs/heads/master: ff04ea40ea3037b26d01bdeacbab1d6c15c5df61
22 changes: 22 additions & 0 deletions trunk/arch/sh/boards/mach-migor/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/gpio.h>
#include <media/soc_camera_platform.h>
#include <media/sh_mobile_ceu.h>
#include <media/ov772x.h>
#include <video/sh_mobile_lcdc.h>
#include <asm/clock.h>
#include <asm/machvec.h>
Expand Down Expand Up @@ -326,6 +327,16 @@ static void camera_power(int mode)
camera_power_off();
}

static int ov7725_power(struct device *dev, int mode)
{
if (mode)
camera_power_on();
else
camera_power_off();

return 0;
}

#ifdef CONFIG_I2C
static unsigned char camera_ov772x_magic[] =
{
Expand Down Expand Up @@ -448,6 +459,13 @@ static struct platform_device migor_ceu_device = {
},
};

static struct ov772x_camera_info ov7725_info = {
.buswidth = SOCAM_DATAWIDTH_8,
.link = {
.power = ov7725_power,
},
};

static struct platform_device *migor_devices[] __initdata = {
&smc91x_eth_device,
&sh_keysc_device,
Expand All @@ -468,6 +486,10 @@ static struct i2c_board_info migor_i2c_devices[] = {
I2C_BOARD_INFO("migor_ts", 0x51),
.irq = 38, /* IRQ6 */
},
{
I2C_BOARD_INFO("ov772x", 0x21),
.platform_data = &ov7725_info,
},
};

static int __init migor_devices_setup(void)
Expand Down

0 comments on commit 8171170

Please sign in to comment.