Commit ff04ea40 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Paul Mundt

sh: mach-migor: Add ov772x support.

Signed-off-by: default avatarKuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent c2bcc4a7
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/gpio.h> #include <linux/gpio.h>
#include <media/soc_camera_platform.h> #include <media/soc_camera_platform.h>
#include <media/sh_mobile_ceu.h> #include <media/sh_mobile_ceu.h>
#include <media/ov772x.h>
#include <video/sh_mobile_lcdc.h> #include <video/sh_mobile_lcdc.h>
#include <asm/clock.h> #include <asm/clock.h>
#include <asm/machvec.h> #include <asm/machvec.h>
...@@ -326,6 +327,16 @@ static void camera_power(int mode) ...@@ -326,6 +327,16 @@ static void camera_power(int mode)
camera_power_off(); 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 #ifdef CONFIG_I2C
static unsigned char camera_ov772x_magic[] = static unsigned char camera_ov772x_magic[] =
{ {
...@@ -448,6 +459,13 @@ static struct platform_device migor_ceu_device = { ...@@ -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 = { static struct platform_device *migor_devices[] __initdata = {
&smc91x_eth_device, &smc91x_eth_device,
&sh_keysc_device, &sh_keysc_device,
...@@ -468,6 +486,10 @@ static struct i2c_board_info migor_i2c_devices[] = { ...@@ -468,6 +486,10 @@ static struct i2c_board_info migor_i2c_devices[] = {
I2C_BOARD_INFO("migor_ts", 0x51), I2C_BOARD_INFO("migor_ts", 0x51),
.irq = 38, /* IRQ6 */ .irq = 38, /* IRQ6 */
}, },
{
I2C_BOARD_INFO("ov772x", 0x21),
.platform_data = &ov7725_info,
},
}; };
static int __init migor_devices_setup(void) static int __init migor_devices_setup(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment