aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards
diff options
context:
space:
mode:
authorKuninori Morimoto <morimoto.kuninori@renesas.com>2008-12-02 02:38:34 -0500
committerPaul Mundt <lethal@linux-sh.org>2009-01-21 03:41:28 -0500
commitff04ea40ea3037b26d01bdeacbab1d6c15c5df61 (patch)
treec506e72b9cdd0d7e35f108bc8cda67a9d252c29b /arch/sh/boards
parentc2bcc4a7ffa7438a8ded91fbd0313c50d420ff45 (diff)
sh: mach-migor: Add ov772x support.
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards')
-rw-r--r--arch/sh/boards/mach-migor/setup.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index cc1408119c24..332b90d9df47 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -20,6 +20,7 @@
20#include <linux/gpio.h> 20#include <linux/gpio.h>
21#include <media/soc_camera_platform.h> 21#include <media/soc_camera_platform.h>
22#include <media/sh_mobile_ceu.h> 22#include <media/sh_mobile_ceu.h>
23#include <media/ov772x.h>
23#include <video/sh_mobile_lcdc.h> 24#include <video/sh_mobile_lcdc.h>
24#include <asm/clock.h> 25#include <asm/clock.h>
25#include <asm/machvec.h> 26#include <asm/machvec.h>
@@ -326,6 +327,16 @@ static void camera_power(int mode)
326 camera_power_off(); 327 camera_power_off();
327} 328}
328 329
330static int ov7725_power(struct device *dev, int mode)
331{
332 if (mode)
333 camera_power_on();
334 else
335 camera_power_off();
336
337 return 0;
338}
339
329#ifdef CONFIG_I2C 340#ifdef CONFIG_I2C
330static unsigned char camera_ov772x_magic[] = 341static unsigned char camera_ov772x_magic[] =
331{ 342{
@@ -448,6 +459,13 @@ static struct platform_device migor_ceu_device = {
448 }, 459 },
449}; 460};
450 461
462static struct ov772x_camera_info ov7725_info = {
463 .buswidth = SOCAM_DATAWIDTH_8,
464 .link = {
465 .power = ov7725_power,
466 },
467};
468
451static struct platform_device *migor_devices[] __initdata = { 469static struct platform_device *migor_devices[] __initdata = {
452 &smc91x_eth_device, 470 &smc91x_eth_device,
453 &sh_keysc_device, 471 &sh_keysc_device,
@@ -468,6 +486,10 @@ static struct i2c_board_info migor_i2c_devices[] = {
468 I2C_BOARD_INFO("migor_ts", 0x51), 486 I2C_BOARD_INFO("migor_ts", 0x51),
469 .irq = 38, /* IRQ6 */ 487 .irq = 38, /* IRQ6 */
470 }, 488 },
489 {
490 I2C_BOARD_INFO("ov772x", 0x21),
491 .platform_data = &ov7725_info,
492 },
471}; 493};
472 494
473static int __init migor_devices_setup(void) 495static int __init migor_devices_setup(void)